How to turn O_RDWR opened file to O_RDONLY in vfs-module?

Stéphane PURNELLE stephane.purnelle at corman.be
Mon Jan 6 08:46:11 MST 2014


Hi,

see this link,maybe you will have answer about your request : 
https://wiki.samba.org/index.php/VFS/vfs_worm


-----------------------------------
Stéphane PURNELLE                         Admin. Systèmes et Réseaux 
Service Informatique       Corman S.A.           Tel : 00 32 (0)87/342467

samba-technical-bounces at lists.samba.org wrote on 06/01/2014 16:03:14:

> De : Jiri Sasek <jiri.sasek at oracle.com>
> A : samba tech <samba-technical at lists.samba.org>, 
> Date : 06/01/2014 16:37
> Objet : How to turn O_RDWR opened file to O_RDONLY in vfs-module?
> Envoyé par : samba-technical-bounces at lists.samba.org
> 
> Hi all,
> 
> My primary interest is to create a VFS module to emulate WORM (Write 
> Once Read Many) on Samba share. My idea is to set the O_RDONLY on 
> already existing files. Put it into <worm>_open() VFS-call so in case if 

> the "(int) flags" (4-th parameter) is set to O_RDWR then set the file as 

> read-only and leave the job on the local filesystem which will disallow 
> the further write() ops.
> 
> Is here anyone who knows the Samba internals and can point me to 
> appropriate struct/call?
> 
> Many thanks in advance,
> 
> Jiri


More information about the samba-technical mailing list