r3273: Ensure we're consistent in the use of strchr_m for '@'.
authorJeremy Allison <jra@samba.org>
Wed, 27 Oct 2004 00:41:41 +0000 (00:41 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:03 +0000 (10:53 -0500)
Jeremy.

source/libads/ldap.c
source/utils/net_ads.c
source/utils/ntlm_auth.c

index e5d2dfb8d3f2d9c68b562771c239e74ac2220755..749274298f105611870e9bedd3e5ad9aaca85877 100644 (file)
@@ -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;
        }
index 19311cde6547ded8f650b258a2d9a31443269991..2202ee11e2fb0a0676043d0d2074ee3aaff221fa 100644 (file)
@@ -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 {
index b2c155dfb2aa51a8017b5cb3b134cebcb3e56d07..8296ccb5fba896c54a50903432c5cf65696ba453 100644 (file)
@@ -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 "