Author: jra
Date: 2004-10-27 00:41:39 +0000 (Wed, 27 Oct 2004)
New Revision: 3272

WebSVN: 
http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source&rev=3272&nolog=1

Log:
Ensure we're consistent in the use of strchr_m for '@'.
Jeremy.

Modified:
   trunk/source/libads/ldap.c
   trunk/source/utils/net_ads.c
   trunk/source/utils/ntlm_auth.c


Changeset:
Modified: trunk/source/libads/ldap.c
===================================================================
--- trunk/source/libads/ldap.c  2004-10-26 22:45:33 UTC (rev 3271)
+++ trunk/source/libads/ldap.c  2004-10-27 00:41:39 UTC (rev 3272)
@@ -2261,7 +2261,7 @@
           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;
        }

Modified: trunk/source/utils/net_ads.c
===================================================================
--- trunk/source/utils/net_ads.c        2004-10-26 22:45:33 UTC (rev 3271)
+++ trunk/source/utils/net_ads.c        2004-10-27 00:41:39 UTC (rev 3272)
@@ -169,7 +169,7 @@
         * 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);
@@ -1163,7 +1163,7 @@
        }
 
        use_in_memory_ccache();    
-       c = strchr(auth_principal, '@');
+       c = strchr_m(auth_principal, '@');
        if (c) {
                realm = ++c;
        } else {

Modified: trunk/source/utils/ntlm_auth.c
===================================================================
--- trunk/source/utils/ntlm_auth.c      2004-10-26 22:45:33 UTC (rev 3271)
+++ trunk/source/utils/ntlm_auth.c      2004-10-27 00:41:39 UTC (rev 3272)
@@ -920,7 +920,7 @@
 
                        if (NT_STATUS_IS_OK(status)) {
 
-                               domain = strchr(principal, '@');
+                               domain = strchr_m(principal, '@');
 
                                if (domain == NULL) {
                                        DEBUG(1, ("Did not get a valid principal "

Reply via email to