[Mono-bugs] [Bug 46077][Nor] Changed - FileShare Enumeration is not implemented by Mono

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 20 Oct 2003 10:56:02 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by dick@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=46077

--- shadow/46077	2003-10-17 14:22:50.000000000 -0400
+++ shadow/46077.tmp.27427	2003-10-20 10:56:02.000000000 -0400
@@ -82,6 +82,32 @@
 neck to fix it.
 
 In particular, I remember rpm leaving the database locked and
 requiring a reboot.
 
 Dick, can you comment on this?
+
+------- Additional Comments From dick@ximian.com  2003-10-20 10:56 -------
+I guess we can implement it on systems that support it, and just fail
+to lock on others.  However...
+
+The default FileShare value for the other File.Open() methods is
+FileShare.None, which would mean that just about every file opened
+would be mandatorily locked.  That would suck.  I don't know how large
+the kernel lock tables are these days, but it can't be a good idea to
+lock every single open file.
+
+And this last paragraph from linux/Documentation/mandatory.txt:
+
+6. Warning!
+-----------
+
+Not even root can override a mandatory lock, so runaway processes can
+wreak havoc if they lock crucial files. The way around it is to change
+the file permissions (remove the setgid bit) before trying to read or
+write to it. Of course, that might be a bit tricky if the system is
+hung :-(
+
+[The file permissions refers to a ghastly hack by the SysV designers:
+a file with the setgid bit but not the group-exec bit in its file mode
+is a candidate for mandatory locking.]
+