From a1fb9f217659b0954ba0966f917de5276f86c85f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 19 Apr 2003 05:53:55 +0000 Subject: 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= name= type= [comment=] # bin/net groupmap delete Usage: net groupmap delete name= # bin/net groupmap modify Usage: net groupmap modify name= [comment=] [type= (This used to be commit f2fd0ab41ffbc0355db95529b6bda1b21aa4860a) --- source3/utils/net.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source3/utils/net.c') diff --git a/source3/utils/net.c b/source3/utils/net.c index 9d8441e649..67d3176b4d 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -327,6 +327,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 */ @@ -488,6 +508,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}, -- cgit