[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-bugs
Subject:    Re: bin/75001
From:       Rostislav Krasny <rosti.bsd () gmail ! com>
Date:       2005-05-31 9:30:05
Message-ID: 200505310930.j4V9U5RF095094 () freefall ! freebsd ! org
[Download RAW message or body]

The following reply was made to PR bin/75001; it has been noted by GNATS.

From: Rostislav Krasny <rosti.bsd@gmail.com>
To: Maxim Konovalov <maxim@macomnet.ru>
Cc: bug-followup@freebsd.org
Subject: Re: bin/75001
Date: Tue, 31 May 2005 12:16:09 +0200

 This is a multi-part message in MIME format.
 --------------050207050407070605070907
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Maxim Konovalov wrote:
 > Am I right you missed login_close(lc_user) call near the line 592?
 
 Yes, you are absolutely right. New diff is attached to this email.
 
 
 --------------050207050407070605070907
 Content-Type: text/plain;
  name="login.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="login.diff"
 
 diff -ur login.orig/login.c /usr/src/usr.bin/login/login.c
 --- login.orig/login.c	Mon Jan 26 22:04:47 2004
 +++ /usr/src/usr.bin/login/login.c	Tue May 31 10:56:34 2005
 @@ -171,6 +171,7 @@
  	const char *tp;
  	const char *shell = NULL;
  	login_cap_t *lc = NULL;
 +	login_cap_t *lc_user = NULL;
  	pid_t pid;
  
  	(void)signal(SIGQUIT, SIG_IGN);
 @@ -354,8 +355,10 @@
  	 * Establish the login class.
  	 */
  	lc = login_getpwclass(pwd);
 +	lc_user = login_getuserclass(pwd);
  
 -	quietlog = login_getcapbool(lc, "hushlogin", 0);
 +	if (!(quietlog = login_getcapbool(lc_user, "hushlogin", 0)))
 +		quietlog = login_getcapbool(lc, "hushlogin", 0);
  
  	/*
  	 * Switching needed for NFS with root access disabled.
 @@ -568,7 +571,8 @@
  		else
  			motd(_PATH_MOTDFILE);
  
 -		if (login_getcapbool(lc, "nocheckmail", 0) == 0) {
 +		if (login_getcapbool(lc_user, "nocheckmail", 0) == 0 &&
 +		    login_getcapbool(lc, "nocheckmail", 0) == 0) {
  			char *cx;
  
  			/* $MAIL may have been set by class. */
 @@ -585,6 +589,7 @@
  		}
  	}
  
 +	login_close(lc_user);
  	login_close(lc);
  
  	(void)signal(SIGALRM, SIG_DFL);
 
 --------------050207050407070605070907--
 
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic