Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE12
dhcp
0020-dhcp-4.2.x-chown-server-leases.bnc868253.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch of Package dhcp
References: bnc#868253 --- dhcp-4.2.x/server/dhcpd.c +++ dhcp-4.2.x/server/dhcpd.c 2014/06/10 01:59:13 @@ -783,8 +783,19 @@ main(int argc, char **argv) { } #if defined (PARANOIA) - /* change uid to the specified one */ + /* ensure, the leases db is owned by the run user/group */ + if (set_gid || set_uid) { + char backfname[512]; + + chown(path_dhcpd_db, set_uid ? set_uid : -1, + set_gid ? set_gid : -1); + snprintf (backfname, sizeof backfname, "%s~", path_dhcpd_db); + chown(backfname, set_uid ? set_uid : -1, + set_gid ? set_gid : -1); + } + + /* change uid to the specified one */ if (set_gid) { /* setgroups is done, OK */ if (setgroups (0, (void *)0))
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