Blob Blame History Raw
From 09692988bc382c3fd01e51e88818b29d5265cc57 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Nov 2013 17:02:12 +0100
Subject: [PATCH 02/10] s3-libsmb: Use the right macro to set uint16_t attr.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f8ab594d0253920cefc441587a55fddb688be550)
---
 source3/libsmb/cli_smb2_fnum.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index 202000f..c3feef6 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -1290,7 +1290,7 @@ NTSTATUS cli_smb2_setatr(struct cli_state *cli,
 	inbuf.length = sizeof(inbuf_store);
 	data_blob_clear(&inbuf);
 
-	SIVAL(inbuf.data,32,attr);
+	SSVAL(inbuf.data, 32, attr);
 	if (mtime != 0) {
 		put_long_date((char *)inbuf.data + 16,mtime);
 	}
-- 
1.8.4.3


From a4732fa9ab8414e79a73bcac7d69147da75ae8c5 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Nov 2013 17:02:13 +0100
Subject: [PATCH 03/10] testsuit: Fix fprintf format.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 69b3a0cb3f2736e98c20dabb43c201af0c004f67)
---
 testsuite/nsswitch/getgrent_r.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuite/nsswitch/getgrent_r.c b/testsuite/nsswitch/getgrent_r.c
index 4f1f0ce..883c897 100644
--- a/testsuite/nsswitch/getgrent_r.c
+++ b/testsuite/nsswitch/getgrent_r.c
@@ -32,7 +32,7 @@ void dump_grent(char *id)
     setgrent();
         
     while((gr = getgrent()) != NULL) {
-        fprintf(fptr,"%s:%s:%d:%d\n", gr->gr_name, gr->gr_passwd,
+        fprintf(fptr,"%s:%s:%d\n", gr->gr_name, gr->gr_passwd,
                 gr->gr_gid);
     }
         
-- 
1.8.4.3


From 1ff739972f7d8feb864a4d3cf595e49d37636082 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Nov 2013 17:02:14 +0100
Subject: [PATCH 04/10] s3-utils: Fix scanf format in smbacls.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 4c98b9ce8f8de5883796aa38f1193e04a0ee4e58)
---
 source3/utils/smbcacls.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 3ee7034..bb02aa0 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -490,7 +490,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
 	p++;
 	/* Try to parse numeric form */
 
