s3/swat: use strlcat instead of strncat to fix build on old Linux distros v3-3-test
authorBjörn Jacke <bj@sernet.de>
Thu, 4 Aug 2011 14:25:08 +0000 (16:25 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 9 Aug 2011 11:53:25 +0000 (13:53 +0200)
SLES 9's glibc for example had weird macros where the use of strncat resulted
in the use of strcat which we don't allow.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Thu Aug  4 17:50:24 CEST 2011 on sn-devel-104

Fix bug #8362 (build issue on old glibc systems).

source/web/swat.c

index bc2497f9bbffdacbe4100bd911f8b3708ad0774a..21e33e1422721c0af69d4ec0f69f15f885cc135d 100644 (file)
@@ -167,7 +167,7 @@ void get_xsrf_token(const char *username, const char *pass,
                char tmp[3];
 
                snprintf(tmp, sizeof(tmp), "%02x", token[i]);
-               strncat(token_str, tmp, sizeof(tmp));
+               strlcat(token_str, tmp, sizeof(tmp));
        }
 }