[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Sun May 8 04:02:03 MDT 2011


The branch, master has been updated
       via  45e26fd s3-smbd: expose smbd_set_server_fd()
       via  2c569cd s3-waf: expose the server_exit code in the smbd_base library
       via  7e4ba48 build: allow s3 libraries to be built with no undefined symbols
       via  958368e s4-param Don't set variables such as the debuglevel unless global
       via  f946668 Improve debug messages when creating socket directories
       via  8b2ba64 libds: moved enum security_types to a common header
       via  c3bb5b0 s3-utils Set dyn_CONFIGFILE from -c on smbpasswd command line
       via  3eb1023 selftest Use die() less often, as it fails to allow cleanup
       via  6990536 auth: allow auth_common.h to be included multiple times without error
       via  ea0ac9c s4-auth Rename auth -> auth4 to avoid conflict with s3 auth
       via  1969aa8 s4-ntvfs: Rename brl_*() -> brlock_*() to avoid conflict with brlock_init in s3
       via  5c3e985 s4-auth: remove unused prototype
      from  622faa2 s3: Fix including libsmb/proto.h without prior ads.h

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


- Log -----------------------------------------------------------------
commit 45e26fdeec4c6d3c4e75d648399ce2a8b3e26364
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue May 3 09:32:01 2011 +1000

    s3-smbd: expose smbd_set_server_fd()
    
    this allows the fd to be setup by subsystems that want to use the s3
    server core code
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Sun May  8 12:01:13 CEST 2011 on sn-devel-104

commit 2c569cd8ba70e1aba30019618e759866c55eff30
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue May 3 09:33:17 2011 +1000

    s3-waf: expose the server_exit code in the smbd_base library
    
    these functions are called from the rest of smbd_base

commit 7e4ba48135608b5c93cfa4e15f5e4e2c0788d61e
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sat May 7 00:49:13 2011 +1000

    build: allow s3 libraries to be built with no undefined symbols
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>

commit 958368efd0f0db4a0e77f6a374d3c7b5056105c6
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun May 8 10:30:36 2011 +0200

    s4-param Don't set variables such as the debuglevel unless global
    
    This ensures that when a second lp_ctx is created, that it does not
    set global variables such as the debug level, log file etc,
    potentially overriding the settings created by another context.
    
    In particular this matters when loading Samba4 modules into Samba3.
    
    Andrew Bartlett

commit f946668b7ad1ecc1990fa8ee0499c63c4aac6ea6
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun May 8 10:28:03 2011 +0200

    Improve debug messages when creating socket directories
    
    This makes clear what the permissions error and directory name actually is
    
    Andrew Bartlett

commit 8b2ba64d603dd1ef1afde621f594dc46f2133708
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sat May 7 13:32:20 2011 +0200

    libds: moved enum security_types to a common header
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>

commit c3bb5b04e2b6535655dc03c870e02bd5b78a7dee
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun May 8 06:56:47 2011 +0200

    s3-utils Set dyn_CONFIGFILE from -c on smbpasswd command line
    
    This is similar to the code in popt_common and allows the smb.conf to
    be re-loaded from this file later in the code (or for Samba4 plugins
    to attempt to parse the same smb.conf).
    
    Andrew Bartlett

commit 3eb1023d52d68f299365f24bf7dd30c428d835e9
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun May 8 06:54:50 2011 +0200

    selftest Use die() less often, as it fails to allow cleanup

commit 69905360002203faf2db7a4df2bca237ea406396
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat May 7 08:36:06 2011 +0200

    auth: allow auth_common.h to be included multiple times without error

commit ea0ac9cdfceae96b0e0be2531d9dea3b079bcd7f
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat May 7 08:14:06 2011 +0200

    s4-auth Rename auth -> auth4 to avoid conflict with s3 auth

commit 1969aa8eacd257951cdc8d13110302c3b9388013
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat May 7 08:12:54 2011 +0200

    s4-ntvfs: Rename brl_*() -> brlock_*() to avoid conflict with brlock_init in s3

commit 5c3e985fb53e7e210d665a6fc8199b0844019340
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sat May 7 00:49:38 2011 +1000

    s4-auth: remove unused prototype

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

Summary of changes:
 auth/common_auth.h                            |    5 +++
 buildtools/wafsamba/samba3.py                 |    6 ++-
 lib/util/util.c                               |    3 +-
 libds/common/roles.h                          |    3 ++
 selftest/target/Samba.pm                      |    2 +-
 selftest/target/Samba3.pm                     |   37 +++++++++++++++----
 source3/include/proto.h                       |    1 +
 source3/include/smb.h                         |    3 --
 source3/lib/util_sock.c                       |   17 ++++++---
 source3/smbd/globals.c                        |   29 +++++++++++++++
 source3/smbd/server.c                         |   29 ---------------
 source3/utils/smbpasswd.c                     |    1 +
 source3/wscript_build                         |    3 +-
 source4/auth/auth.h                           |   47 +++++++++++-------------
 source4/auth/gensec/gensec.c                  |    4 +-
 source4/auth/gensec/gensec.h                  |    6 ++--
 source4/auth/gensec/pygensec.c                |    4 +-
 source4/auth/ntlm/auth.c                      |   30 ++++++++--------
 source4/auth/ntlm/auth_anonymous.c            |    4 +-
 source4/auth/ntlm/auth_developer.c            |    4 +-
 source4/auth/ntlm/auth_sam.c                  |   10 +++---
 source4/auth/ntlm/auth_server.c               |    4 +-
 source4/auth/ntlm/auth_simple.c               |    2 +-
 source4/auth/ntlm/auth_unix.c                 |    4 +-
 source4/auth/ntlm/auth_util.c                 |    2 +-
 source4/auth/ntlm/auth_winbind.c              |    4 +-
 source4/auth/ntlm/wscript_build               |   12 +++---
 source4/auth/ntlmssp/ntlmssp.h                |    2 +-
 source4/auth/ntlmssp/ntlmssp_server.c         |    8 ++--
 source4/auth/pyauth.c                         |    4 +-
 source4/auth/samba_server_gensec.c            |    2 +-
 source4/lib/events/events.h                   |    2 +
 source4/ntvfs/common/brlock.c                 |   18 +++++-----
 source4/ntvfs/common/brlock.h                 |    2 +-
 source4/ntvfs/common/brlock_tdb.c             |    2 +-
 source4/ntvfs/posix/pvfs_lock.c               |   18 +++++-----
 source4/ntvfs/posix/pvfs_open.c               |    4 +-
 source4/ntvfs/posix/vfs_posix.c               |    2 +-
 source4/ntvfs/posix/vfs_posix.h               |    2 +-
 source4/param/loadparm.c                      |   21 ++++++++++-
 source4/rpc_server/netlogon/dcerpc_netlogon.c |    2 +-
 source4/smb_server/smb/sesssetup.c            |    2 +-
 source4/smb_server/smb_server.h               |    5 +--
 source4/smbd/service_named_pipe.c             |    2 +-
 source4/utils/ntlm_auth.c                     |    2 +-
 45 files changed, 215 insertions(+), 161 deletions(-)


Changeset truncated at 500 lines:

diff --git a/auth/common_auth.h b/auth/common_auth.h
index c64b46c..b2db23c 100644
--- a/auth/common_auth.h
+++ b/auth/common_auth.h
@@ -17,6 +17,9 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#ifndef AUTH_COMMON_AUTH_H
+#define AUTH_COMMON_AUTH_H
+
 #define USER_INFO_CASE_INSENSITIVE_USERNAME 0x01 /* username may be in any case */
 #define USER_INFO_CASE_INSENSITIVE_PASSWORD 0x02 /* password may be in any case */
 #define USER_INFO_DONT_CHECK_UNIX_ACCOUNT   0x04 /* don't check unix account status */
@@ -59,3 +62,5 @@ struct auth_usersupplied_info
 	} password;
 	uint32_t flags;
 };
+
+#endif
diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index cb459ad..e44e28b 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -89,13 +89,15 @@ def s3_fix_kwargs(bld, kwargs):
 
 def SAMBA3_LIBRARY(bld, name, *args, **kwargs):
 	s3_fix_kwargs(bld, kwargs)
-	kwargs['allow_undefined_symbols'] = True
+        if not 'allow_undefined_symbols' in kwargs:
+            kwargs['allow_undefined_symbols'] = True
 	return bld.SAMBA_LIBRARY(name, *args, **kwargs)
 Build.BuildContext.SAMBA3_LIBRARY = SAMBA3_LIBRARY
 
 def SAMBA3_MODULE(bld, name, *args, **kwargs):
 	s3_fix_kwargs(bld, kwargs)
-	kwargs['allow_undefined_symbols'] = True
+        if not 'allow_undefined_symbols' in kwargs:
+            kwargs['allow_undefined_symbols'] = True
 	return bld.SAMBA_MODULE(name, *args, **kwargs)
 Build.BuildContext.SAMBA3_MODULE = SAMBA3_MODULE
 
diff --git a/lib/util/util.c b/lib/util/util.c
index d4a936f..7f30d43 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -152,7 +152,8 @@ _PUBLIC_ bool directory_create_or_exist(const char *dname, uid_t uid,
 		}
 		if ((st.st_mode & 0777) != dir_perms) {
 			DEBUG(0, ("invalid permissions on directory "
-				  "%s\n", dname));
+				  "'%s': has 0%o should be 0%o\n", dname,
+				  (st.st_mode & 0777), dir_perms));
 			umask(old_umask);
 			return false;
 		}
diff --git a/libds/common/roles.h b/libds/common/roles.h
index b546b94..0ebb877 100644
--- a/libds/common/roles.h
+++ b/libds/common/roles.h
@@ -39,4 +39,7 @@ enum server_role {
 */
 #define ROLE_DOMAIN_CONTROLLER ROLE_DOMAIN_BDC
 
+/* security levels for 'security =' option */
+enum security_types {SEC_SHARE,SEC_USER,SEC_SERVER,SEC_DOMAIN,SEC_ADS};
+
 #endif /* _LIBDS_ROLES_H_ */
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index cec12e5..1b1eb53 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -64,7 +64,7 @@ sub mk_krb5_conf($)
 	my ($ctx) = @_;
 
 	unless (open(KRB5CONF, ">$ctx->{krb5_conf}")) {
-		die("can't open $ctx->{krb5_conf}$?");
+	        warn("can't open $ctx->{krb5_conf}$?");
 		return undef;
 	}
 	print KRB5CONF "
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 0115834..a563653 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -673,12 +673,18 @@ sub provision($$$$$$)
 
 	chmod 0755, $ro_shrdir;
 	my $unreadable_file = "$ro_shrdir/unreadable_file";
-	open(UNREADABLE_FILE, ">$unreadable_file") or die("Unable to open $unreadable_file");
+	unless (open(UNREADABLE_FILE, ">$unreadable_file")) {
+	        warn("Unable to open $unreadable_file");
+		return undef;
+	}
 	close(UNREADABLE_FILE);
 	chmod 0600, $unreadable_file;
 
 	my $msdfs_target = "$ro_shrdir/msdfs-target";
-	open(MSDFS_TARGET, ">$msdfs_target") or die("Unable to open $msdfs_target");
+	unless (open(MSDFS_TARGET, ">$msdfs_target")) {
+	        warn("Unable to open $msdfs_target");
+		return undef;
+	}
 	close(MSDFS_TARGET);
 	chmod 0666, $msdfs_target;
 	symlink "msdfs:$server_ip\\ro-tmp", "$msdfs_shrdir/msdfs-src1";
@@ -726,7 +732,10 @@ sub provision($$$$$$)
 	## create conffile
 	##
 
-	open(CONF, ">$conffile") or die("Unable to open $conffile");
+	unless (open(CONF, ">$conffile")) {
+	        warn("Unable to open $conffile");
+		return undef;
+	}
 	print CONF "
 [global]
 	netbios name = $server
@@ -871,7 +880,10 @@ sub provision($$$$$$)
 	## create a test account
 	##
 
-	open(PASSWD, ">$nss_wrapper_passwd") or die("Unable to open $nss_wrapper_passwd");
+	unless (open(PASSWD, ">$nss_wrapper_passwd")) {
+           warn("Unable to open $nss_wrapper_passwd");
+           return undef;
+        } 
 	print PASSWD "nobody:x:$uid_nobody:$gid_nobody:nobody gecos:$prefix_abs:/bin/false
 $unix_name:x:$unix_uid:$unix_gids[0]:$unix_name gecos:$prefix_abs:/bin/false
 ";
@@ -880,7 +892,10 @@ $unix_name:x:$unix_uid:$unix_gids[0]:$unix_name gecos:$prefix_abs:/bin/false
 	}
 	close(PASSWD);
 
