[PATCH] a few patches from the attic
Volker Lendecke
Volker.Lendecke at SerNet.DE
Thu Feb 20 06:13:35 MST 2014
Hi!
Review would be appreciated!
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 58af253b9aafe627abf588ed0758ab2f42c1e609 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Thu, 13 Feb 2014 13:19:26 +0000
Subject: [PATCH 1/4] krb5_locator: Slightly simplify code
This makes it a bit easier to read for me
Signed-off-by: Volker Lendecke <vl at samba.org>
---
nsswitch/winbind_krb5_locator.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/nsswitch/winbind_krb5_locator.c b/nsswitch/winbind_krb5_locator.c
index 385a156..91a2d64 100644
--- a/nsswitch/winbind_krb5_locator.c
+++ b/nsswitch/winbind_krb5_locator.c
@@ -142,11 +142,10 @@ static int smb_krb5_locator_lookup_sanity_check(enum locate_service_type svc,
switch (family) {
case AF_UNSPEC:
case AF_INET:
- break;
#if defined(HAVE_IPV6)
case AF_INET6:
- break;
#endif
+ break;
default:
return EINVAL;
}
--
1.8.1.2
From 35005840d220db665ce962d1a4af899e937c85b2 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 1 Jan 2014 11:38:52 +0100
Subject: [PATCH 2/4] lib: Avoid a strlen call in xx_path()
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/lib/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 374bc5d..07daad2 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1504,7 +1504,7 @@ static char *xx_path(const char *name, const char *rootpath)
}
}
- return talloc_asprintf_append(fname, "/%s", name);
+ return talloc_asprintf_append_buffer(fname, "/%s", name);
}
/**
--
1.8.1.2
From ec623e8002c752c7dabb8e7d3126c164d27fb655 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Sat, 28 Dec 2013 14:18:32 +0100
Subject: [PATCH 3/4] messaging: Fix a memleak on error in messaging_tdb_init
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/lib/messages_local.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/source3/lib/messages_local.c b/source3/lib/messages_local.c
index 6b9c251..5a9c9e3 100644
--- a/source3/lib/messages_local.c
+++ b/source3/lib/messages_local.c
@@ -97,6 +97,7 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
lp_ctx = loadparm_init_s3(result, loadparm_s3_helpers());
if (lp_ctx == NULL) {
DEBUG(0, ("loadparm_init_s3 failed\n"));
+ TALLOC_FREE(result);
return NT_STATUS_INTERNAL_ERROR;
}
--
1.8.1.2
From 344b949e3b30da17fc88544ba0b9e56a1dbae8ea Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 31 Dec 2013 15:28:04 +0100
Subject: [PATCH 4/4] lib: Fix a typo
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/lib/cbuf.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source3/lib/cbuf.h b/source3/lib/cbuf.h
index b9c5552..3a1524c 100644
--- a/source3/lib/cbuf.h
+++ b/source3/lib/cbuf.h
@@ -222,7 +222,7 @@ char* cbuf_gets(cbuf* b, size_t idx);
* @param[out] ost outstream
* @param[in] s '\0' terminated string of printable characters.
*
- * @return numner of bytes written, -1 on error
+ * @return number of bytes written, -1 on error
*/
int cbuf_print_quoted_string(cbuf* ost, const char* s);
@@ -237,7 +237,7 @@ int cbuf_print_quoted_string(cbuf* ost, const char* s);
* @param[in] s string of bytes
* @param[in] len number of bytes
*
- * @return numner of bytes written, -1 on error
+ * @return number of bytes written, -1 on error
*/
int cbuf_print_quoted(cbuf* ost, const char* s, size_t len);
--
1.8.1.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140220/5097d0a4/attachment.pgp>
More information about the samba-technical
mailing list