Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  2 Nov 1995 16:10:14 +0300 (MSK)
From:      =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) <ache@astral.msk.su>
To:        CVS-commiters@freefall.freebsd.org, Peter Wemm <peter@jhome.DIALix.COM>
Cc:        security@freebsd.org
Subject:   Re: cvs commit: CVSROOT log_accum.pl
Message-ID:  <lCsCCcmGC8@ache.dialup.demos.ru>
In-Reply-To: <Pine.BSF.3.91.951102192412.2078B-100000@jhome.DIALix.COM>; from Peter Wemm at Thu, 2 Nov 1995 19:45:54 %2B0800 (WST)
References:  <Pine.BSF.3.91.951102192412.2078B-100000@jhome.DIALix.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.3.91.951102192412.2078B-100000@jhome.DIALix.COM>
    Peter Wemm writes:

>Maybe the setlogin() call should only work for processes that are the 
>session leader rather than just "one of many in the session"?

It is definitely so, and check for session leader must be added
to setlogin syscall.
Even manpage says that setlogin affects only _current_ session.

Proposed fix:

*** kern_prot.c.bak	Thu Nov  2 16:05:11 1995
--- kern_prot.c	Thu Nov  2 16:08:29 1995
***************
*** 623,628 ****
--- 623,630 ----
  {
  	int error;
  
+ 	if (!SESS_LEADER(p))
+ 		return (EPERM);
  	if ((error = suser(p->p_ucred, &p->p_acflag)))
  		return (error);
  	error = copyinstr((caddr_t) uap->namebuf,
-- 
Andrey A. Chernov        : And I rest so composedly,  /Now, in my bed,
ache@astral.msk.su       : That any beholder  /Might fancy me dead -
http://dt.demos.su/~ache : Might start at beholding me,  /Thinking me dead.
RELCOM Team,FreeBSD Team :         E.A.Poe         From "For Annie" 1849



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?lCsCCcmGC8>