GNOME Bugzilla – Bug 787287
Set GROUP for newly logged in user
Last modified: 2018-01-08 20:54:54 UTC
Created attachment 359150 [details] [review] daemon: Make sure to set GROUP as well We set USER but not GROUP, which we might want to rely on in session setup scripts
Review of attachment 359150 [details] [review]: Hey thanks for this. I'm sort of hoping to deprecate the scripts at some point (let's get shell out of the login path), but for now this is fine I guess. ::: common/gdm-common.c @@ +590,3 @@ + + /* Also get group name and propagate down */ + struct group *grent = getgrgid (pwent->pw_gid); this doesn't handle EINTR. probably there should be a gdm_get_grent_for_gid call, like the gdm_get_pwent_for_name call, with the same weird loop.
Created attachment 360533 [details] [review] common: Also set GROUP in scripts Adds gdm_get_grent_for_gid
Attachment 360533 [details] pushed as 6594b1f - common: Also set GROUP in scripts
oops got a little trigger happy with my ctrl-r enter and git bz pushed this on accident.
Review of attachment 360533 [details] [review]: please test it too before we push it ::: common/gdm-common.c @@ +101,3 @@ +gboolean +gdm_get_grent_for_gid (gint gid, + struct grent **grentp) should be struct group here.
(In reply to Ray Strode [halfline] from comment #5) > Review of attachment 360533 [details] [review] [review]: > > please test it too before we push it > > ::: common/gdm-common.c > @@ +101,3 @@ > +gboolean > +gdm_get_grent_for_gid (gint gid, > + struct grent **grentp) > > should be struct group here. Oops, yep, got a little trigger-happy myself :) I'll give it a quick test and fix that up, thanks for catching.
Created attachment 360890 [details] [review] common: Also set GROUP in scripts Updated, tested again.
Attachment 360890 [details] pushed as bf0a664 - common: Also set GROUP in scripts