[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Jan 18 21:18:01 UTC 2022


The branch, master has been updated
       via  ec6d28e7290 smbd: Remove a duplicate protoype
       via  12ca34115ea lib: Remove unused asprintf_strupper_m()
       via  6bcdd3460a2 winbindd: Replace asprintf() with talloc_asprintf()
       via  3b6b12a19fc libads: Convert sitename_key() to talloc
       via  84e53769382 net: Align a few integer types
       via  ac12207e15c libsmb: Avoid a cast
       via  4d5c1509bea smbd: Align a few integer types
       via  232a1fa46af smbd: Fix a typo
       via  a7fe22fd7f4 torture3: Align two integer types
       via  a924e2cb203 rpc_host: We have tevent_req_oom() for ENOMEM
       via  87325613962 lib: Remove unused tstream_npa_socketpair()
       via  07101587599 lib: Save a few lines with str_list_add_printf()
       via  5ef5d1d4e56 lib: Save a few lines with str_list_add_printf()
       via  2468f041212 smbd: Save a few lines with str_list_add_printf()
       via  6df560d353c printing: Save a few lines with str_list_add_printf()
       via  114116b659d profile3: remove an unused include
      from  19d9504b1b3 s4:kdc: improve DEBUG messages in samba_wdc_reget_pac2()

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ec6d28e7290783da92cb8d9ee492e831ac7ed959
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 16 21:50:25 2022 +0100

    smbd: Remove a duplicate protoype
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Jan 18 21:17:43 UTC 2022 on sn-devel-184

commit 12ca34115eabbb430cd0b01afeaaebfac76174d3
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 16 21:23:56 2022 +0100

    lib: Remove unused asprintf_strupper_m()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6bcdd3460a29a5b4e84290d963bfe1a3941adc69
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 16 21:21:00 2022 +0100

    winbindd: Replace asprintf() with talloc_asprintf()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 3b6b12a19fc8bed2ee5a01fdf55be99c0297001e
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 16 21:16:02 2022 +0100

    libads: Convert sitename_key() to talloc
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 84e53769382f1f5e381df131e675c86f7aeba607
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 16 20:51:51 2022 +0100

    net: Align a few integer types
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ac12207e15c5483ef4a423221a1d7c104a4b9672
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 16 20:14:56 2022 +0100

    libsmb: Avoid a cast
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 4d5c1509bea058f434983da41fde014dae874187
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 2 19:33:07 2022 +0100

    smbd: Align a few integer types
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 232a1fa46af0b05ba12bf5edc944caeb4f919c38
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 8 16:36:51 2022 +0100

    smbd: Fix a typo
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a7fe22fd7f46a0db30e34ffc1ef400ebb321d096
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 8 16:29:58 2022 +0100

    torture3: Align two integer types
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a924e2cb203affa5b0224d9fb7234e9585c803ad
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jan 4 13:02:25 2022 +0100

    rpc_host: We have tevent_req_oom() for ENOMEM
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 87325613962ced1d58249e37a0375f0a3e857098
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jan 3 13:33:22 2022 +0100

    lib: Remove unused tstream_npa_socketpair()
    
    This was used in the pre samba-dcerpcd source3 rpc server.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 07101587599d87eefe91fd52d855f3c6bc284495
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jan 12 12:19:00 2022 +0100

    lib: Save a few lines with str_list_add_printf()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 5ef5d1d4e5653687805cc1d5811327ab99d1357b
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jan 12 12:15:08 2022 +0100

    lib: Save a few lines with str_list_add_printf()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 2468f0412127e391ed486a1541c5f87319fa34bf
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jan 12 12:12:50 2022 +0100

    smbd: Save a few lines with str_list_add_printf()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6df560d353c18bb8a6f22cbed877642b29c2265b
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jan 12 12:09:51 2022 +0100

    printing: Save a few lines with str_list_add_printf()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 114116b659dca81054801918f229380f041963cd
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jan 11 10:54:05 2022 -0500

    profile3: remove an unused include
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 libcli/named_pipe_auth/npa_tstream.c |  83 -----------------------------
 libcli/named_pipe_auth/npa_tstream.h |  10 ----
 source3/include/includes.h           |   1 -
 source3/include/proto.h              |   2 -
 source3/lib/sysquotas.c              | 100 ++++++++---------------------------
 source3/lib/util_str.c               |  26 ---------
 source3/libads/sitename_cache.c      |  20 +++----
 source3/libsmb/libsmb_xattr.c        |   2 +-
 source3/printing/print_svid.c        |  15 ++----
 source3/profile/profile.c            |   1 -
 source3/rpc_server/rpc_host.c        |   2 +-
 source3/smbd/dfree.c                 |  14 ++---
 source3/smbd/dir.c                   |   2 +-
 source3/smbd/proto.h                 |   1 -
 source3/smbd/trans2.c                |   6 +--
 source3/torture/torture.c            |  16 +++---
 source3/utils/net_registry_check.c   |   6 +--
 source3/winbindd/winbindd_util.c     |  20 ++++---
 18 files changed, 65 insertions(+), 262 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/named_pipe_auth/npa_tstream.c b/libcli/named_pipe_auth/npa_tstream.c
index 85d0aa482d3..506c4a35681 100644
--- a/libcli/named_pipe_auth/npa_tstream.c
+++ b/libcli/named_pipe_auth/npa_tstream.c
@@ -1388,86 +1388,3 @@ int _tstream_npa_accept_existing_recv(
 	tevent_req_received(req);
 	return 0;
 }
-
-
-/* SOCKETPAIR for internal rpc communication */
-
-/* file_type is FILE_TYPE_BYTE_MODE_PIPE or FILE_TYPE_MESSAGE_MODE_PIPE */
-int _tstream_npa_socketpair(uint16_t file_type,
-			    TALLOC_CTX *mem_ctx1,
-			    struct tstream_context **pstream1,
-			    TALLOC_CTX *mem_ctx2,
-			    struct tstream_context **pstream2,
-			    const char *location)
-{
-	struct tstream_context *stream1 = NULL;
-	struct tstream_context *stream2 = NULL;
-	int fds[2];
-	int fd1;
-	int fd2;
-	int rc;
-	bool ok;
-
-	rc = socketpair(AF_UNIX, SOCK_STREAM, 0, fds);
-	if (rc == -1) {
-		return -1;
-	}
-	fd1 = fds[0];
-	fd2 = fds[1];
-
-	ok = smb_set_close_on_exec(fd1);
-	if (!ok) {
-		goto close_fail;
-	}
-
-	ok = smb_set_close_on_exec(fd2);
-	if (!ok) {
-		goto close_fail;
-	}
-
-	rc = set_blocking(fd1, false);
-	if (rc == -1) {
-		goto close_fail;
-	}
-
-	rc = set_blocking(fd2, false);
-	if (rc == -1) {
-		goto close_fail;
-	}
-
-	rc = _tstream_npa_existing_socket(mem_ctx1,
-					  fd1,
-					  file_type,
-					  &stream1,
-					  location);
-	if (rc == -1) {
-		goto close_fail;
-	}
-
-	rc = _tstream_npa_existing_socket(mem_ctx2,
-					  fd2,
-					  file_type,
-					  &stream2,
-					  location);
-	if (rc == -1) {
-		int sys_errno = errno;
-		talloc_free(stream1);
-		close(fd2);
-		errno = sys_errno;
-		return -1;
-	}
-
-	*pstream1 = stream1;
-	*pstream2 = stream2;
-
-	return 0;
-
-close_fail:
-	{
-		int sys_errno = errno;
-		close(fd1);
-		close(fd2);
-		errno = sys_errno;
-		return -1;
-	}
-}
diff --git a/libcli/named_pipe_auth/npa_tstream.h b/libcli/named_pipe_auth/npa_tstream.h
index 5b08a40b672..1d7e93dc0fa 100644
--- a/libcli/named_pipe_auth/npa_tstream.h
+++ b/libcli/named_pipe_auth/npa_tstream.h
@@ -142,14 +142,4 @@ int _tstream_npa_accept_existing_recv(
 					  session_info, \
 					  __location__)
 
-int _tstream_npa_socketpair(uint16_t file_type,
-			    TALLOC_CTX *mem_ctx1,
-			    struct tstream_context **pstream1,
-			    TALLOC_CTX *mem_ctx2,
-			    struct tstream_context **pstream2,
-			    const char *location);
-#define tstream_npa_socketpair(ft, mem1, stream1, mem2, stream2) \
-	_tstream_npa_socketpair(ft, mem1, stream1, mem2, stream2, \
-				__location__)
-
 #endif /* NPA_TSTREAM_H */
diff --git a/source3/include/includes.h b/source3/include/includes.h
index c3d3d351e41..510a0b96539 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -341,7 +341,6 @@ int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3);
 /* PRINTFLIKE2 */
 int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
-int asprintf_strupper_m(char **strp, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
 /*
diff --git a/source3/include/proto.h b/source3/include/proto.h
index dba728b3d86..19a9c6b8a01 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -557,8 +557,6 @@ int fstr_sprintf(fstring s, const char *fmt, ...);
 
 uint64_t STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr);
 uint64_t conv_str_size(const char * str);
-int asprintf_strupper_m(char **strp, const char *fmt, ...)
-			PRINTF_ATTRIBUTE(2,3);
 char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...)
 				 PRINTF_ATTRIBUTE(2,3);
 char *talloc_asprintf_strlower_m(TALLOC_CTX *t, const char *fmt, ...)
diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c
index 6553cac40da..07d28d3a410 100644
--- a/source3/lib/sysquotas.c
+++ b/source3/lib/sysquotas.c
@@ -272,31 +272,14 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
 				return -1;
 		}
 
-		argl = talloc_zero_array(talloc_tos(), char *, 5);
+		argl = str_list_make_empty(talloc_tos());
+		str_list_add_printf(&argl, "%s", get_quota_command);
+		str_list_add_printf(&argl, "%s", path);
+		str_list_add_printf(&argl, "%d", qtype);
+		str_list_add_printf(&argl, "%d", _id);
 		if (argl == NULL) {
 			return -1;
 		}
-		argl[0] = talloc_strdup(argl, get_quota_command);
-		if (argl[0] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[1] = talloc_strdup(argl, path);
-		if (argl[1] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[2] = talloc_asprintf(argl, "%d", qtype);
-		if (argl[2] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[3] = talloc_asprintf(argl, "%d", _id);
-		if (argl[3] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[4] = NULL;
 
 		DBG_NOTICE("Running command %s %s %d %d\n",
 			get_quota_command,
@@ -449,66 +432,25 @@ static int command_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
 				return -1;
 		}
 
-		argl = talloc_zero_array(talloc_tos(), char *, 11);
+		argl = str_list_make_empty(talloc_tos());
+		str_list_add_printf(&argl, "%s", set_quota_command);
+		str_list_add_printf(&argl, "%s", path);
+		str_list_add_printf(&argl, "%d", qtype);
+		str_list_add_printf(&argl, "%d", _id);
+		str_list_add_printf(&argl, "%u", dp->qflags);
+		str_list_add_printf(
+			&argl, "%llu", (long long unsigned)dp->softlimit);
+		str_list_add_printf(
+			&argl, "%llu", (long long unsigned)dp->hardlimit);
+		str_list_add_printf(
+			&argl, "%llu", (long long unsigned)dp->isoftlimit);
+		str_list_add_printf(
+			&argl, "%llu", (long long unsigned)dp->ihardlimit);
+		str_list_add_printf(
+			&argl, "%llu", (long long unsigned)dp->bsize);
 		if (argl == NULL) {
 			return -1;
 		}
-		argl[0] = talloc_strdup(argl, set_quota_command);
-		if (argl[0] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[1] = talloc_strdup(argl, path);
-		if (argl[1] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[2] = talloc_asprintf(argl, "%d", qtype);
-		if (argl[2] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[3] = talloc_asprintf(argl, "%d", _id);
-		if (argl[3] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[4] = talloc_asprintf(argl, "%u", dp->qflags);
-		if (argl[4] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[5] = talloc_asprintf(argl, "%llu",
-				(long long unsigned)dp->softlimit);
-		if (argl[5] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[6] = talloc_asprintf(argl, "%llu",
-				(long long unsigned)dp->hardlimit);
-		if (argl[6] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[7] = talloc_asprintf(argl, "%llu",
-				(long long unsigned)dp->isoftlimit);
-		if (argl[7] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[8] = talloc_asprintf(argl, "%llu",
-				(long long unsigned)dp->ihardlimit);
-		if (argl[8] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[9] = talloc_asprintf(argl, "%llu",
-				(long long unsigned)dp->bsize);
-		if (argl[9] == NULL) {
-			TALLOC_FREE(argl);
-			return -1;
-		}
-		argl[10] = NULL;
 
 		DBG_NOTICE("Running command "
 			"%s %s %d %d "
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 3c687dc28e8..b1ed43669c0 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -523,32 +523,6 @@ uint64_t conv_str_size(const char * str)
 	return lval;
 }
 
-/*
- * asprintf into a string and strupper_m it after that.
- */
-
-int asprintf_strupper_m(char **strp, const char *fmt, ...)
-{
-	va_list ap;
-	char *result;
-	int ret;
-
-	va_start(ap, fmt);
-	ret = vasprintf(&result, fmt, ap);
-	va_end(ap);
-
-	if (ret == -1)
-		return -1;
-
-	if (!strupper_m(result)) {
-		SAFE_FREE(result);
-		return -1;
-	}
-
-	*strp = result;
-	return ret;
-}
-
 char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...)
 {
 	va_list ap;
diff --git a/source3/libads/sitename_cache.c b/source3/libads/sitename_cache.c
index 549d5890354..885d30ab936 100644
--- a/source3/libads/sitename_cache.c
+++ b/source3/libads/sitename_cache.c
@@ -28,14 +28,10 @@
 
 #define SITENAME_KEY	"AD_SITENAME/DOMAIN/%s"
 
-static char *sitename_key(const char *realm)
+static char *sitename_key(TALLOC_CTX *mem_ctx, const char *realm)
 {
-	char *keystr;
-
-	if (asprintf_strupper_m(&keystr, SITENAME_KEY, realm) == -1) {
-		return NULL;
-	}
-
+	char *keystr = talloc_asprintf_strupper_m(
+		mem_ctx, SITENAME_KEY, realm);
 	return keystr;
 }
 
@@ -56,12 +52,12 @@ bool sitename_store(const char *realm, const char *sitename)
 		return False;
 	}
 
-	key = sitename_key(realm);
+	key = sitename_key(talloc_tos(), realm);
 
 	if (!sitename || (sitename && !*sitename)) {
 		DEBUG(5,("sitename_store: deleting empty sitename!\n"));
 		ret = gencache_del(key);
-		SAFE_FREE(key);
+		TALLOC_FREE(key);
 		return ret;
 	}
 
@@ -71,7 +67,7 @@ bool sitename_store(const char *realm, const char *sitename)
 		realm, sitename, (unsigned int)expire ));
 
 	ret = gencache_set( key, sitename, expire );
-	SAFE_FREE(key);
+	TALLOC_FREE(key);
 	return ret;
 }
 
@@ -94,10 +90,10 @@ char *sitename_fetch(TALLOC_CTX *mem_ctx, const char *realm)
 		query_realm = realm;
 	}
 
-	key = sitename_key(query_realm);
+	key = sitename_key(talloc_tos(), query_realm);
 
 	ret = gencache_get( key, mem_ctx, &sitename, &timeout );
-	SAFE_FREE(key);
+	TALLOC_FREE(key);
 	if ( !ret ) {
 		DBG_INFO("No stored sitename for realm '%s'\n", query_realm);
 	} else {
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index c53093d8ff7..d66ea63617c 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -2077,7 +2077,7 @@ SMBC_getxattr_ctx(SMBCCTX *context,
 		return -1;
         }
 
-        if (!user || user[0] == (char)0) {
+        if (!user || user[0] == '\0') {
 		user = talloc_strdup(frame, smbc_getUser(context));
 		if (!user) {
 			errno = ENOMEM;
diff --git a/source3/printing/print_svid.c b/source3/printing/print_svid.c
index d20fdad88e3..4006323c051 100644
--- a/source3/printing/print_svid.c
+++ b/source3/printing/print_svid.c
@@ -49,21 +49,12 @@ bool sysv_cache_reload(struct pcap_cache **_pcache)
 	DEBUG(5, ("reloading sysv printcap cache\n"));
 #endif
 
-	argl = talloc_zero_array(talloc_tos(), char *, 3);
+	argl = str_list_make_empty(talloc_tos());
+	str_list_add_printf(&argl, "/usr/bin/lpstat");
+	str_list_add_printf(&argl, "-v");
 	if (argl == NULL) {
 		return false;
 	}
-	argl[0] = talloc_strdup(argl, "/usr/bin/lpstat");
-	if (argl[0] == NULL) {
-		TALLOC_FREE(argl);
-		return false;
-	}
-	argl[1] = talloc_strdup(argl, "-v");
-	if (argl[1] == NULL) {
-		TALLOC_FREE(argl);
-		return false;
-	}
-	argl[2] = NULL;
 
 	lines = file_lines_ploadv(talloc_tos(), argl, NULL);
 	if (lines == NULL) {
diff --git a/source3/profile/profile.c b/source3/profile/profile.c
index 7e17d065d75..a18ee45dab8 100644
--- a/source3/profile/profile.c
+++ b/source3/profile/profile.c
@@ -20,7 +20,6 @@
 */
 
 #include "includes.h"
-#include "system/shmem.h"
 #include "system/filesys.h"
 #include "system/time.h"
 #include "messages.h"
diff --git a/source3/rpc_server/rpc_host.c b/source3/rpc_server/rpc_host.c
index c76546af517..4a370f96e65 100644
--- a/source3/rpc_server/rpc_host.c
+++ b/source3/rpc_server/rpc_host.c
@@ -998,7 +998,7 @@ static struct tevent_req *rpc_host_bind_read_send(
 		peer_addr,
 		&state->client->npa_info5);
 	if (!NT_STATUS_IS_OK(status)) {
-		tevent_req_error(req, ENOMEM);
+		tevent_req_oom(req);
 		return tevent_req_post(req, ev);
 	}
 
diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c
index d083ce22797..236ca888150 100644
--- a/source3/smbd/dfree.c
+++ b/source3/smbd/dfree.c
@@ -80,21 +80,13 @@ static uint64_t sys_disk_free(connection_struct *conn,
 		char **lines = NULL;
 		char **argl = NULL;
 
-		argl = talloc_zero_array(talloc_tos(),
-					char *,
-					3);
+		argl = str_list_make_empty(talloc_tos());
+		str_list_add_printf(&argl, "%s", dfree_command);
+		str_list_add_printf(&argl, "%s", path);
 		if (argl == NULL) {
 			return (uint64_t)-1;
 		}
 
-		argl[0] = talloc_strdup(argl, dfree_command);
-		if (argl[0] == NULL) {
-			TALLOC_FREE(argl);
-			return (uint64_t)-1;
-		}
-		argl[1] = path;
-		argl[2] = NULL;
-
 		DBG_NOTICE("Running command '%s %s'\n",
 			dfree_command,
 			path);
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 3bf2f79f3fa..8e5ce66c961 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -478,7 +478,7 @@ static char *dptr_ReadDirName(TALLOC_CTX *ctx,
 		}
 	}
 
-	/* Stat failed. We know this is authoratiative if we are
+	/* Stat failed. We know this is authoritative if we are
 	 * providing case sensitive semantics or the underlying
 	 * filesystem is case sensitive.
 	 */
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 0a73c82bad3..c802b05a78f 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -1195,7 +1195,6 @@ NTSTATUS get_ea_names_from_fsp(TALLOC_CTX *mem_ctx,
 			size_t *pnum_names);
 NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
 		struct ea_list *ea_list);
-struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used);
 void send_trans2_replies(connection_struct *conn,
 			struct smb_request *req,
 			NTSTATUS status,
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index ab8e6e7fe68..a4ff1844e64 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3996,7 +3996,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
 		{
 			uint32_t flags = 0;
 			uint32_t sid_bytes;
-			int i;
+			uint32_t i;
 
 			if (!lp_unix_extensions()) {
 				return NT_STATUS_INVALID_LEVEL;
@@ -4677,7 +4677,7 @@ static const struct {unsigned stat_fflag; unsigned smb_fflag;}
 static void map_info2_flags_from_sbuf(const SMB_STRUCT_STAT *psbuf,
 				uint32_t *smb_fflags, uint32_t *smb_fmask)
 {
-	int i;
+	size_t i;
 
 	for (i = 0; i < ARRAY_SIZE(info2_flags_map); ++i) {
 	    *smb_fmask |= info2_flags_map[i].smb_fflag;
@@ -4693,7 +4693,7 @@ static bool map_info2_flags_to_sbuf(const SMB_STRUCT_STAT *psbuf,
 				int *stat_fflags)


-- 
Samba Shared Repository



More information about the samba-cvs mailing list