From f8345c1b18904169666955c98474fa2d5894a007 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Oct 2004 00:41:41 +0000 Subject: r3273: Ensure we're consistent in the use of strchr_m for '@'. Jeremy. (This used to be commit 0f3f7b035b37bfc51d3a59d0472003c3d4ac1511) --- source3/libads/ldap.c | 2 +- source3/utils/net_ads.c | 4 ++-- source3/utils/ntlm_auth.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index e5d2dfb8d3..749274298f 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -2261,7 +2261,7 @@ char *ads_pull_username(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, void *msg) breaks winbindd_getpwnam() */ ret = ads_pull_string(ads, mem_ctx, msg, "userPrincipalName"); - if (ret && (p = strchr(ret, '@'))) { + if (ret && (p = strchr_m(ret, '@'))) { *p = 0; return ret; } diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 19311cde65..2202ee11e2 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -169,7 +169,7 @@ retry: * extract the realm and convert to upper case. * This is only used to establish the connection. */ - if ((cp = strchr(ads->auth.user_name, '@'))!=0) { + if ((cp = strchr_m(ads->auth.user_name, '@'))!=0) { *cp++ = '\0'; ads->auth.realm = smb_xstrdup(cp); strupper_m(ads->auth.realm); @@ -1126,7 +1126,7 @@ static int net_ads_password(int argc, const char **argv) } use_in_memory_ccache(); - c = strchr(auth_principal, '@'); + c = strchr_m(auth_principal, '@'); if (c) { realm = ++c; } else { diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index b2c155dfb2..8296ccb5fb 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -920,7 +920,7 @@ static void manage_gss_spnego_request(enum stdio_helper_mode stdio_helper_mode, if (NT_STATUS_IS_OK(status)) { - domain = strchr(principal, '@'); + domain = strchr_m(principal, '@'); if (domain == NULL) { DEBUG(1, ("Did not get a valid principal " -- cgit