diff -Nru samba-3.0.10.orig/docs/htmldocs/smb.conf.5.html samba-3.0.10.dmro/docs/htmldocs/smb.conf.5.html --- samba-3.0.10.orig/docs/htmldocs/smb.conf.5.html 2004-12-15 17:22:07.000000000 +0100 +++ samba-3.0.10.dmro/docs/htmldocs/smb.conf.5.html 2005-01-03 12:34:11.224399000 +0100 @@ -1067,6 +1067,10 @@ yes allows DOS semantics and smbd(8) will change the file timestamp as DOS requires.

Default: dos filetimes = no +

dos mask readonly (S)

+ Mask the dos readonly attribute. Write protected files on UNIX or on readonly shares are shown under DOS and Windows with readonly attribute not set. +

Default: dos mask readonly = no +

ea support (S)

This boolean parameter controls whether smbd(8) will allow clients to attempt to store OS/2 style Extended attributes on a share. In order to enable this parameter the underlying filesystem exported by the share must support extended attributes (such as provided on XFS and EXT3 on Linux, with the diff -Nru samba-3.0.10.orig/docs/manpages/smb.conf.5 samba-3.0.10.dmro/docs/manpages/smb.conf.5 --- samba-3.0.10.orig/docs/manpages/smb.conf.5 2004-12-15 17:20:36.000000000 +0100 +++ samba-3.0.10.dmro/docs/manpages/smb.conf.5 2005-01-03 12:29:32.582943000 +0100 @@ -1161,6 +1161,12 @@ Default: \fB\fIdos filetimes\fR = no \fR .TP +dos mask readonly (S) +Mask the dos readonly attribute. Write protected files on UNIX or on readonly shares are shown under DOS and Windows with readonly attribute not set. + +Default: \fB\fIdos mask readonly\fR = no \fR + +.TP ea support (S) This boolean parameter controls whether \fBsmbd\fR(8) will allow clients to attempt to store OS/2 style Extended attributes on a share\&. In order to enable this parameter the underlying filesystem exported by the share must support extended attributes (such as provided on XFS and EXT3 on Linux, with the correct kernel patches)\&. On Linux the filesystem must have been mounted with the mount option user_xattr in order for extended attributes to work, also extended attributes must be compiled into the Linux kernel\&. diff -Nru samba-3.0.10.orig/source/param/loadparm.c samba-3.0.10.dmro/source/param/loadparm.c --- samba-3.0.10.orig/source/param/loadparm.c 2004-12-15 15:33:14.000000000 +0100 +++ samba-3.0.10.dmro/source/param/loadparm.c 2005-01-03 12:10:39.241413000 +0100 @@ -9,6 +9,10 @@ Copyright (C) Alexander Bokovoy 2002 Copyright (C) Stefan (metze) Metzmacher 2002 Copyright (C) Jim McDonough 2003 + + 07/14/2004 added "dos mask readonly" support + Markus Greger + Thomas Maier This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -422,6 +426,7 @@ BOOL bAfs_Share; BOOL bEASupport; param_opt_struct *param_opt; + BOOL bDosMaskReadonly; /* "dos mask readonly" patch by Markus Greger, Thomas Maier IZB SOFT 07/14/2004 */ char dummy[3]; /* for alignment */ } @@ -549,6 +554,9 @@ NULL, /* Parametric options */ +/* "dos mask readonly" patch by Markus Greger, Thomas Maier IZB SOFT 07/14/2004 */ + False, /* Dos Mask Readonly */ + "" /* dummy */ }; @@ -1152,6 +1160,8 @@ {"dos filemode", P_BOOL, P_LOCAL, &sDefault.bDosFilemode, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, {"dos filetimes", P_BOOL, P_LOCAL, &sDefault.bDosFiletimes, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, {"dos filetime resolution", P_BOOL, P_LOCAL, &sDefault.bDosFiletimeResolution, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, +/* "dos mask readonly" patch by Markus Greger, Thomas Maier IZB SOFT 07/14/2004 */ + {"dos mask readonly", P_BOOL, P_LOCAL, &sDefault.bDosMaskReadonly, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, {"fake directory create times", P_BOOL, P_LOCAL, &sDefault.bFakeDirCreateTimes, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, {"panic action", P_STRING, P_GLOBAL, &Globals.szPanicAction, NULL, NULL, FLAG_ADVANCED}, @@ -1919,6 +1929,8 @@ FN_GLOBAL_INTEGER(lp_name_cache_timeout, &Globals.name_cache_timeout) FN_GLOBAL_INTEGER(lp_client_signing, &Globals.client_signing) FN_GLOBAL_INTEGER(lp_server_signing, &Globals.server_signing) +/* "dos mask readonly" patch by Markus Greger, Thomas Maier IZB SOFT 07/14/2004 */ +FN_LOCAL_BOOL(lp_dos_mask_ro, bDosMaskReadonly) /* local prototypes */ diff -Nru samba-3.0.10.orig/source/smbd/dosmode.c samba-3.0.10.dmro/source/smbd/dosmode.c --- samba-3.0.10.orig/source/smbd/dosmode.c 2004-12-15 15:12:15.000000000 +0100 +++ samba-3.0.10.dmro/source/smbd/dosmode.c 2005-01-03 12:13:03.313858000 +0100 @@ -3,6 +3,10 @@ dos mode handling functions Copyright (C) Andrew Tridgell 1992-1998 + 07/14/2004 added "dos mask readonly" support + Markus Greger + Thomas Maier + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -148,6 +152,10 @@ #endif #endif + /* "dos mask readonly" patch by Markus Greger, Thomas Maier IZB SOFT 07/14/2004 */ + if ( (result & aRONLY) && lp_dos_mask_ro(SNUM(conn)) ) + result &= ~(aRONLY); + DEBUG(8,("dos_mode_from_sbuf returning ")); if (result & aHIDDEN) DEBUG(8, ("h"));