svn commit: samba r17362 - in branches/SAMBA_4_0/source/ntvfs/posix: .

metze at samba.org metze at samba.org
Tue Aug 1 10:58:01 GMT 2006


Author: metze
Date: 2006-08-01 10:58:01 +0000 (Tue, 01 Aug 2006)
New Revision: 17362

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

Log:
session_info and smbpid are available from the ntvfs_handle
so we don't need them on the pvfs_file struct.

also we don't need to check is the handle has the correct session
as this is job of the frontend server

metze
Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
   branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c	2006-08-01 10:42:03 UTC (rev 17361)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c	2006-08-01 10:58:01 UTC (rev 17362)
@@ -67,7 +67,7 @@
 		 * for the given SMBPID
 		 */
 		for (f=pvfs->files.list;f;f=f->next) {
-			if (f->smbpid != req->smbpid) continue;
+			if (f->ntvfs->smbpid != req->smbpid) continue;
 
 			pvfs_flush_file(pvfs, f);
 		}

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c	2006-08-01 10:42:03 UTC (rev 17361)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c	2006-08-01 10:58:01 UTC (rev 17362)
@@ -43,11 +43,6 @@
 	f = talloc_get_type(p, struct pvfs_file);
 	if (!f) return NULL;
 
-	if (req->session_info != f->session_info) {
-		DEBUG(2,("pvfs_find_fd: attempt to use wrong session for handle %p\n",h));
-		return NULL;
-	}
-
 	return f;
 }
 
@@ -256,8 +251,6 @@
 	}
 
 	f->ntvfs         = h;
-	f->session_info  = req->session_info;
-	f->smbpid        = req->smbpid;
 	f->pvfs          = pvfs;
 	f->pending_list  = NULL;
 	f->lock_count    = 0;
@@ -690,8 +683,6 @@
 	}
 
 	f->ntvfs             = h;
-	f->session_info      = req->session_info;
-	f->smbpid            = req->smbpid;
 	f->pvfs              = pvfs;
 	f->pending_list      = NULL;
 	f->lock_count        = 0;
@@ -861,8 +852,8 @@
 	*/
 	for (f2=pvfs->files.list;f2;f2=f2->next) {
 		if (f2 != f &&
-		    f2->session_info == req->session_info &&
-		    f2->smbpid == req->smbpid &&
+		    f2->ntvfs->session_info == req->session_info &&
+		    f2->ntvfs->smbpid == req->smbpid &&
 		    (f2->handle->create_options & 
 		     (NTCREATEX_OPTIONS_PRIVATE_DENY_DOS |
 		      NTCREATEX_OPTIONS_PRIVATE_DENY_FCB)) &&
@@ -1120,8 +1111,6 @@
 	}
 
 	f->ntvfs         = h;
-	f->session_info  = req->session_info;
-	f->smbpid        = req->smbpid;
 	f->pvfs          = pvfs;
 	f->pending_list  = NULL;
 	f->lock_count    = 0;
@@ -1344,7 +1333,7 @@
 
 	for (f=pvfs->files.list;f;f=next) {
 		next = f->next;
-		if (f->session_info == req->session_info) {
+		if (f->ntvfs->session_info == req->session_info) {
 			talloc_free(f);
 		}
 	}
@@ -1364,8 +1353,8 @@
 
 	for (f=pvfs->files.list;f;f=next) {
 		next = f->next;
-		if (f->session_info == req->session_info &&
-		    f->smbpid == req->smbpid) {
+		if (f->ntvfs->session_info == req->session_info &&
+		    f->ntvfs->smbpid == req->smbpid) {
 			talloc_free(f);
 		}
 	}

Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h	2006-08-01 10:42:03 UTC (rev 17361)
+++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h	2006-08-01 10:58:01 UTC (rev 17362)
@@ -161,14 +161,6 @@
 	uint32_t share_access;
 	uint32_t access_mask;
 
-	/* we need to remember the session it was opened on,
-	   as it is illegal to operate on someone elses fnum */
-	struct auth_session_info *session_info;
-
-	/* we need to remember the client pid that 
-	   opened the file so SMBexit works */
-	uint16_t smbpid;
-
 	/* a list of pending locks - used for locking cancel operations */
 	struct pvfs_pending_lock *pending_list;
 



More information about the samba-cvs mailing list