diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-09-23 15:21:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:46 -0500 |
commit | 5fe0142ec8084746b5805e278ee0effe620da5e6 (patch) | |
tree | fa4cb7db3508c87cac36f3bfa3719c5fee70c7bc | |
parent | e8e5e99309ce89e4b75646fb5e8cb3cc6d048eb9 (diff) | |
download | samba-5fe0142ec8084746b5805e278ee0effe620da5e6.tar.gz samba-5fe0142ec8084746b5805e278ee0effe620da5e6.tar.bz2 samba-5fe0142ec8084746b5805e278ee0effe620da5e6.zip |
r2566: Fix creation of aliases via usrmgr. Winbind was too strict checking the type
of sids.
Volker
(This used to be commit d3b2921a8fd86beb77eae45ef9cf1a846a93b199)
-rw-r--r-- | source3/nsswitch/winbindd_sid.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_sid.c b/source3/nsswitch/winbindd_sid.c index c6e503bef3..97e676813d 100644 --- a/source3/nsswitch/winbindd_sid.c +++ b/source3/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)) |