[PATCH] net: Fix sam addgroupmem
Volker Lendecke
Volker.Lendecke at SerNet.DE
Tue Jan 13 04:58:27 MST 2015
Hi!
Things you find at a customer site :-)
Review&push appreciated!
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From e6e488d399864e9239c90e52b18265d2c47cde88 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 13 Jan 2015 12:51:13 +0100
Subject: [PATCH] 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 <vl at samba.org>
---
source3/utils/net_sam.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index 2ee9a91..f1cb0a4 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -1220,10 +1220,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;
}
--
1.9.1
More information about the samba-technical
mailing list