diff options
author | Gerald Carter <jerry@samba.org> | 2004-09-24 20:28:34 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-09-24 20:28:34 +0000 |
commit | 943c0aaaeb5a24a9501a164e9a765384e8e8a2ff (patch) | |
tree | ebeb18d97005c843bfe12a6e9931885c9efe8378 /source/nsswitch | |
parent | d82a5ff54ebc9e127f06cd1228d3f952728e23c9 (diff) | |
download | samba-943c0aaaeb5a24a9501a164e9a765384e8e8a2ff.tar.gz samba-943c0aaaeb5a24a9501a164e9a765384e8e8a2ff.tar.xz samba-943c0aaaeb5a24a9501a164e9a765384e8e8a2ff.zip |
r2606: adding missing commits :-(samba-3.0.8pre1samba-3.0.7
Diffstat (limited to 'source/nsswitch')
-rw-r--r-- | source/nsswitch/winbindd_sid.c | 12 |
1 files changed, 10 insertions, 2 deletions
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)) |