From: Volker Lendecke Date: Tue, 13 Jan 2015 11:51:13 +0000 (+0100) Subject: net: Fix sam addgroupmem X-Git-Tag: samba-4.0.26~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03299a23d82f653917a6df31e8bb786c26f5eb1b;p=thirdparty%2Fsamba.git net: Fix sam addgroupmem Domain local groups come across as SID_TYPE_ALIAS and are sent to us in the PAC/Info3 struct. We should allow this in net sam addgroupmem. Volker Signed-off-by: Volker Lendecke Reviewed-by: Guenther Deschner Bug: https://bugzilla.samba.org/show_bug.cgi?id=11051 Autobuild-User(master): Günther Deschner Autobuild-Date(master): Tue Jan 13 15:28:16 CET 2015 on sn-devel-104 --- diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c index b1c4e9b8c48..c4f43264a1e 100644 --- a/source3/utils/net_sam.c +++ b/source3/utils/net_sam.c @@ -1216,10 +1216,12 @@ static int net_sam_addmem(struct net_context *c, int argc, const char **argv) if ((grouptype == SID_NAME_ALIAS) || (grouptype == SID_NAME_WKN_GRP)) { if ((membertype != SID_NAME_USER) && + (membertype != SID_NAME_ALIAS) && (membertype != SID_NAME_DOM_GRP)) { - d_fprintf(stderr, _("%s is a local group, only users " - "and domain groups can be added.\n" - "%s is a %s\n"), argv[0], argv[1], + d_fprintf(stderr, _("Can't add %s: only users, domain " + "groups and domain local groups " + "can be added. %s is a %s\n"), + argv[0], argv[1], sid_type_lookup(membertype)); return -1; }