Date: Wed, 4 Sep 2002 13:10:03 -0700 (PDT) From: "Chris S.J. Peron" <maneo@bsdpro.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/42419: syslog enhancement for the nologin shell Message-ID: <200209042010.g84KA3CY028088@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/42419; it has been noted by GNATS. From: "Chris S.J. Peron" <maneo@bsdpro.com> To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/42419: syslog enhancement for the nologin shell Date: Wed, 4 Sep 2002 14:55:15 -0500 Just a couple of changes for nologin.c 1) it possible that if a user is using su to change to another user, the syslog would report the calling users login and not the login of the desired user. FIX: use getenv() rather the utmp 2) close utmp file descriptor --- nologin.old.c Wed Sep 4 14:41:01 2002 +++ nologin.c Wed Sep 4 14:41:45 2002 @@ -99,8 +99,9 @@ if (strcmp(utp->ut_line, ontty()) == 0) syslog(LOG_AUTH | LOG_WARNING, "rejected login attempt for user %s %s from %s", - utp->ut_name, ontty(), utp->ut_host); + getenv("USER"), ontty(), utp->ut_host); } + close(fd); return(0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209042010.g84KA3CY028088>