-	open(GROUP, ">$nss_wrapper_group") or die("Unable to open $nss_wrapper_group");
+	unless (open(GROUP, ">$nss_wrapper_group")) {
+             warn("Unable to open $nss_wrapper_group");
+             return undef;
+        }
 	print GROUP "nobody:x:$gid_nobody:
 nogroup:x:$gid_nogroup:nobody
 $unix_name-group:x:$unix_gids[0]:
@@ -901,10 +916,16 @@ domusers:X:$gid_domusers:
 	$ENV{NSS_WRAPPER_PASSWD} = $nss_wrapper_passwd;
 	$ENV{NSS_WRAPPER_GROUP} = $nss_wrapper_group;
 
-	open(PWD, "|".Samba::bindir_path($self, "smbpasswd")." -c $conffile -L -s -a $unix_name >/dev/null");
+        my $cmd = Samba::bindir_path($self, "smbpasswd")." -c $conffile -L -s -a $unix_name > /dev/null";
+	unless (open(PWD, "|$cmd")) {
+             warn("Unable to set password for test account\n$cmd");
+             return undef;
+        }
 	print PWD "$password\n$password\n";
-	close(PWD) or die("Unable to set password for test account");
-
+	unless (close(PWD)) {
+             warn("Unable to set password for test account\n$cmd");
+             return undef; 
+        }
 	print "DONE\n";
 
 	open(HOSTS, ">>$ENV{SELFTEST_PREFIX}/dns_host_file") or die("Unable to open $ENV{SELFTEST_PREFIX}/dns_host_file");
