brl-vgr Bug Report

ron at BRL.ARPA ron at BRL.ARPA
Tue Oct 14 09:03:44 AEST 1986


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()) {



More information about the Comp.unix.wizards mailing list