summaryrefslogtreecommitdiff
path: root/src/nm-iface-helper.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-03-13 20:57:18 +0100
committerThomas Haller <thaller@redhat.com>2015-03-20 11:43:30 +0100
commit95786a4e4e307dfd2c961280e65d16d5138050d6 (patch)
treef8dccf6b71905b18ea49dba311e1faf37c34a2b7 /src/nm-iface-helper.c
parent3696c675fe9fd17efe04d89ef0944de3dff8fd4f (diff)
downloadNetworkManager-95786a4e4e307dfd2c961280e65d16d5138050d6.tar.gz
main: (order) move root user check after help/version option
With this change, `NetworkManager --help` and `NetworkManager --version` work for non-root user.
Diffstat (limited to 'src/nm-iface-helper.c')
-rw-r--r--src/nm-iface-helper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nm-iface-helper.c b/src/nm-iface-helper.c
index 803ee54291..d26e05665c 100644
--- a/src/nm-iface-helper.c
+++ b/src/nm-iface-helper.c
@@ -367,6 +367,8 @@ main (int argc, char *argv[])
exit (0);
}
+ nm_main_utils_ensure_root ();
+
if (!global_opt.ifname || !global_opt.uuid) {
fprintf (stderr, _("An interface name and UUID are required\n"));
exit (1);