diff options
author | Gerald Carter <jerry@samba.org> | 2003-04-22 18:05:13 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-04-22 18:05:13 +0000 |
commit | 3130622e81da37ac4d193781ba41dee1b5836381 (patch) | |
tree | e0180b1bfd1afe68570188a239191620474db7cc /source3 | |
parent | f2f1df690571513dfed521f147ee2110281262a4 (diff) | |
download | samba-3130622e81da37ac4d193781ba41dee1b5836381.tar.gz samba-3130622e81da37ac4d193781ba41dee1b5836381.tar.bz2 samba-3130622e81da37ac4d193781ba41dee1b5836381.zip |
don't reset the group type unless specified
(This used to be commit cb852a047413a3499fde68a353011afdcaa92ef2)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_groupmap.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c index 2436fffc6d..63e69fa7cf 100644 --- a/source3/utils/net_groupmap.c +++ b/source3/utils/net_groupmap.c @@ -370,20 +370,14 @@ int net_groupmap_modify(int argc, const char **argv) * Allow changing of group type only between domain and local * We disallow changing Builtin groups !!! (SID problem) */ - if (sid_type==SID_NAME_ALIAS - || sid_type==SID_NAME_DOM_GRP - || sid_type==SID_NAME_UNKNOWN) - { - if (map.sid_name_use==SID_NAME_ALIAS - || map.sid_name_use==SID_NAME_DOM_GRP - || map.sid_name_use==SID_NAME_UNKNOWN) - { - map.sid_name_use=sid_type; - } else { - printf("cannot change group type to builtin\n"); - }; - } else { - printf("cannot change group type from builtin\n"); + if ( sid_type != SID_NAME_UNKNOWN ) + { + if ( map.sid_name_use == SID_NAME_WKN_GRP ) { + d_printf("You can only change between domain and local groups.\n"); + return -1; + } + + map.sid_name_use=sid_type; } /* Change comment if new one */ |