[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Wed Mar 16 17:33:03 MDT 2011


The branch, master has been updated
       via  1d516f0 s3-username: rename static getpwnam_alloc to getpwnam_alloc_cached.
       via  3aa9d30 s3-build: only include asn1 headers where actually needed.
      from  2a608ba dcerpc: we do not need these as public headers

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


- Log -----------------------------------------------------------------
commit 1d516f0d76ea83a50ff697b44cf0ebfd54f68b50
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 2 15:22:34 2011 +0100

    s3-username: rename static getpwnam_alloc to getpwnam_alloc_cached.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Thu Mar 17 00:32:40 CET 2011 on sn-devel-104

commit 3aa9d3005ac2e48cf789e147a098e8feecdd41ef
Author: Günther Deschner <gd at samba.org>
Date:   Thu Feb 24 12:27:29 2011 +0100

    s3-build: only include asn1 headers where actually needed.
    
    Guenther

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

Summary of changes:
 source3/include/includes.h    |    1 -
 source3/include/proto.h       |    4 ++++
 source3/lib/tldap.c           |    1 +
 source3/lib/tldap_util.c      |    1 +
 source3/lib/username.c        |   10 +++++-----
 source3/libads/krb5_setpw.c   |    1 +
 source3/libsmb/clikrb5.c      |    1 +
 source3/libsmb/clispnego.c    |    1 +
 source3/smbd/seal.c           |    1 +
 source3/smbd/sesssetup.c      |    1 +
 source3/smbd/smb2_sesssetup.c |    1 +
 source3/utils/ntlm_auth.c     |    1 +
 12 files changed, 18 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/includes.h b/source3/include/includes.h
index c508266..cda366f 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -540,7 +540,6 @@ extern void *cmdline_lp_ctx;
 
 #include "../lib/util/data_blob.h"
 #include "../lib/util/time.h"
-#include "../lib/util/asn1.h"
 
 #include "libads/ads_status.h"
 #include "trans2.h"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7126103..f944b2a 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2298,6 +2298,10 @@ DATA_BLOB spnego_gen_negTokenInit(TALLOC_CTX *ctx,
 				  const char *OIDs[],
 				  DATA_BLOB *psecblob,
 				  const char *principal);
