summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-06-21 23:35:12 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-06-21 23:35:12 +0000
commit4830a878455fe0e525aa3bd2a59e55d1f30bddad (patch)
tree39814a0f241692f7ecf98f4a3abb6a7449d709c5 /source3
parentcc59bbfdea6f30b8dc8f1fc14353d15f02816aa3 (diff)
downloadsamba-4830a878455fe0e525aa3bd2a59e55d1f30bddad.tar.gz
samba-4830a878455fe0e525aa3bd2a59e55d1f30bddad.tar.bz2
samba-4830a878455fe0e525aa3bd2a59e55d1f30bddad.zip
(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)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_groupmap.c12
1 files changed, 6 insertions, 6 deletions
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 );