diff options
author | peter <peter@FreeBSD.org> | 2000-05-09 00:58:34 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-05-09 00:58:34 +0000 |
commit | 029fcd0eaddeeb9b62164e57588dc132b6f3efa4 (patch) | |
tree | 56ffc4a74f428125b1f92b850a7c61a8c5e59ecb /sys | |
parent | 1fdae044885911efff13e78c65492dc82a87b198 (diff) | |
download | FreeBSD-src-029fcd0eaddeeb9b62164e57588dc132b6f3efa4.zip FreeBSD-src-029fcd0eaddeeb9b62164e57588dc132b6f3efa4.tar.gz |
Make issetugid return correctly. It was returning -1 with
errno == 1 if it was set?id!
Submitted by: Valentin Nechayev <netch@segfault.kiev.ua>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_prot.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 28444a1..3be52c8 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -909,8 +909,7 @@ issetugid(p, uap) * a user without an exec - programs cannot know *everything* * that libc *might* have put in their data segment. */ - if (p->p_flag & P_SUGID) - return (1); + p->p_retval[0] = (p->p_flag & P_SUGID) ? 1 : 0; return (0); } |