Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!codas!akgua!emory!arnold From: arnold@emory.UUCP (Arnold D. Robbins {EUCC}) Newsgroups: net.bugs.4bsd Subject: 4.3 /bin/passwd does not deal with /etc/shells properly Message-ID: <1883@emory.UUCP> Date: Wed, 22-Oct-86 23:28:50 EST Article-I.D.: emory.1883 Posted: Wed Oct 22 23:28:50 1986 Date-Received: Mon, 27-Oct-86 00:52:09 EST Organization: Math & Computer Science, Emory University, Atlanta Lines: 68 [ My apologies if this has been seen before. If so, please ignore it. ] Subject: 4.3 /bin/passwd does not deal with /etc/shells properly Index: /usr/src/bin/passwd.c 4.3BSD Description: It is possible to request a shell that is valid as a new shell, but /bin/passwd will claim it is no good. Repeat-By: Run passwd to request a new shell. Ask for a shell that is before your old shell in the list in /etc/shells. Fix: Apply the following patch: RCS file: RCS/passwd.c,v retrieving revision 1.1 diff -c -r1.1 passwd.c *** /tmp/,RCSt1007186 Wed Oct 22 18:05:08 1986 --- passwd.c Mon Aug 11 11:59:11 1986 *************** *** 1,9 **** #ifndef lint ! static char *RCSid = "$Header: passwd.c,v 1.1 86/08/11 11:27:00 root Exp $"; #endif /* * $Log: passwd.c,v $ * Revision 1.1 86/08/11 11:27:00 root * Initial revision * --- 1,12 ---- #ifndef lint ! static char *RCSid = "$Header: passwd.c,v 1.2 86/08/11 11:58:50 root Locked $"; #endif /* * $Log: passwd.c,v $ + * Revision 1.2 86/08/11 11:58:50 root + * Fixed a bug in change shell code which did not reset the shells file. + * * Revision 1.1 86/08/11 11:27:00 root * Initial revision * *************** *** 328,333 **** --- 331,337 ---- /* * Allow user to give shell name w/o preceding pathname. */ + endusershell (); if (u == 0) { valid = newshell; } else { *************** *** 345,350 **** --- 349,355 ---- break; } } + endusershell(); /* bug fix, was missing */ if (valid == 0) { printf("%s is unacceptable as a new shell.\n", newshell); -- Arnold Robbins CSNET: arnold@emory BITNET: arnold@emoryu1 ARPA: arnold%emory.csnet@csnet-relay.arpa UUCP: { akgua, decvax, gatech, sb1, sb6, sunatl }!emory!arnold