Author: vlendec Date: 2004-10-03 17:44:43 +0000 (Sun, 03 Oct 2004) New Revision: 2810
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source/nsswitch&rev=2810&nolog=1 Log: Janitor work: ------------------------------------------------------------------------ r2566 | vlendec | 2004-09-23 17:21:02 +0200 (Thu, 23 Sep 2004) | 5 lines Fix creation of aliases via usrmgr. Winbind was too strict checking the type of sids. Volker Modified: trunk/source/nsswitch/winbindd_sid.c Changeset: Modified: trunk/source/nsswitch/winbindd_sid.c =================================================================== --- trunk/source/nsswitch/winbindd_sid.c 2004-10-03 17:27:17 UTC (rev 2809) +++ trunk/source/nsswitch/winbindd_sid.c 2004-10-03 17:44:43 UTC (rev 2810) @@ -316,8 +316,16 @@ 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))