]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove strtok_r() usage because is not available on all platforms
authorGuido Serassio <serassio@squid-cache.org>
Wed, 9 Jul 2008 13:15:32 +0000 (15:15 +0200)
committerGuido Serassio <serassio@squid-cache.org>
Wed, 9 Jul 2008 13:15:32 +0000 (15:15 +0200)
helpers/ntlm_auth/fakeauth/fakeauth_auth.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 6834a17..e557d0d
@@ -429,7 +429,10 @@ main(int argc, char *argv[])
                if (!ntlmDecodeAuth((struct ntlm_authenticate *) decoded, user, 256)) {
                    lc(user);
                    if (strip_domain_enabled) {
-                       strtok_r(user, "\\", &p);
+                       strtok(user, "\\");
+                       p = strtok(NULL, "\\");
+                       if (!p)
+                           p = user;
                        SEND2("AF %s", p);
                        } else {
                    SEND2("AF %s", user);