Subject: rshd bug + fix
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Frank van der Linden <vdlinden@fwi.uva.nl>
List: current-users
Date: 02/18/1994 10:59:28
rshd dumps core whenever an rsh to the machine is attempted from
a remote user with a login name which is unknown locally. It uses
a structure poiner returned by getpwnam(), but it doesn't check if
it is 0 at one point. Fix:
*** rshd.c.org Thu Dec 23 19:56:00 1993
--- rshd.c Fri Feb 18 10:53:07 1994
***************
*** 459,465 ****
errorstr = "Permission denied.\n";
/* log the (failed) rsh request, if paranoid */
! if (paranoid || pwd->pw_uid == 0)
syslog(LOG_INFO|LOG_AUTH,
"rsh denied to %s@%s as %s: cmd='%s'; %s",
remuser, hostname, locuser, cmdbuf,
--- 459,465 ----
errorstr = "Permission denied.\n";
/* log the (failed) rsh request, if paranoid */
! if (paranoid || (pwd && pwd->pw_uid == 0))
syslog(LOG_INFO|LOG_AUTH,
"rsh denied to %s@%s as %s: cmd='%s'; %s",
remuser, hostname, locuser, cmdbuf,
- Frank
------------------------------------------------------------------------------