[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Tue Apr 24 07:05:03 MDT 2012
The branch, master has been updated
via d38a171 s3: Attempt to fix the build without kerberos
via 374ca0b s3: Fix Coverity ID 2751: REVERSE_INULL
via 8d5e677 talloc: Fix copy&paste errors
via bdeee22 Talloc doc: talloc_strdup_append does not return duplicated string
via 9a47471 Talloc doc: when s == NULL in _append functions
from 0d5d45c s4-s3upgrade: print the error message from passdb.error exceptions
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d38a171a43d3298d64adfa2a2869e84e560d3107
Author: Volker Lendecke <vl at samba.org>
Date: Tue Apr 24 13:24:29 2012 +0200
s3: Attempt to fix the build without kerberos
Autobuild-User: Volker Lendecke <vl at samba.org>
Autobuild-Date: Tue Apr 24 15:04:14 CEST 2012 on sn-devel-104
commit 374ca0bd26c0a5f1ab77497eafc1e98a420c86a5
Author: Volker Lendecke <vl at samba.org>
Date: Tue Apr 24 12:25:59 2012 +0200
s3: Fix Coverity ID 2751: REVERSE_INULL
commit 8d5e6770f45283091e8ef41b1c4ca39356c1869a
Author: Volker Lendecke <vl at samba.org>
Date: Tue Apr 24 10:28:29 2012 +0200
talloc: Fix copy&paste errors
commit bdeee2202da2560ff8caabae64f92e1b213c647d
Author: Pavel Březina <pbrezina at redhat.com>
Date: Fri Apr 20 14:32:01 2012 +0200
Talloc doc: talloc_strdup_append does not return duplicated string
commit 9a474717b8a629fc96c85217290212dca4011f71
Author: Pavel Březina <pbrezina at redhat.com>
Date: Fri Apr 20 14:29:59 2012 +0200
Talloc doc: when s == NULL in _append functions
-----------------------------------------------------------------------
Summary of changes:
lib/krb5_wrap/krb5_samba.h | 13 ++++++-------
lib/talloc/talloc.c | 4 ++--
lib/talloc/talloc.h | 20 ++++++++++++++++----
source3/lib/dbwrap/dbwrap_watch.c | 2 +-
source3/libads/authdata.c | 3 ++-
source3/librpc/crypto/gse.c | 2 +-
source3/utils/ntlm_auth.c | 3 +++
7 files changed, 31 insertions(+), 16 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h
index 70aebdb..6a0f9dc 100644
--- a/lib/krb5_wrap/krb5_samba.h
+++ b/lib/krb5_wrap/krb5_samba.h
@@ -210,18 +210,17 @@ char *smb_get_krb5_error_message(krb5_context context,
krb5_error_code code,
TALLOC_CTX *mem_ctx);
-int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,
- const char *principal, time_t time_offset,
- DATA_BLOB *ticket, DATA_BLOB *session_key_krb5,
- uint32_t extra_ap_opts, const char *ccname,
- time_t *tgs_expire,
- const char *impersonate_princ_s);
-
bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
DATA_BLOB *edata,
DATA_BLOB *edata_out);
#endif /* HAVE_KRB5 */
+int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,
+ const char *principal, time_t time_offset,
+ DATA_BLOB *ticket, DATA_BLOB *session_key_krb5,
+ uint32_t extra_ap_opts, const char *ccname,
+ time_t *tgs_expire,
+ const char *impersonate_princ_s);
#endif /* _KRB5_SAMBA_H */
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 38e6f21..e5fd0d2 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -2019,7 +2019,7 @@ _PUBLIC_ char *talloc_strdup_append_buffer(char *s, const char *a)
_PUBLIC_ char *talloc_strndup_append(char *s, const char *a, size_t n)
{
if (unlikely(!s)) {
- return talloc_strdup(NULL, a);
+ return talloc_strndup(NULL, a, n);
}
if (unlikely(!a)) {
@@ -2038,7 +2038,7 @@ _PUBLIC_ char *talloc_strndup_append_buffer(char *s, const char *a, size_t n)
size_t slen;
if (unlikely(!s)) {
- return talloc_strdup(NULL, a);
+ return talloc_strndup(NULL, a, n);
}
if (unlikely(!a)) {
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index ebd2ab5..05e6292 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -1311,11 +1311,13 @@ char *talloc_strdup(const void *t, const char *p);
* talloc_set_name_const(ptr, ptr)
* @endcode
*
+ * If <code>s == NULL</code> then new context is created.
+ *
* @param[in] s The destination to append to.
*
* @param[in] a The string you want to append.
*
- * @return The duplicated string, NULL on error.
+ * @return The concatenated strings, NULL on error.
*
* @see talloc_strdup()
* @see talloc_strdup_append_buffer()
@@ -1344,11 +1346,13 @@ char *talloc_strdup_append(char *s, const char *a);
* printf("%s\n", buf); // hello (buf = "hello\0world, hello")
* @endcode
*
+ * If <code>s == NULL</code> then new context is created.
+ *
* @param[in] s The destination buffer to append to.
*
* @param[in] a The string you want to append.
*
- * @return The duplicated string, NULL on error.
+ * @return The concatenated strings, NULL on error.
*
* @see talloc_strdup()
* @see talloc_strdup_append()
@@ -1391,6 +1395,8 @@ char *talloc_strndup(const void *t, const char *p, size_t n);
* talloc_set_name_const(ptr, ptr)
* @endcode
*
+ * If <code>s == NULL</code> then new context is created.
+ *
* @param[in] s The destination string to append to.
*
* @param[in] a The source string you want to append.
@@ -1398,7 +1404,7 @@ char *talloc_strndup(const void *t, const char *p, size_t n);
* @param[in] n The number of characters you want to append from the
* string.
*
- * @return The duplicated string, NULL on error.
+ * @return The concatenated strings, NULL on error.
*
* @see talloc_strndup()
* @see talloc_strndup_append_buffer()
@@ -1427,6 +1433,8 @@ char *talloc_strndup_append(char *s, const char *a, size_t n);
* printf("%s\n", buf); // hello (buf = "hello\0world, hello")
* @endcode
*
+ * If <code>s == NULL</code> then new context is created.
+ *
* @param[in] s The destination buffer to append to.
*
* @param[in] a The source string you want to append.
@@ -1434,7 +1442,7 @@ char *talloc_strndup_append(char *s, const char *a, size_t n);
* @param[in] n The number of characters you want to append from the
* string.
*
- * @return The duplicated string, NULL on error.
+ * @return The concatenated strings, NULL on error.
*
* @see talloc_strndup()
* @see talloc_strndup_append()
@@ -1533,6 +1541,8 @@ char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3)
* talloc_set_name_const(ptr, ptr)
* @endcode
*
+ * If <code>s == NULL</code> then new context is created.
+ *
* @param[in] s The string to append to.
*
* @param[in] fmt The format string.
@@ -1565,6 +1575,8 @@ char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3
* printf("%s\n", buf); // hello (buf = "hello\0world, hello")
* @endcode
*
+ * If <code>s == NULL</code> then new context is created.
+ *
* @param[in] s The string to append to
*
* @param[in] fmt The format string.
diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c
index 0c13371..5928805 100644
--- a/source3/lib/dbwrap/dbwrap_watch.c
+++ b/source3/lib/dbwrap/dbwrap_watch.c
@@ -400,7 +400,7 @@ NTSTATUS dbwrap_record_watch_recv(struct tevent_req *req,
return status;
}
rec = dbwrap_fetch_locked(state->db, mem_ctx, state->key);
- if (req == NULL) {
+ if (rec == NULL) {
return NT_STATUS_INTERNAL_DB_ERROR;
}
*prec = rec;
diff --git a/source3/libads/authdata.c b/source3/libads/authdata.c
index cb218dd..f4ec5b9 100644
--- a/source3/libads/authdata.c
+++ b/source3/libads/authdata.c
@@ -31,10 +31,11 @@
#include "librpc/crypto/gse.h"
#include "auth/gensec/gensec.h"
#include "../libcli/auth/spnego.h"
-#include "auth/kerberos/pac_utils.h"
#ifdef HAVE_KRB5
+#include "auth/kerberos/pac_utils.h"
+
struct smb_krb5_context;
/****************************************************************
diff --git a/source3/librpc/crypto/gse.c b/source3/librpc/crypto/gse.c
index 96a1240..a9c9c47 100644
--- a/source3/librpc/crypto/gse.c
+++ b/source3/librpc/crypto/gse.c
@@ -28,10 +28,10 @@
#include "auth/gensec/gensec.h"
#include "auth/credentials/credentials.h"
#include "../librpc/gen_ndr/dcerpc.h"
-#include "auth/kerberos/pac_utils.h"
#if defined(HAVE_KRB5)
+#include "auth/kerberos/pac_utils.h"
#include "gse_krb5.h"
static char *gse_errstr(TALLOC_CTX *mem_ctx, OM_uint32 maj, OM_uint32 min);
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index db9e4d0..0f8e544 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -45,7 +45,10 @@
#include "source3/include/auth.h"
#include "source3/auth/proto.h"
#include "nsswitch/libwbclient/wbclient.h"
+
+#if HAVE_KRB5
#include "auth/kerberos/pac_utils.h"
+#endif
#ifndef PAM_WINBIND_CONFIG_FILE
#define PAM_WINBIND_CONFIG_FILE "/etc/security/pam_winbind.conf"
--
Samba Shared Repository
More information about the samba-cvs
mailing list