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 * [EMAIL PROTECTED] * 26129 Oldenburg /
/ +49-441-777884 * LoginPasswd: 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