+
+#ifndef ASN1_MAX_OIDS
+#define ASN1_MAX_OIDS 20
+#endif
 bool spnego_parse_negTokenInit(TALLOC_CTX *ctx,
 			       DATA_BLOB blob,
 			       char *OIDs[ASN1_MAX_OIDS],
diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c
index 9523fde..db5d562 100644
--- a/source3/lib/tldap.c
+++ b/source3/lib/tldap.c
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "tldap.h"
+#include "../lib/util/asn1.h"
 
 static int tldap_simple_recv(struct tevent_req *req);
 
diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c
index 52bacfd..7697a43 100644
--- a/source3/lib/tldap_util.c
+++ b/source3/lib/tldap_util.c
@@ -21,6 +21,7 @@
 #include "tldap.h"
 #include "tldap_util.h"
 #include "../libcli/security/security.h"
+#include "../lib/util/asn1.h"
 
 bool tldap_entry_values(struct tldap_message *msg, const char *attribute,
 			DATA_BLOB **values, int *num_values)
diff --git a/source3/lib/username.c b/source3/lib/username.c
index 7d3a541..4e77bee 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -30,7 +30,7 @@ static struct passwd *uname_string_combinations2(char *s, TALLOC_CTX *mem_ctx, i
 						 struct passwd * (*fn) (TALLOC_CTX *mem_ctx, const char *),
 						 int N);
 
-static struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
+static struct passwd *getpwnam_alloc_cached(TALLOC_CTX *mem_ctx, const char *name)
 {
 	struct passwd *pw, *for_cache;
 
@@ -147,7 +147,7 @@ static struct passwd *Get_Pwnam_internals(TALLOC_CTX *mem_ctx,
 	   common case on UNIX systems */
 	strlower_m(user2);
 	DEBUG(5,("Trying _Get_Pwnam(), username as lowercase is %s\n",user2));
-	ret = getpwnam_alloc(mem_ctx, user2);
+	ret = getpwnam_alloc_cached(mem_ctx, user2);
 	if(ret)
 		goto done;
 
@@ -155,7 +155,7 @@ static struct passwd *Get_Pwnam_internals(TALLOC_CTX *mem_ctx,
 	if(strcmp(user, user2) != 0) {
 		DEBUG(5,("Trying _Get_Pwnam(), username as given is %s\n",
 			 user));
-		ret = getpwnam_alloc(mem_ctx, user);
+		ret = getpwnam_alloc_cached(mem_ctx, user);
 		if(ret)
 			goto done;
 	}
@@ -165,7 +165,7 @@ static struct passwd *Get_Pwnam_internals(TALLOC_CTX *mem_ctx,
 	if(strcmp(user, user2) != 0) {
 		DEBUG(5,("Trying _Get_Pwnam(), username as uppercase is %s\n",
 			 user2));
-		ret = getpwnam_alloc(mem_ctx, user2);
+		ret = getpwnam_alloc_cached(mem_ctx, user2);
 		if(ret)
 			goto done;
 	}
@@ -174,7 +174,7 @@ static struct passwd *Get_Pwnam_internals(TALLOC_CTX *mem_ctx,
 	strlower_m(user2);
 	DEBUG(5,("Checking combinations of %d uppercase letters in %s\n",
 		 lp_usernamelevel(), user2));
-	ret = uname_string_combinations(user2, mem_ctx, getpwnam_alloc,
+	ret = uname_string_combinations(user2, mem_ctx, getpwnam_alloc_cached,
 					lp_usernamelevel());
 
 done:
diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c
index c919a25..d84dd5d 100644
--- a/source3/libads/krb5_setpw.c
+++ b/source3/libads/krb5_setpw.c
@@ -21,6 +21,7 @@
 #include "includes.h"
 #include "smb_krb5.h"
 #include "libads/kerberos_proto.h"
+#include "../lib/util/asn1.h"
 
 #ifdef HAVE_KRB5
 
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index b4962a0..0165004 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "smb_krb5.h"
 #include "../librpc/gen_ndr/krb5pac.h"
+#include "../lib/util/asn1.h"
 
 #ifndef KRB5_AUTHDATA_WIN2K_PAC
 #define KRB5_AUTHDATA_WIN2K_PAC 128
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index 382a29a..4581ce4 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "../libcli/auth/spnego.h"
 #include "smb_krb5.h"
+#include "../lib/util/asn1.h"
 
 /*
   generate a negTokenInit packet given a list of supported
diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c
index 7fe44a0..78ec3b2 100644
--- a/source3/smbd/seal.c
+++ b/source3/smbd/seal.c
@@ -23,6 +23,7 @@
 #include "../libcli/auth/ntlmssp.h"
 #include "ntlmssp_wrap.h"
 #include "smb_crypt.h"
+#include "../lib/util/asn1.h"
 
 /******************************************************************************
  Server side encryption.
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 3cb07be..6c67f3e 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -30,6 +30,7 @@
 #include "librpc/gen_ndr/messaging.h"
 #include "../librpc/gen_ndr/krb5pac.h"
 #include "libads/kerberos_proto.h"
+#include "../lib/util/asn1.h"
 
 /* For split krb5 SPNEGO blobs. */
 struct pending_auth_data {
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index d1ebe9b..3b33af8 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -27,6 +27,7 @@
 #include "ntlmssp_wrap.h"
 #include "../librpc/gen_ndr/krb5pac.h"
 #include "libads/kerberos_proto.h"
+#include "../lib/util/asn1.h"
 
 static NTSTATUS smbd_smb2_session_setup(struct smbd_smb2_request *smb2req,
 					uint64_t in_session_id,
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 43af0fd..a6c5be8 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -35,6 +35,7 @@
 #include "libads/kerberos_proto.h"
 #include "nsswitch/winbind_client.h"
 #include "librpc/gen_ndr/krb5pac.h"
+#include "../lib/util/asn1.h"
 
 #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