svn commit: samba r26385 - in branches/SAMBA_4_0: . source/auth/credentials source/auth/gensec source/ldap_server source/libcli/ldap source/libcli/nbt

jelmer at samba.org jelmer at samba.org
Mon Dec 10 18:42:09 GMT 2007


Author: jelmer
Date: 2007-12-10 18:42:07 +0000 (Mon, 10 Dec 2007)
New Revision: 26385

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26385

Log:
Integrate gensec-socket into gensec.
Removed:
   branches/SAMBA_4_0/source/auth/gensec/socket.h
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/auth/credentials/credentials.c
   branches/SAMBA_4_0/source/auth/gensec/config.mk
   branches/SAMBA_4_0/source/auth/gensec/gensec.h
   branches/SAMBA_4_0/source/auth/gensec/spnego.c
   branches/SAMBA_4_0/source/ldap_server/config.mk
   branches/SAMBA_4_0/source/ldap_server/ldap_bind.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c
   branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c
===================================================================
--- branches/SAMBA_4_0/source/auth/credentials/credentials.c	2007-12-10 18:42:04 UTC (rev 26384)
+++ branches/SAMBA_4_0/source/auth/credentials/credentials.c	2007-12-10 18:42:07 UTC (rev 26385)
@@ -720,6 +720,7 @@
 	cli_credentials_set_domain(cred, "", CRED_SPECIFIED);
 	cli_credentials_set_password(cred, NULL, CRED_SPECIFIED);
 	cli_credentials_set_realm(cred, NULL, CRED_SPECIFIED);
+	cli_credentials_set_workstation(cred, "", CRED_UNINITIALISED);
 }
 
 /**

Modified: branches/SAMBA_4_0/source/auth/gensec/config.mk
===================================================================
--- branches/SAMBA_4_0/source/auth/gensec/config.mk	2007-12-10 18:42:04 UTC (rev 26384)
+++ branches/SAMBA_4_0/source/auth/gensec/config.mk	2007-12-10 18:42:07 UTC (rev 26385)
@@ -6,9 +6,9 @@
 DESCRIPTION = Generic Security Library
 PUBLIC_HEADERS = gensec.h spnego.h
 PUBLIC_PROTO_HEADER = gensec_proto.h
-OBJ_FILES = gensec.o
+OBJ_FILES = gensec.o socket.o
 PUBLIC_DEPENDENCIES = \
-		CREDENTIALS LIBSAMBA-UTIL LIBCRYPTO ASN1_UTIL 
+		CREDENTIALS LIBSAMBA-UTIL LIBCRYPTO ASN1_UTIL samba-socket LIBPACKET
 # End SUBSYSTEM gensec
 #################################
 
@@ -48,7 +48,7 @@
 SUBSYSTEM = gensec
 INIT_FUNCTION = gensec_spnego_init
 PRIVATE_PROTO_HEADER = spnego_proto.h
-PRIVATE_DEPENDENCIES = ASN1_UTIL GENSEC_SOCKET CREDENTIALS
+PRIVATE_DEPENDENCIES = ASN1_UTIL CREDENTIALS
 OBJ_FILES = spnego.o spnego_parse.o
 # End MODULE gensec_spnego
 ################################################
@@ -61,7 +61,7 @@
 INIT_FUNCTION = gensec_schannel_init
 OBJ_FILES = schannel.o \
 			schannel_sign.o
-PRIVATE_DEPENDENCIES = SCHANNELDB NDR_SCHANNEL CREDENTIALS
+PRIVATE_DEPENDENCIES = SCHANNELDB NDR_SCHANNEL CREDENTIALS LIBNDR
 OUTPUT_TYPE = INTEGRATED
 # End MODULE gensec_schannel
 ################################################
@@ -72,19 +72,8 @@
 PRIVATE_PROTO_HEADER = schannel_state.h
 OBJ_FILES = \
 		schannel_state.o
-PRIVATE_DEPENDENCIES = LDB_WRAP
+PRIVATE_DEPENDENCIES = LDB_WRAP SAMDB
 #
 # End SUBSYSTEM SCHANNELDB
 ################################################
 
-################################################
-# Start SUBSYSTEM GENSEC_SOCKET
-[SUBSYSTEM::GENSEC_SOCKET]
-OBJ_FILES = \
-		socket.o
-PUBLIC_DEPENDENCIES = samba-socket LIBPACKET
-#PUBLIC_DEPENDENCIES =  gensec
-#
-# End SUBSYSTEM GENSEC_SOCKET
-################################################
-

Modified: branches/SAMBA_4_0/source/auth/gensec/gensec.h
===================================================================
--- branches/SAMBA_4_0/source/auth/gensec/gensec.h	2007-12-10 18:42:04 UTC (rev 26384)
+++ branches/SAMBA_4_0/source/auth/gensec/gensec.h	2007-12-10 18:42:07 UTC (rev 26385)
@@ -166,6 +166,37 @@
 	int sizeof_gensec_security;
 };
 
+/* Socket wrapper */
+
+struct gensec_security;
+struct socket_context;
+
+NTSTATUS gensec_socket_init(struct gensec_security *gensec_security,
+			    struct socket_context *current_socket,
+			    struct event_context *ev,
+			    void (*recv_handler)(void *, uint16_t),
+			    void *recv_private,
+			    struct socket_context **new_socket);
+/* These functions are for use here only (public because SPNEGO must
+ * use them for recursion) */
+NTSTATUS gensec_wrap_packets(struct gensec_security *gensec_security, 
+			     TALLOC_CTX *mem_ctx, 
+			     const DATA_BLOB *in, 
+			     DATA_BLOB *out,
+			     size_t *len_processed);
+/* These functions are for use here only (public because SPNEGO must
+ * use them for recursion) */
+NTSTATUS gensec_unwrap_packets(struct gensec_security *gensec_security, 
+			       TALLOC_CTX *mem_ctx, 
+			       const DATA_BLOB *in, 
+			       DATA_BLOB *out,
+			       size_t *len_processed);
+
+/* These functions are for use here only (public because SPNEGO must
+ * use them for recursion) */
+NTSTATUS gensec_packet_full_request(struct gensec_security *gensec_security,
+				    DATA_BLOB blob, size_t *size);
+
 struct loadparm_context;
 
 #include "auth/gensec/gensec_proto.h"

Deleted: branches/SAMBA_4_0/source/auth/gensec/socket.h
===================================================================
--- branches/SAMBA_4_0/source/auth/gensec/socket.h	2007-12-10 18:42:04 UTC (rev 26384)
+++ branches/SAMBA_4_0/source/auth/gensec/socket.h	2007-12-10 18:42:07 UTC (rev 26385)
@@ -1,50 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
- 
-   Generic Authentication Interface (socket wrapper)
-
-   Copyright (C) Andrew Bartlett <abartlet at samba.org> 2006
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-struct gensec_security;
-struct socket_context;
-
-NTSTATUS gensec_socket_init(struct gensec_security *gensec_security,
-			    struct socket_context *current_socket,
-			    struct event_context *ev,
-			    void (*recv_handler)(void *, uint16_t),
-			    void *recv_private,
-			    struct socket_context **new_socket);
-/* These functions are for use here only (public because SPNEGO must
- * use them for recursion) */
-NTSTATUS gensec_wrap_packets(struct gensec_security *gensec_security, 
-			     TALLOC_CTX *mem_ctx, 
-			     const DATA_BLOB *in, 
-			     DATA_BLOB *out,
-			     size_t *len_processed);
-/* These functions are for use here only (public because SPNEGO must
- * use them for recursion) */
-NTSTATUS gensec_unwrap_packets(struct gensec_security *gensec_security, 
-			       TALLOC_CTX *mem_ctx, 
-			       const DATA_BLOB *in, 
-			       DATA_BLOB *out,
-			       size_t *len_processed);
-
-/* These functions are for use here only (public because SPNEGO must
- * use them for recursion) */
-NTSTATUS gensec_packet_full_request(struct gensec_security *gensec_security,
-				    DATA_BLOB blob, size_t *size);
-

Modified: branches/SAMBA_4_0/source/auth/gensec/spnego.c
===================================================================
--- branches/SAMBA_4_0/source/auth/gensec/spnego.c	2007-12-10 18:42:04 UTC (rev 26384)
+++ branches/SAMBA_4_0/source/auth/gensec/spnego.c	2007-12-10 18:42:07 UTC (rev 26385)
@@ -26,7 +26,6 @@
 #include "librpc/gen_ndr/ndr_dcerpc.h"
 #include "auth/credentials/credentials.h"
 #include "auth/gensec/gensec.h"
-#include "auth/gensec/socket.h"
 
 enum spnego_state_position {
 	SPNEGO_SERVER_START,

Modified: branches/SAMBA_4_0/source/ldap_server/config.mk
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/config.mk	2007-12-10 18:42:04 UTC (rev 26384)
+++ branches/SAMBA_4_0/source/ldap_server/config.mk	2007-12-10 18:42:07 UTC (rev 26385)
@@ -14,6 +14,7 @@
 PRIVATE_DEPENDENCIES = CREDENTIALS \
 		LIBCLI_LDAP SAMDB \
 		process_model \
-		GENSEC_SOCKET
+		gensec \
+		LIBSAMBA-CONFIG
 # End SUBSYSTEM SMB
 #######################

Modified: branches/SAMBA_4_0/source/ldap_server/ldap_bind.c
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_bind.c	2007-12-10 18:42:04 UTC (rev 26384)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_bind.c	2007-12-10 18:42:07 UTC (rev 26385)
@@ -26,7 +26,6 @@
 #include "lib/ldb/include/ldb_errors.h"
 #include "dsdb/samdb/samdb.h"
 #include "auth/gensec/gensec.h"
-#include "auth/gensec/socket.h"
 #include "param/param.h"
 
 static NTSTATUS ldapsrv_BindSimple(struct ldapsrv_call *call)

Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c	2007-12-10 18:42:04 UTC (rev 26384)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c	2007-12-10 18:42:07 UTC (rev 26385)
@@ -26,7 +26,6 @@
 #include "libcli/ldap/ldap_client.h"
 #include "lib/tls/tls.h"
 #include "auth/gensec/gensec.h"
-#include "auth/gensec/socket.h"
 #include "auth/credentials/credentials.h"
 #include "lib/stream/packet.h"
 #include "param/param.h"
@@ -221,6 +220,8 @@
 		NULL 
 	};
 
+	gensec_init(lp_ctx);
+
 	status = gensec_client_start(conn, &conn->gensec, NULL, lp_ctx);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(0, ("Failed to start GENSEC engine (%s)\n", nt_errstr(status)));

Modified: branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c	2007-12-10 18:42:04 UTC (rev 26384)
+++ branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c	2007-12-10 18:42:07 UTC (rev 26385)
@@ -137,7 +137,7 @@
 
 
 
-/*
+/**
   a wins name refresh with multiple WINS servers and multiple
   addresses to refresh. Try each WINS server in turn, until we get a
   reply for each address
@@ -152,7 +152,7 @@
 };
 
 
-/*
+/**
   state handler for WINS multi-homed multi-server name refresh
 */
 static void name_refresh_wins_handler(struct nbt_name_request *req)



More information about the samba-cvs mailing list