CVS Repository/ src/ libexec/ login_chpass/ login_chpass.c


OpenBSD release(s):
1.22 (79 78 77 76),  1.21 (75 74 73 72 71 70 69 68 67 66 65 64),  1.20 (63 62 61 60 59),  1.16 (58 57 56 55 54 53),  1.15 (52 51 50 49 48 47 46 45 44 43 42 41 40),  1.14 (39 38),  1.13 (37),  1.12 (36 35),  1.11 (34),  1.10 (33 32),  1.6 (31),  1.1 (30 29), 
Tags:
None
revision 1.22/ (Download) - annotate - Sun, 22 Sep 2024 04:19:22 UTC by jsg
OpenBSD release(s): 79 78 77 76
Changes since 1.21: +1 -3 (diff)
remove BACK_CHANNEL define, unused since YP bits removed in rev 1.20

revision 1.21/ (Download) - annotate - Thu, 26 Apr 2018 12:42:51 UTC by guenther
OpenBSD release(s): 75 74 73 72 71 70 69 68 67 66 65 64
Changes since 1.20: +2 -11 (diff)
Use <fcntl.h> instead of <sys/file.h> for open() and friends.
Delete a bunch of unnecessary #includes and sort to match style(9)
while doing the above cleanup.

ok deraadt@ krw@

revision 1.20/ (Download) - annotate - Thu, 26 Nov 2015 19:01:47 UTC by deraadt
OpenBSD release(s): 63 62 61 60 59
Changes since 1.19: +4 -154 (diff)
Delete YP password related code.  As a result, these can also be
pledged.  Keep an eye out for regressions, because they could be
uncomfortable.
ok beck semarie

revision 1.19/ (Download) - annotate - Sun, 25 Oct 2015 08:39:26 UTC by ajacoutot
Changes since 1.18: +1 -2 (diff)
No need to declare pwd_gensalt; it's unused and gone.
ok tedu@

revision 1.18/ (Download) - annotate - Thu, 22 Oct 2015 12:32:33 UTC by tedu
Changes since 1.17: +4 -9 (diff)
use crypt_checkpass instead of doing things the hard way with crypt.

revision 1.17/ (Download) - annotate - Mon, 05 Oct 2015 17:31:17 UTC by millert
Changes since 1.16: +2 -2 (diff)
Use explicit_bzero() instead of memset() for zeroing out secrets.
OK deraadt@

revision 1.16/ (Download) - annotate - Tue, 04 Dec 2012 02:24:47 UTC by deraadt
OpenBSD release(s): 58 57 56 55 54 53
Changes since 1.15: +1 -2 (diff)
remove some unnecessary sys/param.h inclusions

revision 1.15/ (Download) - annotate - Thu, 09 Mar 2006 19:14:09 UTC by millert
OpenBSD release(s): 52 51 50 49 48 47 46 45 44 43 42 41 40
Changes since 1.14: +11 -4 (diff)
Foil potential timing attacks by using the correct password hash
instead of "xx".  In practice this means bcrypt() will be used for
non-existent users instead of DES crypt().
Adapted from a patch by Peter Philipp.  OK deraadt@

revision 1.14/ (Download) - annotate - Thu, 14 Apr 2005 18:33:42 UTC by biorn
OpenBSD release(s): 39 38
Changes since 1.13: +1 -2 (diff)
drop some krb4 stuff

ok beck@

revision 1.13/ (Download) - annotate - Tue, 28 Sep 2004 21:52:40 UTC by deraadt
OpenBSD release(s): 37
Changes since 1.12: +7 -2 (diff)
pass lint

revision 1.12/ (Download) - annotate - Wed, 10 Mar 2004 21:30:27 UTC by millert
OpenBSD release(s): 36 35
Changes since 1.11: +5 -3 (diff)
More checking for a NULL return value from getpass().  otto@ OK

revision 1.11/ (Download) - annotate - Tue, 12 Aug 2003 13:14:08 UTC by hin
OpenBSD release(s): 34
Changes since 1.10: +2 -86 (diff)
Cleanup obsolete kerberos 4 stuff.

ok millert@

revision 1.10/ (Download) - annotate - Fri, 06 Sep 2002 18:45:06 UTC by deraadt
OpenBSD release(s): 33 32
Changes since 1.9: +8 -16 (diff)
ansi; ok millert pvalchev

revision 1.9/ (Download) - annotate - Fri, 28 Jun 2002 01:14:37 UTC by deraadt
Changes since 1.8: +10 -10 (diff)
minor indent cleanup

revision 1.8/ (Download) - annotate - Sun, 02 Jun 2002 01:27:15 UTC by deraadt
Changes since 1.7: +3 -3 (diff)
minor KNF

revision 1.7/ (Download) - annotate - Sun, 26 May 2002 09:32:08 UTC by deraadt
Changes since 1.6: +3 -3 (diff)
pid_t cleanup

revision 1.6/ (Download) - annotate - Sat, 16 Feb 2002 21:27:30 UTC by millert
OpenBSD release(s): 31
Changes since 1.5: +9 -9 (diff)
Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

revision 1.5/ (Download) - annotate - Sun, 06 Jan 2002 21:53:28 UTC by millert
Changes since 1.4: +13 -8 (diff)
Don't let root change it's password via login_l?chpass(8).
At some point in the future, passwd(1) may call these auth methods
at which time we will need a flag to allow root to do a password
change and also to allow account w/o a password to be given one.

revision 1.4/ (Download) - annotate - Fri, 07 Dec 2001 04:22:41 UTC by millert
Changes since 1.3: +35 -14 (diff)
o Use writev() to send status on the backchannel instead of fdopen()ing
  fd 3 and using stdio.

o Add SIGINT/SIGQUIT signal handler for yp_chpass() now that getpass()
  is interuptible.

o Block SIGINT/SIGQUIT in krb_chpass() until it is made to clean up
  after itself properly.

revision 1.3/ (Download) - annotate - Thu, 06 Dec 2001 05:37:03 UTC by millert
Changes since 1.2: +1 -3 (diff)
Do not set handler for SIGINT and SIGQUIT to SIG_IGN since it prevents
getpass()/readpassphrase() from being able to restore the tty mode
on keyboard interrupt.  Along with the recent readpassphrase.c commit
this means that if you ^C things that use login scripts (like su(1))
with a non-CBREAK shell your tty mode will be restored nicely.

TODO:
The various login scripts need to install handlers to avoid leaving
turd files or otherwise ending in a bad state.  It would also be
nice to send BI_REJECT to the back channel.

revision 1.2/ (Download) - annotate - Wed, 24 Oct 2001 13:06:35 UTC by mpech
Changes since 1.1: +2 -2 (diff)
getopt(3) returns -1 when out of args, not EOF.

millert@ ok

revision 1.1/ (Download) - annotate - Tue, 12 Dec 2000 02:30:44 UTC by millert
OpenBSD release(s): 30 29
chpass login script; changes local, yp, or kerberos password
will be used when BSD authentication is enabled