diff options
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r-- | sys/kern/kern_prot.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 8ced323..003ff3b 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -44,6 +44,7 @@ */ #include "opt_compat.h" +#include "opt_global.h" #include <sys/param.h> #include <sys/acct.h> @@ -911,6 +912,28 @@ issetugid(p, uap) return (0); } +int +__setugid(p, uap) + struct proc *p; + struct __setugid_args *uap; +{ + +#ifdef REGRESSION + switch (uap->flag) { + case 0: + p->p_flag &= ~P_SUGID; + return (0); + case 1: + p->p_flag |= P_SUGID; + return (0); + default: + return (EINVAL); + } +#else /* !REGRESSION */ + return (ENOSYS); +#endif /* !REGRESSION */ +} + /* * Check if gid is a member of the group set. */ |