summaryrefslogtreecommitdiffstats
path: root/source/locking
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2008-12-06 16:08:35 -0800
committerKarolin Seeger <kseeger@samba.org>2008-12-11 10:27:19 +0100
commit8512b4bde5a315dfccabbeb1a3938f4eace63336 (patch)
tree99af9ea06aa92cd4eb114ac92bc2780cd6751600 /source/locking
parentb3f9799927cd03d40c63948185a071f50bb998e5 (diff)
downloadsamba-8512b4bde5a315dfccabbeb1a3938f4eace63336.tar.gz
samba-8512b4bde5a315dfccabbeb1a3938f4eace63336.tar.xz
samba-8512b4bde5a315dfccabbeb1a3938f4eace63336.zip
Fix a delete on close divergence from windows [2/2]
This second patch cleans up by removing all of the code that is made obsolete by the first patch. It should cause no functional changes. (cherry picked from commit c39c35f3e67a726c6464c1497e46fe7a2eb3dc77)
Diffstat (limited to 'source/locking')
-rw-r--r--source/locking/locking.c46
1 files changed, 1 insertions, 45 deletions
diff --git a/source/locking/locking.c b/source/locking/locking.c
index 368ab1687cc..c30a1052240 100644
--- a/source/locking/locking.c
+++ b/source/locking/locking.c
@@ -1067,13 +1067,10 @@ static void add_share_mode_entry(struct share_mode_lock *lck,
}
void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
- uid_t uid, uint16 mid, uint16 op_type, bool initial_delete_on_close_allowed)
+ uid_t uid, uint16 mid, uint16 op_type)
{
struct share_mode_entry entry;
fill_share_mode_entry(&entry, fsp, uid, mid, op_type);
- if (initial_delete_on_close_allowed) {
- entry.flags |= SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE;
- }
add_share_mode_entry(lck, &entry);
}
@@ -1271,22 +1268,6 @@ NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
return NT_STATUS_OK;
}
-/****************************************************************************
- Do we have an open file handle that created this entry ?
-****************************************************************************/
-
-bool can_set_initial_delete_on_close(const struct share_mode_lock *lck)
-{
- int i;
-
- for (i=0; i<lck->num_share_modes; i++) {
- if (lck->share_modes[i].flags & SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE) {
- return True;
- }
- }
- return False;
-}
-
/*************************************************************************
Return a talloced copy of a UNIX_USER_TOKEN. NULL on fail.
(Should this be in locking.c.... ?).
@@ -1380,31 +1361,6 @@ bool set_delete_on_close(files_struct *fsp, bool delete_on_close, UNIX_USER_TOKE
return True;
}
-/****************************************************************************
- Sets the allow initial delete on close flag for this share mode.
-****************************************************************************/
-
-bool set_allow_initial_delete_on_close(struct share_mode_lock *lck, files_struct *fsp, bool delete_on_close)
-{
- struct share_mode_entry entry, *e;
-
- /* Don't care about the pid owner being correct here - just a search. */
- fill_share_mode_entry(&entry, fsp, (uid_t)-1, 0, NO_OPLOCK);
-
- e = find_share_mode_entry(lck, &entry);
- if (e == NULL) {
- return False;
- }
-
- if (delete_on_close) {
- e->flags |= SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE;
- } else {
- e->flags &= ~SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE;
- }
- lck->modified = True;
- return True;
-}
-
bool set_sticky_write_time(struct file_id fileid, struct timespec write_time)
{
struct share_mode_lock *lck;