setgid() broken on xenix?
Chip Salzenberg
chip at ateng.com
Sat Jul 22 06:57:35 AEST 1989
According to tan at bronson.UUCP (Tan Bronson):
> A few weeks ago I recall someone else noticing that setgid programs
>can't work on Xenix. Is there a workaround? I'm running `386 2.3.1...
>I'd sure like to be able to use this someday!
Xenix 2.2 and greater has no problem I'm aware of with running setgid
programs.
The bug is that if a program calls setgid(getgid()), and that program's
effective uid isn't root, then the setgid() fails but returns -> zero <-.
So it's saying "sure, no problem," but it's not doing anything.
A workaround is: "setgid(getgid()); if (getegid() != getgid()) { PROBLEM }".
--
You may redistribute this article only to those who may freely do likewise.
Chip Salzenberg | <chip at ateng.com> or <uunet!ateng!chip>
A T Engineering | Me? Speak for my company? Surely you jest!
More information about the Comp.unix.xenix
mailing list