|
|
6729ff |
From 09692988bc382c3fd01e51e88818b29d5265cc57 Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Fri, 15 Nov 2013 17:02:12 +0100
|
|
|
6729ff |
Subject: [PATCH 02/10] s3-libsmb: Use the right macro to set uint16_t attr.
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
(cherry picked from commit f8ab594d0253920cefc441587a55fddb688be550)
|
|
|
6729ff |
---
|
|
|
6729ff |
source3/libsmb/cli_smb2_fnum.c | 2 +-
|
|
|
6729ff |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
|
|
|
6729ff |
index 202000f..c3feef6 100644
|
|
|
6729ff |
--- a/source3/libsmb/cli_smb2_fnum.c
|
|
|
6729ff |
+++ b/source3/libsmb/cli_smb2_fnum.c
|
|
|
6729ff |
@@ -1290,7 +1290,7 @@ NTSTATUS cli_smb2_setatr(struct cli_state *cli,
|
|
|
6729ff |
inbuf.length = sizeof(inbuf_store);
|
|
|
6729ff |
data_blob_clear(&inbuf);
|
|
|
6729ff |
|
|
|
6729ff |
- SIVAL(inbuf.data,32,attr);
|
|
|
6729ff |
+ SSVAL(inbuf.data, 32, attr);
|
|
|
6729ff |
if (mtime != 0) {
|
|
|
6729ff |
put_long_date((char *)inbuf.data + 16,mtime);
|
|
|
6729ff |
}
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.4.3
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From a4732fa9ab8414e79a73bcac7d69147da75ae8c5 Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Fri, 15 Nov 2013 17:02:13 +0100
|
|
|
6729ff |
Subject: [PATCH 03/10] testsuit: Fix fprintf format.
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
(cherry picked from commit 69b3a0cb3f2736e98c20dabb43c201af0c004f67)
|
|
|
6729ff |
---
|
|
|
6729ff |
testsuite/nsswitch/getgrent_r.c | 2 +-
|
|
|
6729ff |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/testsuite/nsswitch/getgrent_r.c b/testsuite/nsswitch/getgrent_r.c
|
|
|
6729ff |
index 4f1f0ce..883c897 100644
|
|
|
6729ff |
--- a/testsuite/nsswitch/getgrent_r.c
|
|
|
6729ff |
+++ b/testsuite/nsswitch/getgrent_r.c
|
|
|
6729ff |
@@ -32,7 +32,7 @@ void dump_grent(char *id)
|
|
|
6729ff |
setgrent();
|
|
|
6729ff |
|
|
|
6729ff |
while((gr = getgrent()) != NULL) {
|
|
|
6729ff |
- fprintf(fptr,"%s:%s:%d:%d\n", gr->gr_name, gr->gr_passwd,
|
|
|
6729ff |
+ fprintf(fptr,"%s:%s:%d\n", gr->gr_name, gr->gr_passwd,
|
|
|
6729ff |
gr->gr_gid);
|
|
|
6729ff |
}
|
|
|
6729ff |
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.4.3
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From 1ff739972f7d8feb864a4d3cf595e49d37636082 Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Fri, 15 Nov 2013 17:02:14 +0100
|
|
|
6729ff |
Subject: [PATCH 04/10] s3-utils: Fix scanf format in smbacls.
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
(cherry picked from commit 4c98b9ce8f8de5883796aa38f1193e04a0ee4e58)
|
|
|
6729ff |
---
|
|
|
6729ff |
source3/utils/smbcacls.c | 6 +++---
|
|
|
6729ff |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
|
|
|
6729ff |
index 3ee7034..bb02aa0 100644
|
|
|
6729ff |
--- a/source3/utils/smbcacls.c
|
|
|
6729ff |
+++ b/source3/utils/smbcacls.c
|
|
|
6729ff |
@@ -490,7 +490,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
|
|
|
6729ff |
p++;
|
|
|
6729ff |
/* Try to parse numeric form */
|
|
|
6729ff |
|
|
|
6729ff |
- if (sscanf(p, "%i/%i/%i", &atype, &aflags, &amask) == 3 &&
|
|
|
6729ff |
+ if (sscanf(p, "%u/%u/%u", &atype, &aflags, &amask) == 3 &&
|
|
|
6729ff |
StringToSid(cli, &sid, str)) {
|
|
|
6729ff |
goto done;
|
|
|
6729ff |
}
|
|
|
6729ff |
@@ -553,7 +553,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
|
|
|
6729ff |
return False;
|
|
|
6729ff |
}
|
|
|
6729ff |
} else {
|
|
|
6729ff |
- if (!sscanf(tok, "%i", &aflags)) {
|
|
|
6729ff |
+ if (!sscanf(tok, "%u", &aflags)) {
|
|
|
6729ff |
printf("ACE '%s': bad integer flags entry at '%s'\n",
|
|
|
6729ff |
orig_str, tok);
|
|
|
6729ff |
SAFE_FREE(str);
|
|
|
6729ff |
@@ -571,7 +571,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
|
|
|
6729ff |
}
|
|
|
6729ff |
|
|
|
6729ff |
if (strncmp(tok, "0x", 2) == 0) {
|
|
|
6729ff |
- if (sscanf(tok, "%i", &amask) != 1) {
|
|
|
6729ff |
+ if (sscanf(tok, "%u", &amask) != 1) {
|
|
|
6729ff |
printf("ACE '%s': bad hex number at '%s'\n",
|
|
|
6729ff |
orig_str, tok);
|
|
|
6729ff |
SAFE_FREE(str);
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.4.3
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From b22ff03654cf781a982580a41bcec99b2c25a5f2 Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Fri, 15 Nov 2013 17:02:15 +0100
|
|
|
6729ff |
Subject: [PATCH 05/10] s3-utils: Fix scanf format in sharesec.
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
(cherry picked from commit 278899f5a763af7e7603f05f07048b7d8d4e9972)
|
|
|
6729ff |
---
|
|
|
6729ff |
source3/utils/sharesec.c | 6 +++---
|
|
|
6729ff |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c
|
|
|
6729ff |
index 38c11e0..2b1e435 100644
|
|
|
6729ff |
--- a/source3/utils/sharesec.c
|
|
|
6729ff |
+++ b/source3/utils/sharesec.c
|
|
|
6729ff |
@@ -186,7 +186,7 @@ static bool parse_ace(struct security_ace *ace, const char *orig_str)
|
|
|
6729ff |
p++;
|
|
|
6729ff |
/* Try to parse numeric form */
|
|
|
6729ff |
|
|
|
6729ff |
- if (sscanf(p, "%i/%i/%i", &atype, &aflags, &amask) == 3 &&
|
|
|
6729ff |
+ if (sscanf(p, "%u/%u/%u", &atype, &aflags, &amask) == 3 &&
|
|
|
6729ff |
string_to_sid(&sid, str)) {
|
|
|
6729ff |
goto done;
|
|
|
6729ff |
}
|
|
|
6729ff |
@@ -226,7 +226,7 @@ static bool parse_ace(struct security_ace *ace, const char *orig_str)
|
|
|
6729ff |
/* no flags on share permissions */
|
|
|
6729ff |
|
|
|
6729ff |
if (!(next_token_talloc(frame, &cp, &tok, "/") &&
|
|
|
6729ff |
- sscanf(tok, "%i", &aflags) && aflags == 0)) {
|
|
|
6729ff |
+ sscanf(tok, "%u", &aflags) && aflags == 0)) {
|
|
|
6729ff |
fprintf(stderr, "ACE '%s': bad integer flags entry at '%s'\n",
|
|
|
6729ff |
orig_str, tok);
|
|
|
6729ff |
SAFE_FREE(str);
|
|
|
6729ff |
@@ -243,7 +243,7 @@ static bool parse_ace(struct security_ace *ace, const char *orig_str)
|
|
|
6729ff |
}
|
|
|
6729ff |
|
|
|
6729ff |
if (strncmp(tok, "0x", 2) == 0) {
|
|
|
6729ff |
- if (sscanf(tok, "%i", &amask) != 1) {
|
|
|
6729ff |
+ if (sscanf(tok, "%u", &amask) != 1) {
|
|
|
6729ff |
fprintf(stderr, "ACE '%s': bad hex number at '%s'\n",
|
|
|
6729ff |
orig_str, tok);
|
|
|
6729ff |
TALLOC_FREE(frame);
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.4.3
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From 3f8b5b50e6ed56241ee92f9d26f0c4b6d0166db2 Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Fri, 15 Nov 2013 17:02:16 +0100
|
|
|
6729ff |
Subject: [PATCH 06/10] s3-libsmb: Fix scanf format in parse_ace().
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
(cherry picked from commit 1214e3345c655a4c7dc98c69c4e018e47558f639)
|
|
|
6729ff |
---
|
|
|
6729ff |
source3/libsmb/libsmb_xattr.c | 6 +++---
|
|
|
6729ff |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
|
|
|
6729ff |
index 22ffa8f..7d34290 100644
|
|
|
6729ff |
--- a/source3/libsmb/libsmb_xattr.c
|
|
|
6729ff |
+++ b/source3/libsmb/libsmb_xattr.c
|
|
|
6729ff |
@@ -303,7 +303,7 @@ parse_ace(struct cli_state *ipc_cli,
|
|
|
6729ff |
p++;
|
|
|
6729ff |
/* Try to parse numeric form */
|
|
|
6729ff |
|
|
|
6729ff |
- if (sscanf(p, "%i/%i/%i", &atype, &aflags, &amask) == 3 &&
|
|
|
6729ff |
+ if (sscanf(p, "%u/%u/%u", &atype, &aflags, &amask) == 3 &&
|
|
|
6729ff |
convert_string_to_sid(ipc_cli, pol, numeric, &sid, str)) {
|
|
|
6729ff |
goto done;
|
|
|
6729ff |
}
|
|
|
6729ff |
@@ -333,7 +333,7 @@ parse_ace(struct cli_state *ipc_cli,
|
|
|
6729ff |
/* Only numeric form accepted for flags at present */
|
|
|
6729ff |
|
|
|
6729ff |
if (!(next_token_talloc(frame, &cp, &tok, "/") &&
|
|
|
6729ff |
- sscanf(tok, "%i", &aflags))) {
|
|
|
6729ff |
+ sscanf(tok, "%u", &aflags))) {
|
|
|
6729ff |
TALLOC_FREE(frame);
|
|
|
6729ff |
return false;
|
|
|
6729ff |
}
|
|
|
6729ff |
@@ -344,7 +344,7 @@ parse_ace(struct cli_state *ipc_cli,
|
|
|
6729ff |
}
|
|
|
6729ff |
|
|
|
6729ff |
if (strncmp(tok, "0x", 2) == 0) {
|
|
|
6729ff |
- if (sscanf(tok, "%i", &amask) != 1) {
|
|
|
6729ff |
+ if (sscanf(tok, "%u", &amask) != 1) {
|
|
|
6729ff |
TALLOC_FREE(frame);
|
|
|
6729ff |
return false;
|
|
|
6729ff |
}
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.4.3
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From 502d63223e4fd77152ea095c7d94774d093c9c4a Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Fri, 15 Nov 2013 17:02:17 +0100
|
|
|
6729ff |
Subject: [PATCH 07/10] examples: Fix scanf format in perf_writer_disk.
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
(cherry picked from commit f71b5e44e7a705096e4fdd7aa3d0e22df994e363)
|
|
|
6729ff |
---
|
|
|
6729ff |
examples/perfcounter/perf_writer_disk.c | 8 ++++----
|
|
|
6729ff |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/examples/perfcounter/perf_writer_disk.c b/examples/perfcounter/perf_writer_disk.c
|
|
|
6729ff |
index 15188d2..18a63a4 100644
|
|
|
6729ff |
--- a/examples/perfcounter/perf_writer_disk.c
|
|
|
6729ff |
+++ b/examples/perfcounter/perf_writer_disk.c
|
|
|
6729ff |
@@ -132,7 +132,7 @@ void get_diskinfo(PERF_DATA_BLOCK *data)
|
|
|
6729ff |
int status, num;
|
|
|
6729ff |
char buf[LARGE_BUF], *start;
|
|
|
6729ff |
FILE *diskstats;
|
|
|
6729ff |
- long reads, writes, discard;
|
|
|
6729ff |
+ unsigned long reads, writes, discard;
|
|
|
6729ff |
|
|
|
6729ff |
diskstats = fopen("/proc/diskstats", "r");
|
|
|
6729ff |
rewind(diskstats);
|
|
|
6729ff |
@@ -147,10 +147,10 @@ void get_diskinfo(PERF_DATA_BLOCK *data)
|
|
|
6729ff |
p->freeMegs = (statfsbuf.f_bfree*statfsbuf.f_bsize)/1048576;
|
|
|
6729ff |
start = strstr(buf, data->diskInfo.mdata[i].name);
|
|
|
6729ff |
start += strlen(data->diskInfo.mdata[i].name) + 1;
|
|
|
6729ff |
- num = sscanf(start, "%u %u %u %u",
|
|
|
6729ff |
+ num = sscanf(start, "%lu %lu %lu %lu",
|
|
|
6729ff |
&reads,
|
|
|
6729ff |
- &discard,
|
|
|
6729ff |
- &writes,
|
|
|
6729ff |
+ &discard,
|
|
|
6729ff |
+ &writes,
|
|
|
6729ff |
&discard);
|
|
|
6729ff |
p->writesPerSec = writes;
|
|
|
6729ff |
p->readsPerSec = reads;
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.4.3
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From f636ca86e3cb4b61960c3db927760b6de3776365 Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Fri, 15 Nov 2013 17:02:18 +0100
|
|
|
6729ff |
Subject: [PATCH 08/10] s3-vfs: Remove unused variable in vfs_glusterfs.
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
(cherry picked from commit 9e7e83e9d07e967ac966b1cc17f21cb75c81a774)
|
|
|
6729ff |
---
|
|
|
6729ff |
source3/modules/vfs_glusterfs.c | 1 -
|
|
|
6729ff |
1 file changed, 1 deletion(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
|
|
|
6729ff |
index e5c691e..d792fb3 100644
|
|
|
6729ff |
--- a/source3/modules/vfs_glusterfs.c
|
|
|
6729ff |
+++ b/source3/modules/vfs_glusterfs.c
|
|
|
6729ff |
@@ -1397,7 +1397,6 @@ static int vfs_gluster_sys_acl_set_fd(struct vfs_handle_struct *handle,
|
|
|
6729ff |
SMB_ACL_T theacl)
|
|
|
6729ff |
{
|
|
|
6729ff |
int ret;
|
|
|
6729ff |
- char *key;
|
|
|
6729ff |
char *buf;
|
|
|
6729ff |
ssize_t size;
|
|
|
6729ff |
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.4.3
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From ea3bc968082c8fbb18d9416143c9fe8a56d691fa Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Fri, 15 Nov 2013 17:02:19 +0100
|
|
|
6729ff |
Subject: [PATCH 09/10] s3-vfs: Make glfs_set_preopened() static.
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
(cherry picked from commit 4deb00a60f484824217a9683ec9cc2838deae8e0)
|
|
|
6729ff |
---
|
|
|
6729ff |
source3/modules/vfs_glusterfs.c | 2 +-
|
|
|
6729ff |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
|
|
|
6729ff |
index d792fb3..ca7d790 100644
|
|
|
6729ff |
--- a/source3/modules/vfs_glusterfs.c
|
|
|
6729ff |
+++ b/source3/modules/vfs_glusterfs.c
|
|
|
6729ff |
@@ -145,7 +145,7 @@ static struct glfs_preopened {
|
|
|
6729ff |
} *glfs_preopened;
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
-int glfs_set_preopened(const char *volume, glfs_t *fs)
|
|
|
6729ff |
+static int glfs_set_preopened(const char *volume, glfs_t *fs)
|
|
|
6729ff |
{
|
|
|
6729ff |
struct glfs_preopened *entry = NULL;
|
|
|
6729ff |
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.4.3
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From 22264b8b9578f85e457e99c5b18739ea92854189 Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Fri, 15 Nov 2013 17:02:20 +0100
|
|
|
6729ff |
Subject: [PATCH 10/10] s3-libnet: Use a const char for realm.
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
|
|
|
6729ff |
Autobuild-User(master): Jeremy Allison <jra@samba.org>
|
|
|
6729ff |
Autobuild-Date(master): Fri Nov 15 23:11:54 CET 2013 on sn-devel-104
|
|
|
6729ff |
|
|
|
6729ff |
(cherry picked from commit d02d70251f98ea2e7db4aea36f372cb0f65c04c5)
|
|
|
6729ff |
---
|
|
|
6729ff |
source3/libnet/libnet_join.c | 2 +-
|
|
|
6729ff |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
|
|
|
6729ff |
index 96f7a98..7edccd1 100644
|
|
|
6729ff |
--- a/source3/libnet/libnet_join.c
|
|
|
6729ff |
+++ b/source3/libnet/libnet_join.c
|
|
|
6729ff |
@@ -449,7 +449,7 @@ static ADS_STATUS libnet_join_set_machine_upn(TALLOC_CTX *mem_ctx,
|
|
|
6729ff |
}
|
|
|
6729ff |
|
|
|
6729ff |
if (!r->in.upn) {
|
|
|
6729ff |
- char *realm = r->out.dns_domain_name;
|
|
|
6729ff |
+ const char *realm = r->out.dns_domain_name;
|
|
|
6729ff |
|
|
|
6729ff |
/* in case we are about to generate a keytab during the join
|
|
|
6729ff |
* make sure the default upn we create is usable with kinit -k.
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.4.3
|
|
|
6729ff |
|