🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Arnold D. Robbins {EUCC} Thu, 23 Oct 1986 04:28
4.3 /bin/passwd does not deal with /etc/shells properly
#1715
Author: Arnold D. Robbins {EUCC}
Date: Thu, 23 Oct 1986 04:28
68 lines
2341 bytes
[ 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads