Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!brl-adm!brl-smoke!smoke!ron@BRL.ARPA From: ron@BRL.ARPA Newsgroups: net.unix-wizards Subject: brl-vgr Bug Report Message-ID: <4574@brl-smoke.ARPA> Date: Mon, 13-Oct-86 19:03:44 EDT Article-I.D.: brl-smok.4574 Posted: Mon Oct 13 19:03:44 1986 Date-Received: Tue, 14-Oct-86 06:54:23 EDT Sender: news@brl-smoke.ARPA Lines: 24 Subject: chsh won't change shell back Index: bin/passwd.c 4.3BSD Description: Chsh won't change shell to one that is earlier in /etc/shells file than the one you are using. Repeat-By: Chsh to the a later shell in the file (say tcsh) and then try to switch back to csh. Fix: Chsh verifies that the shell you are switching from is in /etc/shells by calling getusershell until it matches. It then verifies the new shell by calling getusershell, but it does not rewind the file by calling set/endusershell. Add endusershell call prior to the second lookup /* * Allow user to give shell name w/o preceding pathname. */ if (u == 0) { valid = newshell; } else { !!! endusershell(); for (valid = getusershell(); valid; valid = getusershell()) {