[SCM] Samba Shared Repository - branch v3-2-stable updated -
release-3-2-0rc1-23-ge09bece
Karolin Seeger
kseeger at samba.org
Sat May 31 12:56:06 GMT 2008
The branch, v3-2-stable has been updated
via e09beceef22fe55b17e84b5751acc511446a9ff0 (commit)
via 75b7e8401e668a22747c291c1e8300c73e20655d (commit)
via bbbc3f760edb4625149363dec92496da0889794a (commit)
via 423a83e238523389d616eb7f18f613c5b1509923 (commit)
via 84f97a38a1cdf6b9271bdb719f4b8d50b77e2814 (commit)
via 06ae8c271a98462297d57aba44194cae154e8994 (commit)
via f71fa2ca03abd198808abca376bdbea668640aa1 (commit)
from a37815239684dc8c60c3c9f0434b23cd6ef6a648 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable
- Log -----------------------------------------------------------------
commit e09beceef22fe55b17e84b5751acc511446a9ff0
Author: Karolin Seeger <kseeger at samba.org>
Date: Sat May 31 14:50:29 2008 +0200
WHATSNEW: Update changes since 3.2.0rc1.
Karolin
(cherry picked from commit 87a3d59dfcb8e6ae7349de55bb9532e9ae1851a5)
commit 75b7e8401e668a22747c291c1e8300c73e20655d
Author: Jeremy Allison <jra at samba.org>
Date: Fri May 30 10:06:21 2008 -0700
From Michael R Sweet <mike at easysw.com>.
All,
Noticed that smbspool.c still has my Easy Software Products copyright
on it. The following patch fixes it to match the other code I've
contributed over the years...
Jeremy.
(cherry picked from commit d5ee3b19ebc7b19d7e02f3fb849dcec20fca476f)
commit bbbc3f760edb4625149363dec92496da0889794a
Author: Jeremy Allison <jra at samba.org>
Date: Tue May 27 13:54:15 2008 -0700
A few cleanups from Chere Zhou <chere.zhou at isilon.com>.
Jeremy.
(cherry picked from commit de3b9e3ed2bfd32dc0d0e45ad8fd775ebd9004fa)
commit 423a83e238523389d616eb7f18f613c5b1509923
Author: Jeremy Allison <jra at samba.org>
Date: Tue May 27 12:27:52 2008 -0700
Memory leak fixes from Chere Zhou <czhou at isilon.com>.
Jeremy.
(cherry picked from commit a48df9ce84d7b365465e70d8ec27d9b5fcf59b45)
commit 84f97a38a1cdf6b9271bdb719f4b8d50b77e2814
Author: Jeremy Allison <jra at samba.org>
Date: Fri May 30 17:49:33 2008 -0700
Fix bug #5504. winbindd children and parent were handing SIGTERM in the same way - deleting the socket!
Jeremy.
(cherry picked from commit fb3e5a14dabeb36b55c31ab3b6c502de1e0d1fe0)
commit 06ae8c271a98462297d57aba44194cae154e8994
Author: Jeremy Allison <jra at samba.org>
Date: Fri May 30 17:52:05 2008 -0700
Fix valgrind bug in debug statement. Don't reference uninitialized memory.
Jeremy.
(cherry picked from commit 0aded23c4f6fc726896f5b5955e913ca559e7713)
commit f71fa2ca03abd198808abca376bdbea668640aa1
Author: Chere Zhou <czhou at isilon.com>
Date: Fri May 30 13:16:51 2008 -0700
minor memory leak fix
(cherry picked from commit e7a295fa27f4bc7c0661873ef0d9661cfa9b14d0)
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 6 ++++++
source/client/smbspool.c | 2 +-
source/libads/kerberos.c | 4 ++++
source/libsmb/asn1.c | 1 +
source/libsmb/smbencrypt.c | 1 +
source/utils/net_rap.c | 2 ++
source/utils/net_rpc.c | 5 +++++
source/winbindd/idmap_util.c | 5 ++---
source/winbindd/winbindd.c | 25 +++++++++++++++----------
source/winbindd/winbindd_dual.c | 2 +-
10 files changed, 38 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 375a926..536e319 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -213,7 +213,9 @@ Changes since 3.2.0rc1:
o Jeremy Allison <jra at samba.org>
+ * BUG 5504: Fix behaviour of winbindd children receiving a SIGTERM.
* Security fix for CVE-2008-1105.
+ * Fix valgrind bug in debug statement.
o Günther Deschner <gd at samba.org>
@@ -228,6 +230,10 @@ o Marc VanHeyningen <marc.vanheyningen at isilon.com>
* Fix memory leak.
+o Chere Zhou <chere.zhou at isilon.com>
+ * Fix memory leaks.
+
+
Changes since 3.2.0pre3:
-----------------------
diff --git a/source/client/smbspool.c b/source/client/smbspool.c
index ed5fc69..e567ef8 100644
--- a/source/client/smbspool.c
+++ b/source/client/smbspool.c
@@ -2,7 +2,7 @@
Unix SMB/CIFS implementation.
SMB backend for the Common UNIX Printing System ("CUPS")
- Copyright (C) Easy Software Products 1999
+ Copyright (C) Michael R Sweet 1999
Copyright (C) Andrew Tridgell 1994-1998
Copyright (C) Andrew Bartlett 2002
Copyright (C) Rodrigo Fernandez-Vizarra 2005
diff --git a/source/libads/kerberos.c b/source/libads/kerberos.c
index 66f203b..25d94d0 100644
--- a/source/libads/kerberos.c
+++ b/source/libads/kerberos.c
@@ -649,6 +649,10 @@ bool kerberos_secrets_store_salting_principal(const char *service,
SAFE_FREE(princ_s);
SAFE_FREE(unparsed_name);
+ if (princ) {
+ krb5_free_principal(context, princ);
+ }
+
if (context) {
krb5_free_context(context);
}
diff --git a/source/libsmb/asn1.c b/source/libsmb/asn1.c
index bdbe49b..7b8736a 100644
--- a/source/libsmb/asn1.c
+++ b/source/libsmb/asn1.c
@@ -425,6 +425,7 @@ bool asn1_check_OID(ASN1_DATA *data, const char *OID)
if (strcmp(id, OID) != 0) {
data->has_error = true;
+ free(id);
return false;
}
free(id);
diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c
index e7198b8..6cc697c 100644
--- a/source/libsmb/smbencrypt.c
+++ b/source/libsmb/smbencrypt.c
@@ -181,6 +181,7 @@ bool ntv2_owf_gen(const uchar owf[16],
domain_byte_len = push_ucs2_allocate(&domain, domain_in);
if (domain_byte_len == (size_t)-1) {
DEBUG(0, ("push_uss2_allocate() for domain returned -1 (probably malloc() failure)\n"));
+ SAFE_FREE(user);
return False;
}
diff --git a/source/utils/net_rap.c b/source/utils/net_rap.c
index 3e53eb9..8e5c42a 100644
--- a/source/utils/net_rap.c
+++ b/source/utils/net_rap.c
@@ -221,6 +221,7 @@ static int rap_share_add(int argc, const char **argv)
p = strchr(sharename, '=');
if (p == NULL) {
d_printf("Server path not specified\n");
+ SAFE_FREE(sharename);
return net_rap_share_usage(argc, argv);
}
*p = 0;
@@ -237,6 +238,7 @@ static int rap_share_add(int argc, const char **argv)
ret = cli_NetShareAdd(cli, &sinfo);
cli_shutdown(cli);
+ SAFE_FREE(sharename);
return ret;
}
diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c
index cbe3d45..a271f55 100644
--- a/source/utils/net_rpc.c
+++ b/source/utils/net_rpc.c
@@ -3680,6 +3680,10 @@ static NTSTATUS rpc_share_migrate_files_internals(const DOM_SID *domain_sid,
char *dst = NULL;
dst = SMB_STRDUP(opt_destination?opt_destination:"127.0.0.1");
+ if (dst == NULL) {
+ nt_status = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
result = get_share_info(pipe_hnd, mem_ctx, level, argc, argv, &ctr_src);
@@ -3763,6 +3767,7 @@ done:
if (got_dst_share)
cli_shutdown(cp_clistate.cli_share_dst);
+ SAFE_FREE(dst);
return nt_status;
}
diff --git a/source/winbindd/idmap_util.c b/source/winbindd/idmap_util.c
index bf06cd8..0d24070 100644
--- a/source/winbindd/idmap_util.c
+++ b/source/winbindd/idmap_util.c
@@ -157,11 +157,10 @@ NTSTATUS idmap_sid_to_gid(DOM_SID *sid, gid_t *gid)
}
if ((map.status != ID_MAPPED) || (map.xid.type != ID_TYPE_GID)) {
- DEBUG(10, ("sid [%s] not mapped to a gid [%u,%u,%u]\n",
+ DEBUG(10, ("sid [%s] not mapped to a gid [%u,%u]\n",
sid_string_dbg(sid),
map.status,
- map.xid.type,
- map.xid.id));
+ map.xid.type));
return NT_STATUS_NONE_MAPPED;
}
diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c
index 57eee20..c017916 100644
--- a/source/winbindd/winbindd.c
+++ b/source/winbindd/winbindd.c
@@ -131,15 +131,20 @@ static void flush_caches(void)
/* Handle the signal by unlinking socket and exiting */
-static void terminate(void)
+static void terminate(bool is_parent)
{
- char *path = NULL;
-
- /* Remove socket file */
- if (asprintf(&path, "%s/%s",
+ if (is_parent) {
+ /* When parent goes away we should
+ * remove the socket file. Not so
+ * when children terminate.
+ */
+ char *path = NULL;
+
+ if (asprintf(&path, "%s/%s",
get_winbind_pipe_dir(), WINBINDD_SOCKET_NAME) > 0) {
- unlink(path);
- SAFE_FREE(path);
+ unlink(path);
+ SAFE_FREE(path);
+ }
}
idmap_close();
@@ -810,10 +815,10 @@ void winbind_check_sighup(void)
}
/* check if TERM has been received */
-void winbind_check_sigterm(void)
+void winbind_check_sigterm(bool is_parent)
{
if (do_sigterm)
- terminate();
+ terminate(is_parent);
}
/* Process incoming clients on listen_sock. We use a tricky non-blocking,
@@ -975,7 +980,7 @@ static void process_loop(void)
/* Check signal handling things */
- winbind_check_sigterm();
+ winbind_check_sigterm(true);
winbind_check_sighup();
if (do_sigusr2) {
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index ae04256..b8c0ab9 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -1097,7 +1097,7 @@ static bool fork_domain_child(struct winbindd_child *child)
TALLOC_CTX *frame = talloc_stackframe();
/* check for signals */
- winbind_check_sigterm();
+ winbind_check_sigterm(false);
winbind_check_sighup();
run_events(winbind_event_context(), 0, NULL, NULL);
--
Samba Shared Repository
More information about the samba-cvs
mailing list