s3/swat: use strlcat instead of strncat to fix build on old Linux distros
authorBjörn Jacke <bj@sernet.de>
Thu, 4 Aug 2011 14:25:08 +0000 (16:25 +0200)
committerBjoern Jacke <bj@sernet.de>
Thu, 4 Aug 2011 15:50:24 +0000 (17:50 +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

source3/web/swat.c

index f95546678e033c40fe05d09300b8a75c3e2cc8f1..69d9fec64fdd35f038a5fc8d58fc995a4b0dfb66 100644 (file)
@@ -175,7 +175,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));
        }
 }