summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-11-18 19:06:51 +0000
committerJeremy Allison <jra@samba.org>1998-11-18 19:06:51 +0000
commitbb9622bfa6bbbe74a6e4c032cf81501bcbff999d (patch)
tree05f0a983cee1fdeeb979d4d82b052b7cc4d7c90b /source3/smbd/trans2.c
parent8b1e3580bd5b3e0846389fc0480bd3c6e0606c36 (diff)
downloadsamba-bb9622bfa6bbbe74a6e4c032cf81501bcbff999d.tar.gz
samba-bb9622bfa6bbbe74a6e4c032cf81501bcbff999d.tar.bz2
samba-bb9622bfa6bbbe74a6e4c032cf81501bcbff999d.zip
Fixed crash bug which was assuming that fd_ptr was always non-null
(which is not the case with open directories). Jeremy. (This used to be commit c154b1601f5891d664fc538ec8874fa8ef2061e6)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 81ba511c77..db2be094b1 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1756,7 +1756,7 @@ file %s as a share exists that was not opened with FILE_DELETE access.\n",
(iterate_fsp->share_mode | DELETE_ON_CLOSE_FLAG) :
(iterate_fsp->share_mode & ~DELETE_ON_CLOSE_FLAG) );
- DEBUG(10,("call_trans2setfilepathinfo: Changing share mode for fnum %d, file %s\
+ DEBUG(10,("call_trans2setfilepathinfo: Changing share mode for fnum %d, file %s \
dev = %x, inode = %.0f from %x to %x\n",
iterate_fsp->fnum, iterate_fsp->fsp_name, (unsigned int)dev,
(double)inode, iterate_fsp->share_mode, new_share_mode ));
@@ -1771,9 +1771,12 @@ dev = %x, inode = %.0f\n", iterate_fsp->fnum, (unsigned int)dev, (double)inode))
* counted struct. Delete when the last reference
* goes away.
*/
- fsp->fd_ptr->delete_on_close = delete_on_close;
+ fsp->fd_ptr->delete_on_close = delete_on_close;
- unlock_share_entry(fsp->conn, dev, inode, token);
+ unlock_share_entry(fsp->conn, dev, inode, token);
+
+ DEBUG(10, ("call_trans2setfilepathinfo: %s delete on close flag for fnum = %d, file %s\n",
+ delete_on_close ? "Added" : "Removed", fsp->fnum, fsp->fsp_name ));
} /* end if(delete_on_close && !GET_DELETE_ON_CLOSE_FLAG(fsp->share_mode)) */
} /* end if lp_share_modes() */