Commit 8b8d9fda authored by Ralph Boehme's avatar Ralph Boehme

winbindd: Route predefined domains through the BUILTIN domain child

Without this eg "NT Authority" didn't work:

  $ bin/wbinfo -n "NT Authority/Authenticated Users"
  failed to call wbcLookupName: WBC_ERR_DOMAIN_NOT_FOUND
  Could not lookup name NT Authority/Authenticated Users

  $ bin/wbinfo --group-info="NT Authority/Authenticated Users"
  failed to call wbcGetgrnam: WBC_ERR_DOMAIN_NOT_FOUND
  Could not get info for group NT Authority/Authenticated Users

With the patch:

  $ bin/wbinfo -n "NT Authority/Authenticated Users"
  S-1-5-11 SID_WKN_GROUP (5)

  $ bin/wbinfo --group-info="NT Authority/Authenticated Users"
  NT AUTHORITY\authenticated users:x:10002:

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12164Signed-off-by: default avatarRalph Boehme <slow@samba.org>
Reviewed-by: default avatarDavid Mulder <dmulder@suse.com>
Reviewed-by: default avatarAndreas Schneider <asn@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Dec  5 11:27:22 CET 2018 on sn-devel-144
parent b512a58b
^samba.blackbox.wbinfo\(.*\).wbinfo -n NT Authority/Authenticated Users\(.*\)
^samba.blackbox.wbinfo\(.*\).wbinfo --group-info NT Authority/Authenticated Users\(.*\)
...@@ -1504,6 +1504,8 @@ struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid) ...@@ -1504,6 +1504,8 @@ struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid)
struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name) struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name)
{ {
bool predefined;
if ( strequal(domain_name, unix_users_domain_name() ) || if ( strequal(domain_name, unix_users_domain_name() ) ||
strequal(domain_name, unix_groups_domain_name() ) ) strequal(domain_name, unix_groups_domain_name() ) )
{ {
...@@ -1519,6 +1521,11 @@ struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name) ...@@ -1519,6 +1521,11 @@ struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name)
return find_domain_from_name_noinit(domain_name); return find_domain_from_name_noinit(domain_name);
} }
predefined = dom_sid_lookup_is_predefined_domain(domain_name);
if (predefined) {
return find_domain_from_name_noinit(builtin_domain_name());
}
if (IS_DC) { if (IS_DC) {
struct winbindd_domain *domain = NULL; struct winbindd_domain *domain = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment