Re: 2.0.29 sysctl.c if(grp == current->euid)

Garst R. Reese (reese@isn.net)
Wed, 12 Feb 1997 10:02:01 -0400


Theodore Y. Ts'o wrote:
>
> Date: Tue, 11 Feb 1997 07:12:01 +0000
> From: David A Rusling <rusling@linux.reo.dec.com>
>
> I'm not sure either, I'm confused by Linux's use of uids and gids, for
> every process it keeps 4 variants of each (plus an array of group ids):
>
> uid, suid, euid, fsuid
> gid, sgid, egid, fsgid
>
> So far as I can tell from reading the code, the fsuid and fsgid are
> used when checking access to files and they are there because some
> executables may change the uid and gid of the executing process (for
> the purposes of privilege protection). euid and egid are the
> effective ids (based on {uid, suid} and {gid, sgid}?). If someone
> could clarify this it would be helpful.
>
> OK, here's the quick summary. The four types of uid (gids are
[snipped long informative summary]
> - Ted
Thanks for the info, but my real questions are,
1. does:

if (grp == current->euid)
^
make any sense?
2. Should euid be changed to egid?
3. Or should the patches to sys.c and sysctl.c that appeared in 2.1.12
go into the 2.0.xx series.
Garst