Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
spins:invis:15:common
ntop
POS36-C.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File POS36-C.patch of Package ntop
Index: ntop-5.0.2/util.c =================================================================== --- ntop-5.0.2.orig/util.c +++ ntop-5.0.2/util.c @@ -3998,7 +3998,11 @@ void checkUserIdentity(int userSpecified #ifndef WIN32 if((getuid() != geteuid()) || (getgid() != getegid())) { /* setuid binary, drop privileges */ - if((setgid(getgid()) != 0) || (setuid(getuid()) != 0)) { + if(setgid(getgid()) != 0) { + traceEvent(CONST_TRACE_FATALERROR, "Unable to drop privileges"); + exit(33); /* Just in case */ + } + if(setuid(getuid()) != 0) { traceEvent(CONST_TRACE_FATALERROR, "Unable to drop privileges"); exit(33); /* Just in case */ } @@ -4011,7 +4015,11 @@ void checkUserIdentity(int userSpecified if(userSpecified) { /* User located */ if((myGlobals.userId != 0) || (myGlobals.groupId != 0)) { - if((setgid(myGlobals.groupId) != 0) || (setuid(myGlobals.userId) != 0)) { + if(setgid(myGlobals.groupId) != 0) { + traceEvent(CONST_TRACE_FATALERROR, "Unable to change user"); + exit(34); /* Just in case */ + } + if(setuid(myGlobals.userId) != 0) { traceEvent(CONST_TRACE_FATALERROR, "Unable to change user"); exit(34); /* Just in case */ }
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