[PATCH] Dynamic share permission change detection.

boyang boyang at samba.org
Mon Nov 30 04:56:46 MST 2009


Hi, *:
    Here is the implementation of dynamic share permission change
detection for s3. pls review and comment.
   
 * part 1: the message handler part
 * part 2: use inotify in a separate smbd process  to watch on
usershare. I didn't figure out how to achieve this when inotify is
unavailable. :-(. A unix domain socket in the separate smbd process
would work. The process listen on the socket, net utils connect to the
socket when it updates user shares. But it is not security, is it?
 * part 3: make dynamic detection work with normal share.
 * part 4: several bug fixes. The most important one is that we must not
touch vuid cache.

test case(tree connection is always open here):
 1. open a file, write and keep it open ---> use a pipe to change
permission from rw to ro ---> perform a second write
 2. open a file ---> write and close the file --> use a pipe to change
share permission (rw --> ro) ---> reopen it and write again
 3. open a file, write and keep the file open ---> use a pipe to delete
the share ---> perform a second write
 4. open a file ---> write and close the file ---> use a pipe to delete
the share ---> perform a second write
 5. remove a file ---> user a pipe to change share permission (rw -->
ro) ---> try to remove another file
They all behaved the same as windows 2003.
 1. both the two write succeeded.
 2. the first write succeeded, the second one failed.
 3. first one succeeded, second one failed
 4. first one succeeded, second one failed
 5 first one succeeded, second one failed.

Thanks!

-- 
Bo Yang, Software Engineer, Suse Labs
GPG-key-ID   538C4C1A
Samba Team   boyang at samba.org    http://www.samba.org/
SUSE Linux   boyang at suse.de      http://www.novell.com/



More information about the samba-technical mailing list