From ec621945670bc023ad4a849f2e9af4eb8c299c20 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 30 Dec 2016 11:51:37 +0000 Subject: [PATCH 1/1] winbind: Remove find_builtin_domain helper function 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 Reviewed-by: Uri Simchoni Reviewed-by: Andreas Schneider Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Mon Jan 2 21:52:02 CET 2017 on sn-devel-144 --- source3/winbindd/wb_gettoken.c | 2 +- source3/winbindd/winbindd_proto.h | 1 - source3/winbindd/winbindd_util.c | 12 ------------ 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/source3/winbindd/wb_gettoken.c b/source3/winbindd/wb_gettoken.c index 1386c7d8d3f..1c99121bb09 100644 --- a/source3/winbindd/wb_gettoken.c +++ b/source3/winbindd/wb_gettoken.c @@ -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; diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index a2810c9c0b5..2b6f26e0315 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -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); diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index bd9403f0a95..ffcb09d66f7 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -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) -- 2.34.1