Debian bug report logs - #1708
`passwd' not interruptible when invoked by `adduser'

Package: adduser? miscutils?; Reported by: Ian Jackson <ian@chiark.chu.cam.ac.uk>; 12 days old.

Message received at debian-bugs:


From olis.north.de!indrom!joey Sat Oct 21 10:36:11 1995
Return-Path: <indrom!joey@olis.north.de>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t6hpz-0006FhC; Sat, 21 Oct 95 10:36 PDT
Received: from gimli.Informatik.Uni-Oldenburg.DE by pixar.com with SMTP id AA20210
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 21 Oct 1995 10:33:25 -0700
Received: by gimli.Informatik.Uni-Oldenburg.DE (Smail3.1.22.1)
	id <m0t6fUn-0000TSC>; Sat, 21 Oct 95 16:06 CET
Received: by olis.north.de (/\==/\ Smail3.1.28.1 #28.13)
	id <m0t6eUh-0005ZxC@olis.north.de>; Sat, 21 Oct 95 15:01 MEZ
Received: at Infodrom Oldenburg (/\##/\ Smail3.1.29.1 #29.10 Joey)
	by finlandia.Infodrom.North.DE from joey (Martin Schulze) 
	id m0t6dxl-000K0ZC; Sat, 21 Oct 95 14:27 MET
Message-Id: <m0t6dxl-000K0ZC@finlandia.Infodrom.North.DE>
From: joey@finlandia.Infodrom.North.DE (Martin Schulze)
Subject: Re: Bug#1708: `passwd' not interruptible when invoked by `adduser'
To: ian@chiark.chu.cam.ac.uk
Date: Sat, 21 Oct 1995 14:27:49 +0100 (MET)
Cc: debian-bugs@Pixar.com
In-Reply-To: <m0t65Zy-0002YGC@chiark.chu.cam.ac.uk> from "Ian Jackson" at Oct 20, 95 01:44:00 am
X-Href: http://home.pages.de/~joey/
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 1968      

Hello Ian Jackson!

}Package: adduser? miscutils?
}Version: adduser (1.94-1), miscutils (1.3-2)

No. libc.

}If I run adduser, and then decide to abort after having been presented
}with the password prompt, I can't do it with ^C.  passwd apparently
}ignores ^C, and ^D simply produces another passwd prompt.  Presumably
}I would have to type in a password twice to escape; instead, I used
}another terminal and killed the adduser process.

Because I have heavily modified the passwd program in the last days I
checked this report...

The reason is not in the adduser nor in the miscutils (or util-linux
where my passwd comes from). It's in the libc itself.

The passwd programm just makes a system call:


-- [passwd.c] --------------------------------------------------------
        pwdstr = getpass("Enter new password: ");
        if (pwdstr[0] == '\0') {
            puts("Password not changed.");
            exit(1);
        }
----------------------------------------------------------------------

Looking at the source of libc you'll find the code that is responsible
for disabling ^C:

-- [getpass.c] -------------------------------------------------------
        ttyb.c_lflag &= ~(ECHO|ISIG);
        ioctl(fileno(tty), TCSETS, &ttyb);
----------------------------------------------------------------------

The above code (from util-linux) will accept an empty password
(generated with ^D) - and won't change anything. For me this is a
correct behaviour - I can live with that.

I haven't looked at the passwd program that is used by Debian.

So far,

	Joey

-- 
   / Martin Schulze  *  joey@infodrom.north.de  *  26129 Oldenburg /
  / +49-441-777884  *  Login&Passwd: nuucp  *  Index: ~/ls-lR.gz  /
 /                            Erfahrung ist eine n|tzliche Sache /
/ Leider macht man sie immer erst kurz nachdem man sie brauchte /
----------------------------------------------------------------
30.10.95: Oldenburger Linux-Stammtisch, ab 20h im DaCapo

Acknowledgement sent to joey@finlandia.Infodrom.North.DE (Martin Schulze):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1708; Package adduser? miscutils?. Full text available.

Message received at debian-bugs:


From chiark.chu.cam.ac.uk!ian Thu Oct 19 17:45:20 1995
Return-Path: <ian@chiark.chu.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t65aK-0001ceC; Thu, 19 Oct 95 17:45 PDT
Received: from artemis.chu.cam.ac.uk by pixar.com with SMTP id AA06742
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 19 Oct 1995 17:44:51 -0700
Received: from chiark.chu.cam.ac.uk by artemis.chu.cam.ac.uk with smtp
	(Smail3.1.29.1 #33) id m0t66cX-0007u9C; Fri, 20 Oct 95 01:51 GMT
Received: by chiark.chu.cam.ac.uk
	id m0t65Zy-0002YGC
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Fri, 20 Oct 95 01:44 BST
Message-Id: <m0t65Zy-0002YGC@chiark.chu.cam.ac.uk>
Date: Fri, 20 Oct 95 01:44 BST
From: Ian Jackson <ian@chiark.chu.cam.ac.uk>
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: `passwd' not interruptible when invoked by `adduser'

Package: adduser? miscutils?
Version: adduser (1.94-1), miscutils (1.3-2)

If I run adduser, and then decide to abort after having been presented
with the password prompt, I can't do it with ^C.  passwd apparently
ignores ^C, and ^D simply produces another passwd prompt.  Presumably
I would have to type in a password twice to escape; instead, I used
another terminal and killed the adduser process.

Ian.

Acknowledgement sent to Ian Jackson <ian@chiark.chu.cam.ac.uk>:
New bug report received and forwarded. Full text available.
Report forwarded to debian-devel@pixar.com:
Bug#1708; Package adduser? miscutils?. Full text available.
Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov