From 4830a878455fe0e525aa3bd2a59e55d1f30bddad Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 21 Jun 2003 23:35:12 +0000 Subject: (fixing bug in my last commit) This isn't C++ - start your code *after* all the variables are declared... Andrew Bartlett (This used to be commit b7760faedc2181538ffc325e727808e6df8f943f) --- source3/utils/net_groupmap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/utils/net_groupmap.c') diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c index c9c37a68c2..590a005e17 100644 --- a/source3/utils/net_groupmap.c +++ b/source3/utils/net_groupmap.c @@ -486,12 +486,6 @@ int net_help_groupmap(int argc, const char **argv) **********************************************************/ int net_groupmap(int argc, const char **argv) { - /* we shouldn't have silly checks like this */ - if (getuid() != 0) { - d_printf("You must be root to edit group mappings.\nExiting...\n"); - return -1; - } - struct functable func[] = { {"add", net_groupmap_add}, {"modify", net_groupmap_modify}, @@ -501,6 +495,12 @@ int net_groupmap(int argc, const char **argv) {NULL, NULL} }; + /* we shouldn't have silly checks like this */ + if (getuid() != 0) { + d_printf("You must be root to edit group mappings.\nExiting...\n"); + return -1; + } + return net_run_function(argc, argv, func, net_help_groupmap); if ( 0 == argc ) return net_help_groupmap( argc, argv ); -- cgit