Switch to unified view
a/upmpd/upmpd.cxx | b/upmpd/upmpd.cxx | ||
---|---|---|---|
... |
... |
||
1304 | } |
1304 | } |
1305 | 1305 | ||
1306 | if (geteuid() == 0) { |
1306 | if (geteuid() == 0) { |
1307 | // Need to rewrite pid, it may have changed with the daemon call |
1307 | // Need to rewrite pid, it may have changed with the daemon call |
1308 | pidfile.write_pid(); |
1308 | pidfile.write_pid(); |
1309 | setuid(runas); |
1309 | if (setuid(runas) < 0) { |
1310 | LOGFAT("Can't set my uid to " << runas << " current: " << geteuid() |
||
1311 | << endl); |
||
1312 | return 1; |
||
1313 | } |
||
1310 | } |
1314 | } |
1311 | 1315 | ||
1312 | // Initialize libupnpp, and check health |
1316 | // Initialize libupnpp, and check health |
1313 | LibUPnP *mylib = LibUPnP::getLibUPnP(true); |
1317 | LibUPnP *mylib = LibUPnP::getLibUPnP(true); |
1314 | if (!mylib) { |
1318 | if (!mylib) { |