winbind: Remove find_builtin_domain helper function
authorVolker Lendecke <vl@samba.org>
Fri, 30 Dec 2016 11:51:37 +0000 (11:51 +0000)
committerVolker Lendecke <vl@samba.org>
Mon, 2 Jan 2017 20:52:02 +0000 (21:52 +0100)
There was only one caller, and the function was pretty small anyway.

This makes a "git grep find_domain_from" more obvious :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan  2 21:52:02 CET 2017 on sn-devel-144

source3/winbindd/wb_gettoken.c
source3/winbindd/winbindd_proto.h
source3/winbindd/winbindd_util.c

index 1386c7d8d3fe8a22bb3ad48255d96d10a1657703..1c99121bb0906e6c5c2c31c7d14c5dc9caf0fb88 100644 (file)
@@ -159,7 +159,7 @@ static void wb_gettoken_gotlocalgroups(struct tevent_req *subreq)
         * Now expand the builtin groups
         */
 
-       domain = find_builtin_domain();
+       domain = find_domain_from_sid(&global_sid_Builtin);
        if (domain == NULL) {
                tevent_req_nterror(req, NT_STATUS_INTERNAL_ERROR);
                return;
index a2810c9c0b57aede412de90cb53dea4b1aba157c..2b6f26e0315c0e78ccca203de640c20e5e46aa47 100644 (file)
@@ -483,7 +483,6 @@ struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
 struct winbindd_domain *find_our_domain(void);
 struct winbindd_domain *find_root_domain(void);
-struct winbindd_domain *find_builtin_domain(void);
 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);
 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
index bd9403f0a958495b5cab0af459ba4ee5b7740d21..ffcb09d66f79bfc907b204c7a3329882b2fbd150 100644 (file)
@@ -994,18 +994,6 @@ struct winbindd_domain *find_root_domain(void)
        return find_domain_from_name( ours->forest_name );
 }
 
-struct winbindd_domain *find_builtin_domain(void)
-{
-       struct winbindd_domain *domain;
-
-       domain = find_domain_from_sid(&global_sid_Builtin);
-       if (domain == NULL) {
-               smb_panic("Could not find BUILTIN domain");
-       }
-
-       return domain;
-}
-
 /* Find the appropriate domain to lookup a name or SID */
 
 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid)