[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0-97-g807e284

Karolin Seeger kseeger at samba.org
Fri Jul 25 14:47:36 GMT 2008


The branch, v3-2-stable has been updated
       via  807e2842db8ac88798f454e7b32c52cb53229fc5 (commit)
       via  d1db27e6c94cb283fb70d6dbf531c65829d0f460 (commit)
       via  c61578fc7c9dce8f22695532ee26179ba35b6a8f (commit)
       via  62cce59822e3ae85d380e36b9c4c3f25f7a5f13a (commit)
       via  3c78a7ff2c43bd9764f5032a2525b9de71918b2a (commit)
       via  bfa173f1c8e03e31714fd9579ea0538f08c0369b (commit)
       via  9840c962ac62539eace7b0f5c6d0deb5ad655e87 (commit)
       via  4d33c78a0dc5c4d0edb5ce9da1fd900ff7995464 (commit)
      from  b11ed782653dc810fca19bf4f53c4518940611f9 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable


- Log -----------------------------------------------------------------
commit 807e2842db8ac88798f454e7b32c52cb53229fc5
Author: Karolin Seeger <kseeger at samba.org>
Date:   Fri Jul 25 16:31:27 2008 +0200

    WHATSNEW: Update changes since 3.2.0.
    
    Karolin
    (cherry picked from commit a1d0fb1f00432f3bc4d7175dbff1354724ea2b67)

commit d1db27e6c94cb283fb70d6dbf531c65829d0f460
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jul 25 12:08:03 2008 +0200

    Fix a race condition in winbind leading to a crash
    
    When SIGCHLD handling is delayed for some reason, sending a request to a child
    can fail early because the child has died already. In this case
    async_main_request_sent() directly called the continuation function without
    properly removing the malfunctioning child process and the requests in the
    queue. The next request would then crash in the DLIST_ADD_END() in
    async_request() because the request pending for the child had been
    talloc_free()'ed and yet still was referenced in the list.
    
    This one is *old*...
    
    Volker
    (cherry picked from commit 8691709626b0d461de91b8fc9d10c730d1f183dd)

commit c61578fc7c9dce8f22695532ee26179ba35b6a8f
Author: Karolin Seeger <kseeger at samba.org>
Date:   Wed Jul 23 17:07:56 2008 +0200

    talloc_string_sub2: Don't return NULL if src is empty.
    
    This fixes BUG #5635.
    
    Finished print jobs were not removed from the $PRINTER.tdb file if
    "printing=cups".
    
    In print_queue_update, talloc_string_sub2 is used to assemble the
    "lprm command". In the case of using "printing=cups", the default
    "lprm command" is an empty string. talloc_string_sub2 is called with
    this empty string and returns NULL which leads to exiting
    print_queue_update without doing the actual print queue update.
    
    Signed-off by Michael Adam <obnox at samba.org>
    (cherry picked from commit 03d66554d1bbd9d6c72a3dd5203e5305343c76b8)
    (cherry picked from commit c6ca0f7d462c51122ccb1068306410ccdbee7b00)

commit 62cce59822e3ae85d380e36b9c4c3f25f7a5f13a
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jul 24 18:13:20 2008 -0700

    If we're not allowing streams on this conn ptr,
    then don't allow create_file() to call down to
    create_file_unixpath() with a stream name.
    Jeremy.
    (cherry picked from commit 7f749a10eff0bb469e6eb50b02cb60fd65c23f9e)

commit 3c78a7ff2c43bd9764f5032a2525b9de71918b2a
Author: Andreas Schneider <anschneider at suse.de>
Date:   Mon Jul 21 11:52:10 2008 +0200

    Remove trailing withespace from wbinfo -m which breaks gdm auth.
    
    Signed-off-by: Andreas Schneider <anschneider at suse.de>
    (cherry picked from commit cdf10e6ee9faff42693bb39ede535cc6611a8fc9)

commit bfa173f1c8e03e31714fd9579ea0538f08c0369b
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jul 24 12:00:01 2008 -0700

    Remove test changes added in error.
    Jeremy.
    (cherry picked from commit 218ffbe3876dbd58f56e107819dec2e74f5d2f1a)

commit 9840c962ac62539eace7b0f5c6d0deb5ad655e87
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jul 24 11:56:20 2008 -0700

    Use sys_getgrnam not getgrnam. Pointed out by Herb.
    Jeremy.
    (cherry picked from commit 2518197d7f3833b5d85fe42b05b51d89fa69eb75)

commit 4d33c78a0dc5c4d0edb5ce9da1fd900ff7995464
Author: Herb Lewis <herb at samba.org>
Date:   Tue Jul 22 17:50:33 2008 -0700

    get rid of unused variable warnings when HAVE_IPV6 not defined
    (cherry picked from commit 2b5425efddfccb1010d082e6133cfdd79d72729e)

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

Summary of changes:
 WHATSNEW.txt                    |    7 +++++++
 examples/libsmbclient/Makefile  |    2 +-
 source/lib/util_sock.c          |    4 ++--
 source/lib/util_str.c           |    2 +-
 source/nsswitch/wbinfo.c        |    9 +++++----
 source/passdb/util_unixsids.c   |   10 +++++-----
 source/smbd/open.c              |    5 +++++
 source/winbindd/winbindd_dual.c |    7 +++----
 8 files changed, 29 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 17f0180..88bee81 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -7,6 +7,7 @@ This is the second stable release of Samba 3.2.
 
 Major bug fixes included in Samba 3.2.1 are:
 
+  o Race condition in Winbind leading to a crash.
   o Regression in Winbindd offline mode.
   o Flushing of smb.conf when creating a new share using SWAT.
   o Setting of ACEs in setups with "dos filemode = yes".
@@ -66,6 +67,7 @@ o   Volodymyr Khomenko <Volodymyr.Khomenko at exanet.com>
 
 o   Volker Lendecke <vl at samba.org>
     * BUG 5512: Fix alignment problems on sparc.
+    * Fix a race condition in Winbind leading to a crash.
     * Fix a segfault in base64_encode_data_blob.
     * Fix some uninitialized variable references via ndr_print.
     * Fix error message if trying to join with a non-privileged user.
@@ -98,8 +100,13 @@ o   Darshan Purandare <dpurandare at isilon.com>
     * Add broadcasting of the debug message to all winbindd children.
 
 
+o   Karolin Seeger <kseeger at samba.org>
+    * BUG 5635: Fix updating of printer queues.
+
+
 o   Andreas Schneider <anschneider at suse.de>
     * Release still reachable memory if the smbclient context is freed.
+    * Remove trailing withespace from wbinfo -m which breaks gdm auth.
 
 
 o   Simo Sorce <idra at samba.org>
diff --git a/examples/libsmbclient/Makefile b/examples/libsmbclient/Makefile
index a50e80a..dabc8e9 100644
--- a/examples/libsmbclient/Makefile
+++ b/examples/libsmbclient/Makefile
@@ -5,7 +5,7 @@ SAMBA_INCL  = -I/usr/local/samba/include
 EXTLIB_INCL = -I/usr/include/gtk-1.2 \
 	      -I/usr/include/glib-1.2 \
 	      -I/usr/lib/glib/include
-EXTLIB_INCL = `gtk-config --cflags`
+#EXTLIB_INCL = `gtk-config --cflags`
 
 DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 CFLAGS = -O0 -g $(SAMBA_INCL) $(EXTLIB_INCL) $(DEFS)
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index 822ff26..7356b3e 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -43,9 +43,9 @@ bool is_ipaddress_v4(const char *str)
 
 bool is_ipaddress(const char *str)
 {
+#if defined(HAVE_IPV6)
 	int ret = -1;
 
-#if defined(HAVE_IPV6)
 	if (strchr_m(str, ':')) {
 		char addr[INET6_ADDRSTRLEN];
 		struct in6_addr dest6;
@@ -212,9 +212,9 @@ bool interpret_string_addr(struct sockaddr_storage *pss,
 		const char *str,
 		int flags)
 {
-	char addr[INET6_ADDRSTRLEN];
 	struct addrinfo *res = NULL;
 #if defined(HAVE_IPV6)
+	char addr[INET6_ADDRSTRLEN];
 	unsigned int scope_id = 0;
 
 	if (strchr_m(str, ':')) {
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index 6678c0c..c36d512 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -1231,7 +1231,7 @@ char *talloc_string_sub2(TALLOC_CTX *mem_ctx, const char *src,
 	char *string;
 	ssize_t ls,lp,li,ld, i;
 
-	if (!insert || !pattern || !*pattern || !src || !*src) {
+	if (!insert || !pattern || !*pattern || !src) {
 		return NULL;
 	}
 
diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c
index 22d9b21..32c6315 100644
--- a/source/nsswitch/wbinfo.c
+++ b/source/nsswitch/wbinfo.c
@@ -359,10 +359,11 @@ static bool wbinfo_list_domains(bool list_all_domains, bool verbose)
 	}
 
 	for (i=0; i<num_domains; i++) {
-		d_printf("%-16s", domain_list[i].short_name);
-
-		if (!print_all) {
-			d_printf("\n");	
+		if (print_all) {
+			d_printf("%-16s", domain_list[i].short_name);
+		} else {
+			d_printf("%s", domain_list[i].short_name);
+			d_printf("\n");
 			continue;
 		}
 
diff --git a/source/passdb/util_unixsids.c b/source/passdb/util_unixsids.c
index 8c92f95..1b674d0 100644
--- a/source/passdb/util_unixsids.c
+++ b/source/passdb/util_unixsids.c
@@ -38,13 +38,13 @@ bool sid_check_is_in_unix_users(const DOM_SID *sid)
 bool uid_to_unix_users_sid(uid_t uid, DOM_SID *sid)
 {
 	sid_copy(sid, &global_sid_Unix_Users);
-	return sid_append_rid(sid, uid);
+	return sid_append_rid(sid, (uint32_t)uid);
 }
 
 bool gid_to_unix_groups_sid(gid_t gid, DOM_SID *sid)
 {
 	sid_copy(sid, &global_sid_Unix_Groups);
-	return sid_append_rid(sid, gid);
+	return sid_append_rid(sid, (uint32_t)gid);
 }
 
 const char *unix_users_domain_name(void)
@@ -62,7 +62,7 @@ bool lookup_unix_user_name(const char *name, DOM_SID *sid)
 	}
 
 	sid_copy(sid, &global_sid_Unix_Users);
-	sid_append_rid(sid, pwd->pw_uid); /* For 64-bit uid's we have enough
+	sid_append_rid(sid, (uint32_t)pwd->pw_uid); /* For 64-bit uid's we have enough
 					  * space ... */
 	TALLOC_FREE(pwd);
 	return True;
@@ -93,13 +93,13 @@ bool lookup_unix_group_name(const char *name, DOM_SID *sid)
 {
 	struct group *grp;
 
-	grp = getgrnam(name);
+	grp = sys_getgrnam(name);
 	if (grp == NULL) {
 		return False;
 	}
 
 	sid_copy(sid, &global_sid_Unix_Groups);
-	sid_append_rid(sid, grp->gr_gid); /* For 64-bit uid's we have enough
+	sid_append_rid(sid, (uint32_t)grp->gr_gid); /* For 64-bit uid's we have enough
 					   * space ... */
 	return True;
 }
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 0d1dd31..2184e69 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -3052,6 +3052,11 @@ NTSTATUS create_file(connection_struct *conn,
 			ZERO_STRUCT(sbuf);
 			goto done;
 		}
+
+		if (!(conn->fs_capabilities & FILE_NAMED_STREAMS)) {
+			status = NT_STATUS_OBJECT_PATH_NOT_FOUND;
+			goto fail;
+		}
 	}
 
 	if ((req != NULL) && (req->flags2 & FLAGS2_DFS_PATHNAMES)) {
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index 57ab627..f2be6d6 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -104,6 +104,7 @@ struct winbindd_async_request {
 	void *private_data;
 };
 
+static void async_request_fail(struct winbindd_async_request *state);
 static void async_main_request_sent(void *private_data, bool success);
 static void async_request_sent(void *private_data, bool success);
 static void async_reply_recv(void *private_data, bool success);
@@ -129,6 +130,7 @@ void async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
 
 	state->mem_ctx = mem_ctx;
 	state->child = child;
+	state->reply_timeout_event = NULL;
 	state->request = request;
 	state->response = response;
 	state->continuation = continuation;
@@ -148,10 +150,7 @@ static void async_main_request_sent(void *private_data, bool success)
 
 	if (!success) {
 		DEBUG(5, ("Could not send async request\n"));
-
-		state->response->length = sizeof(struct winbindd_response);
-		state->response->result = WINBINDD_ERROR;
-		state->continuation(state->private_data, False);
+		async_request_fail(state);
 		return;
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list