-	if (sscanf(p, "%i/%i/%i", &atype, &aflags, &amask) == 3 &&
+	if (sscanf(p, "%u/%u/%u", &atype, &aflags, &amask) == 3 &&
 	    StringToSid(cli, &sid, str)) {
 		goto done;
 	}
@@ -553,7 +553,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
 			return False;
 		}
 	} else {
-		if (!sscanf(tok, "%i", &aflags)) {
+		if (!sscanf(tok, "%u", &aflags)) {
 			printf("ACE '%s': bad integer flags entry at '%s'\n",
 				orig_str, tok);
 			SAFE_FREE(str);
@@ -571,7 +571,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
 	}
 
 	if (strncmp(tok, "0x", 2) == 0) {
-		if (sscanf(tok, "%i", &amask) != 1) {
+		if (sscanf(tok, "%u", &amask) != 1) {
 			printf("ACE '%s': bad hex number at '%s'\n",
 				orig_str, tok);
 			SAFE_FREE(str);
-- 
1.8.4.3


From b22ff03654cf781a982580a41bcec99b2c25a5f2 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Nov 2013 17:02:15 +0100
Subject: [PATCH 05/10] s3-utils: Fix scanf format in sharesec.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 278899f5a763af7e7603f05f07048b7d8d4e9972)
---
 source3/utils/sharesec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c
index 38c11e0..2b1e435 100644
--- a/source3/utils/sharesec.c
+++ b/source3/utils/sharesec.c
@@ -186,7 +186,7 @@ static bool parse_ace(struct security_ace *ace, const char *orig_str)
 	p++;
 	/* Try to parse numeric form */
 
-	if (sscanf(p, "%i/%i/%i", &atype, &aflags, &amask) == 3 &&
+	if (sscanf(p, "%u/%u/%u", &atype, &aflags, &amask) == 3 &&
 	    string_to_sid(&sid, str)) {
 		goto done;
 	}
@@ -226,7 +226,7 @@ static bool parse_ace(struct security_ace *ace, const char *orig_str)
 	/* no flags on share permissions */
 
 	if (!(next_token_talloc(frame, &cp, &tok, "/") &&
-	      sscanf(tok, "%i", &aflags) && aflags == 0)) {
+	      sscanf(tok, "%u", &aflags) && aflags == 0)) {
 		fprintf(stderr, "ACE '%s': bad integer flags entry at '%s'\n",
 			orig_str, tok);
 		SAFE_FREE(str);
@@ -243,7 +243,7 @@ static bool parse_ace(struct security_ace *ace, const char *orig_str)
 	}
 
 	if (strncmp(tok, "0x", 2) == 0) {
-		if (sscanf(tok, "%i", &amask) != 1) {
+		if (sscanf(tok, "%u", &amask) != 1) {
 			fprintf(stderr, "ACE '%s': bad hex number at '%s'\n",
 				orig_str, tok);
 			TALLOC_FREE(frame);
-- 
1.8.4.3


From 3f8b5b50e6ed56241ee92f9d26f0c4b6d0166db2 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Nov 2013 17:02:16 +0100
Subject: [PATCH 06/10] s3-libsmb: Fix scanf format in parse_ace().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 1214e3345c655a4c7dc98c69c4e018e47558f639)
---
 source3/libsmb/libsmb_xattr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 22ffa8f..7d34290 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -303,7 +303,7 @@ parse_ace(struct cli_state *ipc_cli,
 	p++;
 	/* Try to parse numeric form */
 
-	if (sscanf(p, "%i/%i/%i", &atype, &aflags, &amask) == 3 &&
+	if (sscanf(p, "%u/%u/%u", &atype, &aflags, &amask) == 3 &&
 	    convert_string_to_sid(ipc_cli, pol, numeric, &sid, str)) {
 		goto done;
 	}
@@ -333,7 +333,7 @@ parse_ace(struct cli_state *ipc_cli,
 	/* Only numeric form accepted for flags at present */
 
 	if (!(next_token_talloc(frame, &cp, &tok, "/") &&
-	      sscanf(tok, "%i", &aflags))) {
+	      sscanf(tok, "%u", &aflags))) {
 		TALLOC_FREE(frame);
 		return false;
 	}
@@ -344,7 +344,7 @@ parse_ace(struct cli_state *ipc_cli,
 	}
 
 	if (strncmp(tok, "0x", 2) == 0) {
-		if (sscanf(tok, "%i", &amask) != 1) {
+		if (sscanf(tok, "%u", &amask) != 1) {
 			TALLOC_FREE(frame);
 			return false;
 		}
-- 
1.8.4.3


From 502d63223e4fd77152ea095c7d94774d093c9c4a Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Nov 2013 17:02:17 +0100
Subject: [PATCH 07/10] examples: Fix scanf format in perf_writer_disk.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f71b5e44e7a705096e4fdd7aa3d0e22df994e363)
---
 examples/perfcounter/perf_writer_disk.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/perfcounter/perf_writer_disk.c b/examples/perfcounter/perf_writer_disk.c
index 15188d2..18a63a4 100644
--- a/examples/perfcounter/perf_writer_disk.c
+++ b/examples/perfcounter/perf_writer_disk.c
@@ -132,7 +132,7 @@ void get_diskinfo(PERF_DATA_BLOCK *data)
 	int status, num;
 	char buf[LARGE_BUF], *start;
 	FILE *diskstats;
-	long reads, writes, discard;
+	unsigned long reads, writes, discard;
 
 	diskstats = fopen("/proc/diskstats", "r");
 	rewind(diskstats);
@@ -147,10 +147,10 @@ void get_diskinfo(PERF_DATA_BLOCK *data)
 		p->freeMegs = (statfsbuf.f_bfree*statfsbuf.f_bsize)/1048576;
 		start = strstr(buf, data->diskInfo.mdata[i].name);
 		start += strlen(data->diskInfo.mdata[i].name) + 1;
-		num = sscanf(start, "%u %u %u %u",
+		num = sscanf(start, "%lu %lu %lu %lu",
 			     &reads,
-			     &discard, 
-			     &writes, 
+			     &discard,
+			     &writes,
 			     &discard);
 		p->writesPerSec = writes;
 		p->readsPerSec = reads;
-- 
1.8.4.3


From f636ca86e3cb4b61960c3db927760b6de3776365 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Nov 2013 17:02:18 +0100
Subject: [PATCH 08/10] s3-vfs: Remove unused variable in vfs_glusterfs.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 9e7e83e9d07e967ac966b1cc17f21cb75c81a774)
---
 source3/modules/vfs_glusterfs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index e5c691e..d792fb3 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1397,7 +1397,6 @@ static int vfs_gluster_sys_acl_set_fd(struct vfs_handle_struct *handle,
 				      SMB_ACL_T theacl)
 {
 	int ret;
-	char *key;
 	char *buf;
 	ssize_t size;
 
-- 
1.8.4.3


From ea3bc968082c8fbb18d9416143c9fe8a56d691fa Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Nov 2013 17:02:19 +0100
Subject: [PATCH 09/10] s3-vfs: Make glfs_set_preopened() static.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 4deb00a60f484824217a9683ec9cc2838deae8e0)
---
 source3/modules/vfs_glusterfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index d792fb3..ca7d790 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -145,7 +145,7 @@ static struct glfs_preopened {
 } *glfs_preopened;
 
 
-int glfs_set_preopened(const char *volume, glfs_t *fs)
+static int glfs_set_preopened(const char *volume, glfs_t *fs)
 {
 	struct glfs_preopened *entry = NULL;
 
-- 
1.8.4.3


From 22264b8b9578f85e457e99c5b18739ea92854189 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Nov 2013 17:02:20 +0100
Subject: [PATCH 10/10] s3-libnet: Use a const char for realm.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov 15 23:11:54 CET 2013 on sn-devel-104

(cherry picked from commit d02d70251f98ea2e7db4aea36f372cb0f65c04c5)
---
 source3/libnet/libnet_join.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 96f7a98..7edccd1 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -449,7 +449,7 @@ static ADS_STATUS libnet_join_set_machine_upn(TALLOC_CTX *mem_ctx,
 	}
 
 	if (!r->in.upn) {
-		char *realm = r->out.dns_domain_name;
+		const char *realm = r->out.dns_domain_name;
 
 		/* in case we are about to generate a keytab during the join
 		 * make sure the default upn we create is usable with kinit -k.
-- 
1.8.4.3