diff options
author | Andy Zhou <azhou@nicira.com> | 2015-09-11 11:26:39 -0700 |
---|---|---|
committer | Andy Zhou <azhou@nicira.com> | 2015-09-30 20:43:46 -0700 |
commit | e91b927d8966bfcb9768225392324dde4fd7d7f6 (patch) | |
tree | 334d464fd03deaf90bb298124913851226fc8de1 /ovsdb/ovsdb-server.c | |
parent | 1bbebfb7afadac4adf209cf7f7ab69655479638b (diff) | |
download | openvswitch-e91b927d8966bfcb9768225392324dde4fd7d7f6.tar.gz |
lib/daemon: support --user option for all OVS daemon
OVS daemons can now support --user option to run as a non-root
user with less privileges.
See the manpage patch for more descriptions.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ovsdb/ovsdb-server.c')
-rw-r--r-- | ovsdb/ovsdb-server.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index 4088d8544..0c34820de 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -221,6 +221,7 @@ main(int argc, char *argv[]) process_init(); parse_options(&argc, &argv, &remotes, &unixctl_path, &run_command); + daemon_become_new_user(false); /* Create and initialize 'config_tmpfile' as a temporary file to hold * ovsdb-server's most basic configuration, and then save our initial @@ -248,7 +249,7 @@ main(int argc, char *argv[]) save_config__(config_tmpfile, &remotes, &db_filenames); - daemonize_start(); + daemonize_start(false); /* Load the saved config. */ load_config(config_tmpfile, &remotes, &db_filenames); |