patch for samba 3.0.4: dos mask readonly

Maier, Thomas Thomas.Maier at IZB-SOFT.de
Fri Jul 30 14:08:15 GMT 2004


Hello Samba Devs,

we want to supply a patch for samba, based on the released samba 3.0.4
source code.

We call the patch:  dos mask readonly patch

Patch features:
The "dos mask readonly" patch supplies the ability to mask the dos readonly
attribut on samba shares. E.g. a file on the unix side with permissions
r--r--r-- will look on the windows side as readonly attribut = not set. But
the file keeps readonly!
The new option for the smb.conf is:    dos mask readonly = yes|no
You can use it in the [globals] section or in a share definition section.
Default setting for "dos mask readonly" is "no".


Why did we do this, or why it can be useful:
If you copy files from a readonly samba share using the windows explorer or
some other tools, file attributes are preserved at the copied file. In some
cases this is not desired if the copied files should or must not be
readonly. In such cases you have to a) remove the readonly attribut
(manually) or b) use a copy tool that does not preserve file attributes.
Our situation: we have a database tool that should import files from a
readonly samba share into its database. But the imported files must not have
the readonly attribut set! The only way to do this without this patch is to
do an extra copy step and remove the readonly attribut before the import.
This is not acceptable (time problems) if you have to copy/import large
amount of files (>10 GB).


We are now running Samba 3.0.4 with the "dos mask readonly" patch on Sun
Solaris 8 (sparc) and it seems to work nicely ;)


Modified files:
source/param/loadparam.c
source/smbd/dosmode.c

The patch file was generated with GNU diff -Nur


 <<patch-samba.3.0.4-dosmaskro.gz>> 


Would be glad if this patch will make it into Samba.

Thanks.


Thomas Maier

IZB SOFT GmbH & Co. KG
Bereich S84
St.-Martin-Straße 47
81541 München
Telefon: 089/4907-2151
E-Mail: mailto:Thomas.Maier at izb-soft.de
Internet: http://www.izb-soft.de



-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-samba.3.0.4-dosmaskro.gz
Type: application/octet-stream
Size: 1196 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20040730/d50f4f14/patch-samba.3.0.4-dosmaskro.obj


More information about the samba-technical mailing list