From: Volker Lendecke Date: Thu, 23 Sep 2004 15:21:02 +0000 (+0000) Subject: r2566: Fix creation of aliases via usrmgr. Winbind was too strict checking the type X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~5768 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d3b2921a8fd86beb77eae45ef9cf1a846a93b199;p=thirdparty%2Fsamba.git r2566: Fix creation of aliases via usrmgr. Winbind was too strict checking the type of sids. Volker --- diff --git a/source/nsswitch/winbindd_sid.c b/source/nsswitch/winbindd_sid.c index c6e503bef39..97e676813dd 100644 --- a/source/nsswitch/winbindd_sid.c +++ b/source/nsswitch/winbindd_sid.c @@ -316,8 +316,16 @@ enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state) fstring dom_name, name; enum SID_NAME_USE type; - if (!winbindd_lookup_name_by_sid(&sid, dom_name, name, &type)) - return WINBINDD_ERROR; + if (sid_check_is_in_our_domain(&sid)) { + /* This is for half-created aliases... */ + type = SID_NAME_ALIAS; + } else { + /* Foreign domains need to be looked up by the DC if + * it's the right type */ + if (!winbindd_lookup_name_by_sid(&sid, dom_name, name, + &type)) + return WINBINDD_ERROR; + } if ((type != SID_NAME_DOM_GRP) && (type != SID_NAME_ALIAS) && (type != SID_NAME_WKN_GRP))