svn commit: samba r16229 - in trunk/source: lib smbd

vlendec at samba.org vlendec at samba.org
Wed Jun 14 18:32:28 GMT 2006


Author: vlendec
Date: 2006-06-14 18:32:28 +0000 (Wed, 14 Jun 2006)
New Revision: 16229

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

Log:
Remove to references to current_user_info: authorise_login and subsequently
user_ok are only called in sec=share mode, where we don't have
current_user_info set anyway.

Volker


Modified:
   trunk/source/lib/util_str.c
   trunk/source/smbd/password.c


Changeset:
Modified: trunk/source/lib/util_str.c
===================================================================
--- trunk/source/lib/util_str.c	2006-06-14 18:10:46 UTC (rev 16228)
+++ trunk/source/lib/util_str.c	2006-06-14 18:32:28 UTC (rev 16229)
@@ -28,8 +28,6 @@
  * @brief String utilities.
  **/
 
-extern userdom_struct current_user_info;
-
 /**
  * Get the next token from a string, return False if none found.
  * Handles double-quotes.
@@ -1886,13 +1884,14 @@
  for the work
  *****************************************************************************/
  
-BOOL str_list_sub_basic( char **list, const char *smb_name )
+BOOL str_list_sub_basic( char **list, const char *smb_name,
+			 const char *domain_name )
 {
 	char *s, *tmpstr;
 	
 	while ( *list ) {
 		s = *list;
-		tmpstr = alloc_sub_basic(smb_name, current_user_info.domain, s);
+		tmpstr = alloc_sub_basic(smb_name, domain_name, s);
 		if ( !tmpstr ) {
 			DEBUG(0,("str_list_sub_basic: alloc_sub_basic() return NULL!\n"));
 			return False;

Modified: trunk/source/smbd/password.c
===================================================================
--- trunk/source/smbd/password.c	2006-06-14 18:10:46 UTC (rev 16228)
+++ trunk/source/smbd/password.c	2006-06-14 18:32:28 UTC (rev 16229)
@@ -29,9 +29,6 @@
 static int next_vuid = VUID_OFFSET;
 static int num_validated_vuids;
 
-extern userdom_struct current_user_info;
-
-
 /****************************************************************************
  Check if a uid has been validated, and return an pointer to the user_struct
  if it has. NULL if not. vuid is biased by an offset. This allows us to
@@ -550,9 +547,11 @@
 		str_list_copy(&invalid, lp_invalid_users(snum));
 		if (invalid &&
 		    str_list_substitute(invalid, "%S", lp_servicename(snum))) {
-			if ( invalid &&
-			     str_list_sub_basic(invalid,
-						current_user_info.smb_name) ) {
+
+			/* This is used in sec=share only, so no current user
+			 * around to pass to str_list_sub_basic() */
+
+			if ( invalid && str_list_sub_basic(invalid, "", "") ) {
 				ret = !user_in_list(user,
 						    (const char **)invalid);
 			}
@@ -565,9 +564,11 @@
 		str_list_copy(&valid, lp_valid_users(snum));
 		if ( valid &&
 		     str_list_substitute(valid, "%S", lp_servicename(snum)) ) {
-			if ( valid &&
-			     str_list_sub_basic(valid,
-						current_user_info.smb_name) ) {
+
+			/* This is used in sec=share only, so no current user
+			 * around to pass to str_list_sub_basic() */
+
+			if ( valid && str_list_sub_basic(valid, "", "") ) {
 				ret = user_in_list(user, (const char **)valid);
 			}
 		}



More information about the samba-cvs mailing list