Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Jan 2001 22:43:18 -0700
From:      Warner Losh <imp@harmony.village.org>
To:        Ben Smithurst <ben@FreeBSD.ORG>
Cc:        audit@FreeBSD.ORG
Subject:   Re: stupid bug in getsid() 
Message-ID:  <200101100543.f0A5hIs59275@harmony.village.org>
In-Reply-To: Your message of "Tue, 09 Jan 2001 06:19:16 GMT." <20010109061916.E79365@strontium.scientia.demon.co.uk> 
References:  <20010109061916.E79365@strontium.scientia.demon.co.uk>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20010109061916.E79365@strontium.scientia.demon.co.uk> Ben Smithurst writes:
: Anyone object terribly if I fix this really stupid bug?
: 
: --- kern_prot.c~        Tue Jan  9 05:59:10 2001
: +++ kern_prot.c Tue Jan  9 05:59:22 2001
: @@ -162,7 +162,7 @@
:         if (uap->pid == 0)
:                 goto found;
:  
: -       if ((pt == pfind(uap->pid)) == 0)
: +       if ((pt = pfind(uap->pid)) == 0)
:                 return ESRCH;
:  found:
:         p->p_retval[0] = pt->p_session->s_sid;

My first thought is that I would.  pt is specifically set in earlier
in the function.  However, in getpgid() it uses 1 = sign, so I think
that's the right thing to do.

What are the impacts of this bug?  What does it allow you to do that
you shouldn't be able to do, if any?

Warner



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




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