Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Base:System
rungetty
05_rungetty-missing-call-to-setgroups-before-se...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 05_rungetty-missing-call-to-setgroups-before-setuid.patch of Package rungetty
Index: rungetty-1.2/rungetty.c =================================================================== --- rungetty-1.2.orig/rungetty.c +++ rungetty-1.2/rungetty.c @@ -595,6 +595,15 @@ main (int argc, char **argv) if (!program_run) mingetty_login (logname, tty); + /* When dropping privileges from root, the `setgroups` call will + * remove any extraneous groups. If we don't call this, then + * even though our uid has dropped, we may still have groups + * that enable us to do super-user things. This will fail if we + * aren't root, so don't bother checking the return value, this + * is just done as an optimistic privilege dropping function. + */ + setgroups(0, NULL); + setgid (u_group->gr_gid); setuid (user->pw_uid);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor