** Security fix for npasswd **
clyde at sirius.cc.utexas.edu
clyde at sirius.cc.utexas.edu
Fri Jun 1 23:48:27 AEST 1990
Here is a security fix to npasswd. Apply this patch if you are running
npasswd with YP (NIS).
[[Ed's Note: since it's relatively short and the source for npasswd is not
in the Rice archives, I have just included it here instead of archiving
it. -bdg]]
------------- cut here -------------------
*** pw_yp.c_1.10 Fri Jun 1 08:46:01 1990
--- pw_yp.c Tue May 29 14:41:36 1990
***************
*** 27,33 ****
#endif
#ifndef lint
! static char sccsid[] = "@(#)pw_yp.c 1.10 3/20/90 (cc.utexas.edu)";
#endif
#define NONE -1 /* YP not active */
--- 27,33 ----
#endif
#ifndef lint
! static char sccsid[] = "@(#)pw_yp.c 1.11 5/29/90 (cc.utexas.edu)";
#endif
#define NONE -1 /* YP not active */
***************
*** 147,152 ****
--- 147,153 ----
fgetpwent();
int rc = 0;
+ /* What if passwdfile != /etc/passwd? */
if ((pf = fopen(passwdfile, "r")) == NULL)
quit(1, "Cannot open password file.");
/*
***************
*** 523,529 ****
* An example sh(1) script to update YP password map
*/
char *ypcmd =
! "(ypdirs='/var/yp /etc/yp'\n\
for d in $ypdirs; do\n\
if [ -d $d ]; then\n\
cd $d; exec make passwd\n\
--- 524,530 ----
* An example sh(1) script to update YP password map
*/
char *ypcmd =
! "(PATH=/bin:/usr/bin; export PATH; ypdirs='/var/yp /etc/yp'\n\
for d in $ypdirs; do\n\
if [ -d $d ]; then\n\
cd $d; exec make passwd\n\
---------------- cut here ------------------
More information about the Comp.sys.sun
mailing list