Blame SOURCES/radvd-no_dac_override.patch
|
|
0a66c8 |
diff --git a/radvd.c b/radvd.c
|
|
|
0a66c8 |
index 07a64a1..9f86cf6 100644
|
|
|
0a66c8 |
--- a/radvd.c
|
|
|
0a66c8 |
+++ b/radvd.c
|
|
|
0a66c8 |
@@ -346,6 +346,15 @@ int main(int argc, char *argv[])
|
|
|
0a66c8 |
flog(LOG_WARNING, "IPv6 forwarding seems to be disabled, but continuing anyway");
|
|
|
0a66c8 |
}
|
|
|
0a66c8 |
|
|
|
0a66c8 |
+ if (username) {
|
|
|
0a66c8 |
+ if (drop_root_privileges(username) < 0) {
|
|
|
0a66c8 |
+ perror("drop_root_privileges");
|
|
|
0a66c8 |
+ flog(LOG_ERR, "unable to drop root privileges");
|
|
|
0a66c8 |
+ exit(1);
|
|
|
0a66c8 |
+ }
|
|
|
0a66c8 |
+ dlog(LOG_DEBUG, 3, "running as user: %s", username);
|
|
|
0a66c8 |
+ }
|
|
|
0a66c8 |
+
|
|
|
0a66c8 |
int const pidfd = open_and_lock_pid_file(daemon_pid_file_ident);
|
|
|
0a66c8 |
|
|
|
0a66c8 |
/*
|
|
|
0a66c8 |
@@ -421,15 +430,6 @@ int main(int argc, char *argv[])
|
|
|
0a66c8 |
}
|
|
|
0a66c8 |
#endif
|
|
|
0a66c8 |
|
|
|
0a66c8 |
- if (username) {
|
|
|
0a66c8 |
- if (drop_root_privileges(username) < 0) {
|
|
|
0a66c8 |
- perror("drop_root_privileges");
|
|
|
0a66c8 |
- flog(LOG_ERR, "unable to drop root privileges");
|
|
|
0a66c8 |
- exit(1);
|
|
|
0a66c8 |
- }
|
|
|
0a66c8 |
- dlog(LOG_DEBUG, 3, "running as user: %s", username);
|
|
|
0a66c8 |
- }
|
|
|
0a66c8 |
-
|
|
|
0a66c8 |
setup_ifaces(sock, ifaces);
|
|
|
0a66c8 |
ifaces = main_loop(sock, ifaces, conf_path);
|
|
|
0a66c8 |
stop_adverts(sock, ifaces);
|