From c6fe21e138db6615b99eb5e708e54f7082edb5f7 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Sat, 21 Oct 2023 12:41:39 +0100 Subject: [PATCH] s3/winbindd: remove canonicalize_username_fstr not longer any callers to canonicalize_username_fstr so it can be removed Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett Reviewed-by: Andreas Schneider --- source3/winbindd/winbindd_proto.h | 4 ---- source3/winbindd/winbindd_util.c | 27 --------------------------- 2 files changed, 31 deletions(-) diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index bf96566edc2..5446aabd32f 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -547,10 +547,6 @@ bool canonicalize_username(TALLOC_CTX *mem_ctx, char **namespace, char **domain, char **user); -bool canonicalize_username_fstr(fstring username_inout, - fstring namespace, - fstring domain, - fstring user); char *fill_domain_username_talloc(TALLOC_CTX *ctx, const char *domain, const char *user, diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 49880111999..10e6a3c6958 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -1650,33 +1650,6 @@ fail: return false; } - -/* Ensure an incoming username from NSS is fully qualified. Replace the - incoming fstring with DOMAIN user. Returns the same - values as parse_domain_user() but also replaces the incoming username. - Used to ensure all names are fully qualified within winbindd. - Used by the NSS protocols of auth, chauthtok, logoff and ccache_ntlm_auth. - The protocol definitions of auth_crap, chng_pswd_auth_crap - really should be changed to use this instead of doing things - by hand. JRA. */ - -bool canonicalize_username_fstr(fstring username_inout, - fstring namespace, - fstring domain, - fstring user) -{ - bool ok; - - ok = parse_domain_user(username_inout, namespace, domain, user); - if (!ok) { - return False; - } - slprintf(username_inout, sizeof(fstring) - 1, "%s%c%s", - domain, *lp_winbind_separator(), - user); - return True; -} - /* Fill DOMAIN\\USERNAME entry accounting 'winbind use default domain' and 'winbind separator' options. -- 2.34.1