From 5a85f2070cfd5a5c3defad59506e151dd47be58b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 23 Oct 1998 03:41:11 +0000 Subject: Fixed bug in previous commit where I was overwriting share_mode from one fsp with that of another. Not good :-). Jeremy. (This used to be commit 269bca2b3bbf5cae9fdf05d0405bfd80272da5d1) --- source3/smbd/trans2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 1c2bdb1ddf..e19b3a94a8 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1681,9 +1681,6 @@ static int call_trans2setfilepathinfo(connection_struct *conn, files_struct *iterate_fsp; SMB_DEV_T dev = fsp->fd_ptr->dev; SMB_INO_T inode = fsp->fd_ptr->inode; - int new_share_mode = (delete_on_close ? - (fsp->share_mode | DELETE_ON_CLOSE_FLAG) : - (fsp->share_mode & ~DELETE_ON_CLOSE_FLAG) ); DEBUG(10,("call_trans2setfilepathinfo: %s delete on close flag for fnum = %d, file %s\n", delete_on_close ? "Adding" : "Removing", fsp->fnum, fsp->fsp_name )); @@ -1699,6 +1696,10 @@ static int call_trans2setfilepathinfo(connection_struct *conn, for(iterate_fsp = file_find_di_first(dev, inode); iterate_fsp; iterate_fsp = file_find_di_next(iterate_fsp)) { + int new_share_mode = (delete_on_close ? + (iterate_fsp->share_mode | DELETE_ON_CLOSE_FLAG) : + (iterate_fsp->share_mode & ~DELETE_ON_CLOSE_FLAG) ); + if(modify_share_mode(token, iterate_fsp, new_share_mode)==False) DEBUG(0,("call_trans2setfilepathinfo: failed to change delete on close for fnum %d, \ dev = %x, inode = %.0f\n", fsp->fnum, (unsigned int)dev, (double)inode)); -- cgit