diff options
author | sef <sef@FreeBSD.org> | 1997-12-20 03:05:47 +0000 |
---|---|---|
committer | sef <sef@FreeBSD.org> | 1997-12-20 03:05:47 +0000 |
commit | f4669f67bc8626da80c2d579536287ecf2591d0f (patch) | |
tree | 23fa5336895d623870954d25c73d37c78cc2abdf /sys/kern/kern_exec.c | |
parent | 6a523666f710366947056d9583488471279a3602 (diff) | |
download | FreeBSD-src-f4669f67bc8626da80c2d579536287ecf2591d0f.zip FreeBSD-src-f4669f67bc8626da80c2d579536287ecf2591d0f.tar.gz |
Clear the p_stops field on change of user/group id, unless the correct
flag is set in the p_pfsflags field. This, essentially, prevents an SUID
proram from hanging after being traced. (E.g., "truss /usr/bin/rlogin" would
fail, but leave rlogin in a stopevent state.) Yet another case where procctl
is (hopefully ;)) no longer needed in the general case.
Reviewed by: bde (thanks bruce :))
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 6804d28..eca4c3f 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.69 1997/12/06 04:11:09 sef Exp $ + * $Id: kern_exec.c,v 1.70 1997/12/16 15:40:29 davidg Exp $ */ #include <sys/param.h> @@ -313,7 +313,7 @@ interpret: p->p_ucred->cr_uid = attr.va_uid; if (attr.va_mode & VSGID) p->p_ucred->cr_gid = attr.va_gid; - p->p_flag |= P_SUGID; + setsugid(p); } else { if (p->p_ucred->cr_uid == p->p_cred->p_ruid && p->p_ucred->cr_gid == p->p_cred->p_rgid) |