diff options
author | Jeremy Allison <jra@samba.org> | 1998-10-23 03:41:11 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-10-23 03:41:11 +0000 |
commit | 5a85f2070cfd5a5c3defad59506e151dd47be58b (patch) | |
tree | 09e774bf44e8a875ebfd58c2e5db67e1eb02c147 /source3 | |
parent | 9bb7ac81b6e4d33e1be49447dbdbbb8d24259f53 (diff) | |
download | samba-5a85f2070cfd5a5c3defad59506e151dd47be58b.tar.gz samba-5a85f2070cfd5a5c3defad59506e151dd47be58b.tar.bz2 samba-5a85f2070cfd5a5c3defad59506e151dd47be58b.zip |
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)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/trans2.c | 7 |
1 files changed, 4 insertions, 3 deletions
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)); |