diff --git a/source3/include/proto.h b/source3/include/proto.h
index e0bdabc..7e25f8e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1856,6 +1856,7 @@ void send_stat_cache_delete_message(struct messaging_context *msg_ctx,
 NTSTATUS can_delete_directory(struct connection_struct *conn,
 				const char *dirname);
 bool change_to_root_user(void);
+void smbd_set_server_fd(int fd);
 struct event_context *smbd_event_context(void);
 void contend_level2_oplocks_begin(files_struct *fsp,
 				  enum level2_contention_type type);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index d584a9d..863ba7c 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1296,9 +1296,6 @@ enum protocol_types {
 	PROTOCOL_SMB2
 };
 
-/* security levels */
-enum security_types {SEC_SHARE,SEC_USER,SEC_SERVER,SEC_DOMAIN,SEC_ADS};
-
 /* printing types */
 enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
 		     PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index ca355c2..922213d 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -1166,14 +1166,21 @@ int create_pipe_sock(const char *socket_dir,
 	} else {
 		/* Check ownership and permission on existing directory */
 		if (!S_ISDIR(st.st_mode)) {
-			DEBUG(0, ("socket directory %s isn't a directory\n",
+			DEBUG(0, ("socket directory '%s' isn't a directory\n",
 				socket_dir));
 			goto out_umask;
 		}
-		if ((st.st_uid != sec_initial_uid()) ||
-				((st.st_mode & 0777) != dir_perms)) {
-			DEBUG(0, ("invalid permissions on socket directory "
-				"%s\n", socket_dir));
+		if (st.st_uid != sec_initial_uid()) {
+			DEBUG(0, ("invalid ownership on directory "
+				  "'%s'\n", socket_dir));
+			umask(old_umask);
+			goto out_umask;
+		}
+		if ((st.st_mode & 0777) != dir_perms) {
+			DEBUG(0, ("invalid permissions on directory "
+				  "'%s': has 0%o should be 0%o\n", socket_dir,
+				  (st.st_mode & 0777), dir_perms));
+			umask(old_umask);
 			goto out_umask;
 		}
 	}
diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c
index 8e6f46f..6f7f200 100644
--- a/source3/smbd/globals.c
+++ b/source3/smbd/globals.c
@@ -160,3 +160,32 @@ void smbd_init_globals(void)
 	smbd_server_conn->smb1.echo_handler.trusted_fd = -1;
 	smbd_server_conn->smb1.echo_handler.socket_lock_fd = -1;
 }
+
+void smbd_set_server_fd(int fd)
+{
+	struct smbd_server_connection *sconn = smbd_server_conn;
+	char addr[INET6_ADDRSTRLEN];
+	const char *name;
+
+	sconn->sock = fd;
+
+	/*
+	 * Initialize sconn->client_id: If we can't find the client's
+	 * name, default to its address.
+	 */
+
+	client_addr(fd, sconn->client_id.addr, sizeof(sconn->client_id.addr));
+
+	name = client_name(sconn->sock);
+	if (strcmp(name, "UNKNOWN") != 0) {
+		name = talloc_strdup(sconn, name);
+	} else {
+		name = NULL;
+	}
+	sconn->client_id.name =
+		(name != NULL) ? name : sconn->client_id.addr;
+
+	sub_set_socket_ids(sconn->client_id.addr, sconn->client_id.name,
+			   client_socket_addr(sconn->sock, addr,
+					      sizeof(addr)));
+}
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index a485775..29acf8d 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -51,35 +51,6 @@ extern void start_spoolssd(struct event_context *ev_ctx,
 extern int dcelogin_atmost_once;
 #endif /* WITH_DFS */
 
-static void smbd_set_server_fd(int fd)
-{
-	struct smbd_server_connection *sconn = smbd_server_conn;
-	char addr[INET6_ADDRSTRLEN];
-	const char *name;
-
-	sconn->sock = fd;
-
-	/*
-	 * Initialize sconn->client_id: If we can't find the client's
-	 * name, default to its address.
-	 */
-
-	client_addr(fd, sconn->client_id.addr, sizeof(sconn->client_id.addr));
-
-	name = client_name(sconn->sock);
-	if (strcmp(name, "UNKNOWN") != 0) {
-		name = talloc_strdup(sconn, name);
-	} else {
-		name = NULL;
-	}
-	sconn->client_id.name =
-		(name != NULL) ? name : sconn->client_id.addr;
-
-	sub_set_socket_ids(sconn->client_id.addr, sconn->client_id.name,
-			   client_socket_addr(sconn->sock, addr,
-					      sizeof(addr)));
-}
-
 struct event_context *smbd_event_context(void)
 {
 	return server_event_context();
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index 8c78049..eeab4ef 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -107,6 +107,7 @@ static int process_options(int argc, char **argv, int local_flags)
 			break;
 		case 'c':
 			configfile = optarg;
+			set_dyn_CONFIGFILE(optarg);
 			break;
 		case 'a':
 			local_flags |= LOCAL_ADD_USER;
diff --git a/source3/wscript_build b/source3/wscript_build
index c6bc913..0498a9a 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -343,7 +343,7 @@ WINBINDD_SRC = '''${WINBINDD_SRC1}
 
 MANGLE_SRC = '''smbd/mangle.c smbd/mangle_hash.c smbd/mangle_hash2.c'''
 
-SMBD_SRC_MAIN = '''smbd/server.c smbd/server_exit.c smbd/msg_idmap.c'''
+SMBD_SRC_MAIN = '''smbd/server.c smbd/msg_idmap.c'''
 
 BUILDOPT_SRC = '''smbd/build_options.c'''
 
@@ -388,6 +388,7 @@ SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
                smbd/smb2_getinfo.c
                smbd/smb2_setinfo.c
                smbd/smb2_break.c
+               smbd/server_exit.c
                ${MANGLE_SRC}'''
 
 SMBD_SRC_BASE = '''${SMBD_SRC_SRV}
diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index 1704b5e..04731af 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -43,7 +43,7 @@ struct loadparm_context;
 /* version 3 - subsequent samba4 version - abartlet */
 /* version 4 - subsequent samba4 version - metze */
 /* version 0 - till samba4 is stable - metze */
-#define AUTH_INTERFACE_VERSION 0
+#define AUTH4_INTERFACE_VERSION 0
 
 #define AUTH_SESSION_INFO_DEFAULT_GROUPS     0x01 /* Add the user to the default world and network groups */
 #define AUTH_SESSION_INFO_AUTHENTICATED      0x02 /* Add the user to the 'authenticated users' group */
@@ -51,7 +51,7 @@ struct loadparm_context;
 
 struct auth_method_context;
 struct auth_check_password_request;
-struct auth_context;
+struct auth4_context;
 struct auth_session_info;
 struct ldb_dn;
 
@@ -78,7 +78,7 @@ struct auth_operations {
 
 	/* Lookup a 'session info interim' return based only on the principal or DN */
 	NTSTATUS (*get_user_info_dc_principal)(TALLOC_CTX *mem_ctx,
-						       struct auth_context *auth_context,
+						       struct auth4_context *auth_context,
 						       const char *principal,
 						       struct ldb_dn *user_dn,
 						       struct auth_user_info_dc **interim_info);
@@ -86,13 +86,13 @@ struct auth_operations {
 
 struct auth_method_context {
 	struct auth_method_context *prev, *next;
-	struct auth_context *auth_ctx;
+	struct auth4_context *auth_ctx;
 	const struct auth_operations *ops;
 	int depth;
 	void *private_data;
 };
 
-struct auth_context {
+struct auth4_context {
 	struct {
 		/* Who set this up in the first place? */
 		const char *set_by;
@@ -117,25 +117,25 @@ struct auth_context {
 	/* SAM database for this local machine - to fill in local groups, or to authenticate local NTLM users */
 	struct ldb_context *sam_ctx;
 
-	NTSTATUS (*check_password)(struct auth_context *auth_ctx,
+	NTSTATUS (*check_password)(struct auth4_context *auth_ctx,
 				   TALLOC_CTX *mem_ctx,
 				   const struct auth_usersupplied_info *user_info,
 				   struct auth_user_info_dc **user_info_dc);
 
-	NTSTATUS (*get_challenge)(struct auth_context *auth_ctx, uint8_t chal[8]);
+	NTSTATUS (*get_challenge)(struct auth4_context *auth_ctx, uint8_t chal[8]);
 
-	bool (*challenge_may_be_modified)(struct auth_context *auth_ctx);
+	bool (*challenge_may_be_modified)(struct auth4_context *auth_ctx);
 
-	NTSTATUS (*set_challenge)(struct auth_context *auth_ctx, const uint8_t chal[8], const char *set_by);
+	NTSTATUS (*set_challenge)(struct auth4_context *auth_ctx, const uint8_t chal[8], const char *set_by);
 
 	NTSTATUS (*get_user_info_dc_principal)(TALLOC_CTX *mem_ctx,
-						       struct auth_context *auth_ctx,
+						       struct auth4_context *auth_ctx,
 						       const char *principal,
 						       struct ldb_dn *user_dn,
 						       struct auth_user_info_dc **user_info_dc);
 
 	NTSTATUS (*generate_session_info)(TALLOC_CTX *mem_ctx,
-					  struct auth_context *auth_context,
+					  struct auth4_context *auth_context,
 					  struct auth_user_info_dc *user_info_dc,
 					  uint32_t session_info_flags,
 					  struct auth_session_info **session_info);
@@ -151,7 +151,7 @@ struct auth_critical_sizes {
 	int sizeof_auth_user_info_dc;
 };
 
- NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_context,
+ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth4_context *auth_context,
 			   enum auth_password_state to_state,
 			   const struct auth_usersupplied_info *user_info_in,
 			   const struct auth_usersupplied_info **user_info_encrypted);
@@ -165,7 +165,7 @@ struct ldb_context;
 struct gensec_security;
 struct cli_credentials;
 
-NTSTATUS auth_get_challenge(struct auth_context *auth_ctx, uint8_t chal[8]);
+NTSTATUS auth_get_challenge(struct auth4_context *auth_ctx, uint8_t chal[8]);
 NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
 			    struct ldb_context *sam_ctx,
 			    uint32_t logon_parameters,
@@ -175,10 +175,7 @@ NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
 			    const char *name_for_logs,
 			    bool allow_domain_trust,
 			    bool password_change);
-NTSTATUS authsam_expand_nested_groups(struct ldb_context *sam_ctx,
-				      struct ldb_val *dn_val, const bool only_childs, const char *filter,
-				      TALLOC_CTX *res_sids_ctx, struct dom_sid ***res_sids,
-				      unsigned int *num_res_sids);
+
 struct auth_session_info *system_session(struct loadparm_context *lp_ctx);
 NTSTATUS authsam_make_user_info_dc(TALLOC_CTX *mem_ctx, struct ldb_context *sam_ctx,
 					   const char *netbios_name,
@@ -196,17 +193,17 @@ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **methods,
 				     struct imessaging_context *msg,
 				     struct loadparm_context *lp_ctx,
 				     struct ldb_context *sam_ctx,
-				     struct auth_context **auth_ctx);
+				     struct auth4_context **auth_ctx);
 const char **auth_methods_from_lp(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
 
 NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx,
 			     struct tevent_context *ev,
 			     struct imessaging_context *msg,
 			     struct loadparm_context *lp_ctx,
-			     struct auth_context **auth_ctx);
-NTSTATUS auth_context_create_from_ldb(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, struct auth_context **auth_ctx);
+			     struct auth4_context **auth_ctx);
+NTSTATUS auth_context_create_from_ldb(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, struct auth4_context **auth_ctx);
 
-NTSTATUS auth_check_password(struct auth_context *auth_ctx,
+NTSTATUS auth_check_password(struct auth4_context *auth_ctx,
 			     TALLOC_CTX *mem_ctx,
 			     const struct auth_usersupplied_info *user_info,
 			     struct auth_user_info_dc **user_info_dc);
@@ -225,17 +222,17 @@ NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
 
 struct tevent_req *auth_check_password_send(TALLOC_CTX *mem_ctx,
 					    struct tevent_context *ev,
-					    struct auth_context *auth_ctx,
+					    struct auth4_context *auth_ctx,
 					    const struct auth_usersupplied_info *user_info);
 NTSTATUS auth_check_password_recv(struct tevent_req *req,
 				  TALLOC_CTX *mem_ctx,
 				  struct auth_user_info_dc **user_info_dc);
 
-bool auth_challenge_may_be_modified(struct auth_context *auth_ctx);
-NTSTATUS auth_context_set_challenge(struct auth_context *auth_ctx, const uint8_t chal[8], const char *set_by);
+bool auth_challenge_may_be_modified(struct auth4_context *auth_ctx);
+NTSTATUS auth_context_set_challenge(struct auth4_context *auth_ctx, const uint8_t chal[8], const char *set_by);
 
 NTSTATUS auth_get_user_info_dc_principal(TALLOC_CTX *mem_ctx,
-					struct auth_context *auth_ctx,
+					struct auth4_context *auth_ctx,
 					const char *principal,
 					struct ldb_dn *user_dn,
 					struct auth_user_info_dc **user_info_dc);
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index e632aec..9b0dbff 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -514,7 +514,7 @@ const char **gensec_security_oids(struct gensec_security *gensec_security,
 static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx, 
 			     struct tevent_context *ev,
 			     struct gensec_settings *settings,
- 			     struct auth_context *auth_context,
+ 			     struct auth4_context *auth_context,
 			     struct gensec_security **gensec_security)
 {
 	if (ev == NULL) {
@@ -604,7 +604,7 @@ _PUBLIC_ NTSTATUS gensec_client_start(TALLOC_CTX *mem_ctx,
 _PUBLIC_ NTSTATUS gensec_server_start(TALLOC_CTX *mem_ctx, 
 				      struct tevent_context *ev,
 				      struct gensec_settings *settings,
-				      struct auth_context *auth_context,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list