1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

(fixing bug in my last commit)

This isn't C++ - start your code *after* all the variables are declared...

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 0001-01-01 00:00:00 +00:00
parent 2ec8d1ff88
commit b7760faedc

View File

@ -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 );