summaryrefslogtreecommitdiff
path: root/source3/utils/net.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-04-19 06:04:17 +0000
committerGerald Carter <jerry@samba.org>2003-04-19 06:04:17 +0000
commit0676a942f933685184626db24b3caca57d910310 (patch)
treeae965ddca0bce2d9f369f394825ed2b53b40a380 /source3/utils/net.c
parent7d1ea0987d6d756fb3ceaf14c87676b3ae8d4d9b (diff)
downloadsamba-0676a942f933685184626db24b3caca57d910310.tar.gz
samba-0676a942f933685184626db24b3caca57d910310.tar.bz2
samba-0676a942f933685184626db24b3caca57d910310.zip
[merge from SAMBA_3_0]
Merging smbgroupedit into 'net groupmap'. Not entirely done. Need to check on where the privilege code is sitting and update the docs. Examples: root# bin/net help groupmap net groupmap add Create a new group mapping net groupmap modify Update a group mapping net groupmap delete Remove a group mapping net groupmap list List current group map # bin/net groupmap add Usage: net groupmap add rid=<int> name=<string> type=<domain|local|builtin> [comment=<string>] # bin/net groupmap delete Usage: net groupmap delete name=<string|SID> # bin/net groupmap modify Usage: net groupmap modify name=<string|SID> [comment=<string>] [type=<domain|local>] (This used to be commit 0fd28bc3a803ca1ec3dcd8cc6236d4ecc3134584)
Diffstat (limited to 'source3/utils/net.c')
-rw-r--r--source3/utils/net.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index a2ce1f5f1a..b404bac595 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -348,6 +348,26 @@ static int net_file(int argc, const char **argv)
return net_rap_file(argc, argv);
}
+/***********************************************************
+ migrated functionality from smbgroupedit
+ **********************************************************/
+static int net_groupmap(int argc, const char **argv)
+{
+ if ( 0 == argc )
+ return net_help_groupmap( argc, argv );
+
+ if ( !StrCaseCmp( argv[0], "add" ) )
+ return net_groupmap_add(argc-1, argv+1);
+ else if ( !StrCaseCmp( argv[0], "modify" ) )
+ return net_groupmap_modify(argc-1, argv+1);
+ else if ( !StrCaseCmp( argv[0], "delete" ) )
+ return net_groupmap_delete(argc-1, argv+1);
+ else if ( !StrCaseCmp( argv[0], "list" ) )
+ return net_groupmap_list(argc-1, argv+1);
+
+ return net_help_groupmap( argc, argv );
+}
+
/*
Retrieve our local SID or the SID for the specified name
*/
@@ -509,6 +529,7 @@ static struct functable net_func[] = {
{"PRINTQ", net_rap_printq},
{"USER", net_user},
{"GROUP", net_group},
+ {"GROUPMAP", net_groupmap},
{"VALIDATE", net_rap_validate},
{"GROUPMEMBER", net_rap_groupmember},
{"ADMIN", net_rap_admin},