diff options
Diffstat (limited to 'source3/smbd/oplock.c')
-rw-r--r-- | source3/smbd/oplock.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 858092407f..e6af12cd81 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -806,6 +806,12 @@ static BOOL oplock_break(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_id, 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 + * (so has no root access). + */ + pstrcpy(saved_dir,saved_fsp_conn->connectpath); vfs_GetWd(saved_fsp_conn,saved_dir); /* Save the chain fnum. */ file_chain_save(); |