svn commit: samba r2062 - in branches/SAMBA_4_0/source: libads torture

abartlet at samba.org abartlet at samba.org
Wed Aug 25 10:21:15 GMT 2004


Author: abartlet
Date: 2004-08-25 10:21:14 +0000 (Wed, 25 Aug 2004)
New Revision: 2062

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=2062&nolog=1

Log:
Fix a couple more of the printf warnings (real bugs).

You should never pass a non-constant string as a format for a printf()
function - it could contain printf macros, and these need to be
checked.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libads/config.m4
   branches/SAMBA_4_0/source/torture/gentest.c
   branches/SAMBA_4_0/source/torture/torture_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/libads/config.m4
===================================================================
--- branches/SAMBA_4_0/source/libads/config.m4	2004-08-25 09:22:47 UTC (rev 2061)
+++ branches/SAMBA_4_0/source/libads/config.m4	2004-08-25 10:21:14 UTC (rev 2062)
@@ -201,6 +201,9 @@
   ac_save_CPPFLAGS=$CPPFLAGS
   ac_save_LDFLAGS=$LDFLAGS
 
+#MIT needs this, to let us see 'internal' parts of the headers we use
+  KRB5_CFLAGS="${KRB5_CFLAGS} -DKRB5_PRIVATE -DKRB5_DEPRECATED"
+
   CFLAGS="$CFLAGS $KRB5_CFLAGS"
   CPPFLAGS="$CPPFLAGS $KRB5_CPPFLAGS"
   LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"

Modified: branches/SAMBA_4_0/source/torture/gentest.c
===================================================================
--- branches/SAMBA_4_0/source/torture/gentest.c	2004-08-25 09:22:47 UTC (rev 2061)
+++ branches/SAMBA_4_0/source/torture/gentest.c	2004-08-25 10:21:14 UTC (rev 2062)
@@ -1913,7 +1913,7 @@
 		current_op.opnum = op;
 		current_op.name = gen_ops[which_op].name;
 		current_op.status = NT_STATUS_OK;
-		current_op.mem_ctx = talloc_init(current_op.name);
+		current_op.mem_ctx = talloc_init("%s", current_op.name);
 
 		ret = gen_ops[which_op].handler(instance);
 

Modified: branches/SAMBA_4_0/source/torture/torture_util.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture_util.c	2004-08-25 09:22:47 UTC (rev 2061)
+++ branches/SAMBA_4_0/source/torture/torture_util.c	2004-08-25 10:21:14 UTC (rev 2062)
@@ -251,7 +251,7 @@
 */
 void torture_all_info(struct smbcli_tree *tree, const char *fname)
 {
-	TALLOC_CTX *mem_ctx = talloc_init(fname);
+	TALLOC_CTX *mem_ctx = talloc_init("%s", fname);
 	union smb_fileinfo finfo;
 	NTSTATUS status;
 



More information about the samba-cvs mailing list