svn commit: samba r6251 - in trunk/source/smbd: .

jra at samba.org jra at samba.org
Fri Apr 8 19:21:35 GMT 2005


Author: jra
Date: 2005-04-08 19:21:35 +0000 (Fri, 08 Apr 2005)
New Revision: 6251

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

Log:
Re-order position of become_root() to allow directory to be
read first.
Jeremy.

Modified:
   trunk/source/smbd/oplock.c


Changeset:
Modified: trunk/source/smbd/oplock.c
===================================================================
--- trunk/source/smbd/oplock.c	2005-04-08 17:05:01 UTC (rev 6250)
+++ trunk/source/smbd/oplock.c	2005-04-08 19:21:35 UTC (rev 6251)
@@ -807,7 +807,6 @@
 	saved_user_conn = current_user.conn;
 	saved_vuid = current_user.vuid;
 	saved_fsp_conn = fsp->conn;
-	change_to_root_user();
 	/*
 	 * Initialize saved_dir to something sensible: vfs_GetWd may not work well
 	 * for root: the directory may be NFS-mounted and exported with root_squash
@@ -818,6 +817,10 @@
 	/* Save the chain fnum. */
 	file_chain_save();
 
+	pstrcpy(file_name, fsp->fsp_name);
+
+	change_to_root_user();
+
 	/*
 	 * From Charles Hoch <hoch at exemplary.com>. If the break processing
 	 * code closes the file (as it often does), then the fsp pointer here
@@ -825,8 +828,6 @@
 	 * around the loop.
 	 */
 
-	pstrcpy(file_name, fsp->fsp_name);
-
 	while((fsp = initial_break_processing(dev, inode, file_id)) &&
 			OPEN_FSP(fsp) && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
 		if(receive_smb(smbd_server_fd(),inbuf, timeout) == False) {



More information about the samba-cvs mailing list