Make issetugid return correctly. It was returning -1 with

errno == 1 if it was set?id!

Submitted by:	 Valentin Nechayev <netch@segfault.kiev.ua>
This commit is contained in:
peter 2000-05-09 00:58:34 +00:00
parent 1fdae04488
commit 029fcd0ead

View File

@ -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);
}