Bug 5900 - vfs_readonly.so does not work
Summary: vfs_readonly.so does not work
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.2.4
Hardware: x86 Linux
: P3 minor
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-15 07:10 UTC by TAKAHASHI Motonobu
Modified: 2008-12-14 09:23 UTC (History)
1 user (show)

See Also:


Attachments
patch for displaying debug logs (626 bytes, patch)
2008-11-15 07:11 UTC, TAKAHASHI Motonobu
no flags Details
Patch for 3.2.x (1.96 KB, patch)
2008-11-17 15:37 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description TAKAHASHI Motonobu 2008-11-15 07:10:50 UTC
It seems that vfs_readonly.so does not work.

(1) apply to the patch attached (to display what happened).

(2) set parameters in smb.conf:

-----
[share1]
  ...
  vfs objects = readonly
readonly:period = "today 21:40","today 23:40"
(current time is 22:03)
-----

(3) connect to share and view the log:

-----
[2008/11/15 22:03:00,  0] modules/vfs_readonly.c:readonly_connect(71)
  period0 is 1226752800, period1 is 1226760000, current_time is 1226754180
[2008/11/15 22:03:00,  0] modules/vfs_readonly.c:readonly_connect(75)
  read only =  True
-----

 vfs_readonly module determined "read only = True", but actually, I can write.
Comment 1 TAKAHASHI Motonobu 2008-11-15 07:11:51 UTC
Created attachment 3736 [details]
patch for displaying debug logs
Comment 2 Jeremy Allison 2008-11-17 15:37:31 UTC
Created attachment 3744 [details]
Patch for 3.2.x

This fixes the problem for me. Thanks !
Jeremy.
Comment 3 TAKAHASHI Motonobu 2008-11-17 18:17:19 UTC
Patch #2 works for me, too. Thanks!
This bug should be closed...

Comment 4 TAKAHASHI Motonobu 2008-12-14 09:23:36 UTC
I tested againt Samba 3.2.6 and this bug is fixed at 3.2.6. (And not at 3.2.5) 
  according to the announcement:
http://samba.org/samba/history/samba-3.2.6.html

-----
    * BUG 5900: Fix vfs_readonly.
-----

Thanks!