[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Mon Mar 15 16:40:53 MDT 2010


The branch, master has been updated
       via  c35c380... Remove the bool admin_user from conn struct. We no longer look at this to make access decisions.
      from  704a607... Fix bug #7188 - Logic error in check of total_data for call_trans2mkdir()

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


- Log -----------------------------------------------------------------
commit c35c38075c96fddd0dcd41b4173ca47a9c07df92
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Mar 15 15:39:41 2010 -0700

    Remove the bool admin_user from conn struct. We no longer look at this to make access decisions.
    
    Jeremy.

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

Summary of changes:
 source3/include/smb.h          |    2 --
 source3/modules/vfs_readonly.c |    1 -
 source3/smbd/service.c         |    1 -
 source3/smbd/uid.c             |   10 +++++-----
 4 files changed, 5 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index 8674629..52b9843 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -481,7 +481,6 @@ struct vuid_cache_entry {
 	struct auth_serversupplied_info *server_info;
 	uint16_t vuid;
 	bool read_only;
-	bool admin_user;
 };
 
 struct vuid_cache {
@@ -567,7 +566,6 @@ typedef struct connection_struct {
 	bool printer;
 	bool ipc;
 	bool read_only; /* Attributes for the current user of the share. */
-	bool admin_user; /* Attributes for the current user of the share. */
 	/* Does this filesystem honor
 	   sub second timestamps on files
 	   and directories when setting time ? */
diff --git a/source3/modules/vfs_readonly.c b/source3/modules/vfs_readonly.c
index afb167f..09cbf50 100644
--- a/source3/modules/vfs_readonly.c
+++ b/source3/modules/vfs_readonly.c
@@ -85,7 +85,6 @@ static int readonly_connect(vfs_handle_struct *handle,
         ent->vuid = UID_FIELD_INVALID;
         TALLOC_FREE(ent->server_info);
         ent->read_only = false;
-        ent->admin_user = false;
       }
       conn->vuid_cache.next_entry = 0;
     }
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 0452ef5..db54d46 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -720,7 +720,6 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
 	conn->aio_write_behind_list = NULL;
 
 	conn->read_only = lp_readonly(SNUM(conn));
-	conn->admin_user = False;
 
 	if (*lp_force_user(snum)) {
 
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 9dc354b..5e61098 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -98,7 +98,6 @@ static bool check_user_ok(connection_struct *conn,
 				free_conn_server_info_if_unused(conn);
 				conn->server_info = ent->server_info;
 				conn->read_only = ent->read_only;
-				conn->admin_user = ent->admin_user;
 				return(True);
 			}
 		}
@@ -160,14 +159,16 @@ static bool check_user_ok(connection_struct *conn,
 
 		ent->vuid = vuid;
 		ent->read_only = readonly_share;
-		ent->admin_user = admin_user;
 		free_conn_server_info_if_unused(conn);
 		conn->server_info = ent->server_info;
 	}
 
 	conn->read_only = readonly_share;
-	conn->admin_user = admin_user;
-	if (conn->admin_user) {
+	if (admin_user) {
+		DEBUG(2,("check_user_ok: user %s is an admin user. "
+			"Setting uid as %d\n",
+			conn->server_info->unix_name,
+			sec_initial_uid() ));
 		conn->server_info->utok.uid = sec_initial_uid();
 	}
 
@@ -214,7 +215,6 @@ void conn_clear_vuid_cache(connection_struct *conn, uint16_t vuid)
 				TALLOC_FREE(ent->server_info);
 			}
 			ent->read_only = False;
-			ent->admin_user = False;
 		}
 	}
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list