summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-08-22 01:01:37 +0000
committerJeremy Allison <jra@samba.org>2001-08-22 01:01:37 +0000
commit85e063f5b8b9ac872dc5e30da99b34230434df84 (patch)
tree3ef37602acb9bad140786280f30b3243044baa06 /source3/smbd
parente4275a35a64fde95a3b59307572d44c8d53909ad (diff)
downloadsamba-85e063f5b8b9ac872dc5e30da99b34230434df84.tar.gz
samba-85e063f5b8b9ac872dc5e30da99b34230434df84.tar.bz2
samba-85e063f5b8b9ac872dc5e30da99b34230434df84.zip
Tidyup fixes for fcntl spin problem.
Jeremy. (This used to be commit 27d3dd0e7cb777ef6b21d6966c07045c2940fd37)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 633cf71817..a8cf9aba89 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3,6 +3,7 @@
Version 1.9.
file opening and share modes
Copyright (C) Andrew Tridgell 1992-1998
+ Copyright (C) Jeremy Allison 2001
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -542,8 +543,8 @@ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (dou
* as exlusive.... The process *must* be dead....
*/
- DEBUG(0,("open_mode_check: exlusive oplock left after break ! For file %s,
-dev = %x, inode = %.0f\n", fname, (unsigned int)dev, (double)inode));
+ DEBUG(0,("open_mode_check: exlusive oplock left by process %d after break ! For file %s,
+dev = %x, inode = %.0f. Deleting it to continue...\n", (int)broken_entry.pid, fname, (unsigned int)dev, (double)inode));
if (process_exists(broken_entry.pid)) {
pstring errmsg;
@@ -553,12 +554,21 @@ dev = %x, inode = %.0f\n", fname, (unsigned int)dev, (double)inode));
smb_panic(errmsg);
}
- if (!clear_share_entry(dev, inode, &broken_entry)) {
+ if (del_share_entry(dev, inode, &broken_entry, NULL) == -1) {
errno = EACCES;
unix_ERR_class = ERRDOS;
unix_ERR_code = ERRbadshare;
return -1;
}
+
+ /*
+ * We must reload the share modes after deleting the
+ * other process's entry.
+ */
+
+ free((char *)old_shares);
+ num_share_modes = get_share_modes(conn, dev, inode, &old_shares);
+ break;
}
} /* end for paranoia... */
} /* end if broke_oplock */