The Sun Ray team encountered a serious problem where GDM
runs its various scripts (Init, PreSession, PostSession, and
PostLogin) with improper group privileges. Specifically the gid and
egid values should both be 0 when the scripts are run. However,
the actual values of uid/gid/euid/egid are as follows:
Init - uid/gid/euid/egid=0
PostLogin - uid/euid=0, gid/egid=(group of user logging in)
PreSession - uid/euid=0, gid=(group of user logging in), euid=50
(50 is the "gdm" group)
PostSession - uid/euid=0, gid=(group of user logging in), egid=0
So, the problem exists with the PreSession and PostSession scripts
where egid and gid do not match.
This has the effect of preventing applications run from those scripts
that link with $ORIGIN in their RPATH (see ld.so.1 man page regarding
"secure processes").
To fix this problem, the patch saves the values of gid/egid before
running the scripts, then sets the gid/egid values to 0, runs
the scripts, and then sets the gid/egid values back after running
the scripts. This corrects the problem and ensures that all GDM
scripts are run with similar privileges.
Brian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gdm-14-gid.diff
URL:
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20090318/a9f73d50/attachment.ksh>