diff options
author | Jonas Smedegaard <dr@jones.dk> | 2002-04-13 06:41:27 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2002-04-13 06:41:27 +0000 |
commit | 30fe74713d2d299e285836172f46b622aa7f4042 (patch) | |
tree | f06e159f635ab1a46be7a717926fde3ac6b6a1fe | |
parent | ec6106e149872932741f744c843cf44448d05ae8 (diff) |
More work on m2 files sharing config.
-rw-r--r-- | file-baal.divitech.local.m4 | 17 | ||||
-rw-r--r-- | file-thor.venture.local.m4 | 4 | ||||
-rw-r--r-- | samba/smb-shares.m4 | 203 |
3 files changed, 113 insertions, 111 deletions
diff --git a/file-baal.divitech.local.m4 b/file-baal.divitech.local.m4 new file mode 100644 index 0000000..28ae350 --- /dev/null +++ b/file-baal.divitech.local.m4 @@ -0,0 +1,17 @@ +dnl +dnl /etc/local/file-baal.divitech.local.m4 +dnl Copyright 2002 Jonas Smedegaard <dr@jones.dk> +dnl +dnl $Id: file-baal.divitech.local.m4,v 1.1 2002-04-13 06:41:27 jonas Exp $ +dnl +dnl Samba shares for Homebase Samba and Netatalk servers +dnl +dnl Used by /etc/cfengine/cf.local.services.file.conf.m4 and /etc/samba/smb-shares.m4 +dnl +_dir(any,/home/fsadmin/COMMON,fsadmin,fsadmin,755) +_files(win,netlogon,Network logon,/etc/samba/netlogon,root,root,755,ro) +_files(win,userprofiles,,/home/fsadmin/COMMON/samba/userprofiles,fsadmin,fsadmin,775) +_homefiles(win,homes,,/home/%u/.pcshare) +_files(win,software,Fælles softshare,/home/fsadmin/COMMON/software,fsadmin,fsadmin,775,rw,fsadmin) +_files(win,dokumenter,Fælles drev for delte filer,/home/fsadmin/COMMON/documents,fsadmin,fsadmin,775,rw,fsadmin) +_files(win,admin,Dokumentation og adminværktøjer,/home/fsadmin/COMMON/admin,fsadmin,fsadmin,755,ro) diff --git a/file-thor.venture.local.m4 b/file-thor.venture.local.m4 index 31ca573..6564e03 100644 --- a/file-thor.venture.local.m4 +++ b/file-thor.venture.local.m4 @@ -2,7 +2,7 @@ dnl dnl /etc/local/file-thor.venture.local.m4 dnl Copyright 2002 Jonas Smedegaard <dr@jones.dk> dnl -dnl $Id: file-thor.venture.local.m4,v 1.2 2002-04-07 23:48:42 jonas Exp $ +dnl $Id: file-thor.venture.local.m4,v 1.3 2002-04-13 06:41:27 jonas Exp $ dnl dnl Samba shares for Homebase Samba and Netatalk servers dnl @@ -20,4 +20,4 @@ _files(win,it,IT,/home/it/it,it,it,775) _files(win,edu,Education,/home/edu/edu,edu,edu,775) _files(win,service,Service,/home/service/service,service,service,775) _files(win,netlogon,Network logon,/etc/samba/netlogon,root,root,755) -_files(win,profiles,Brugerprofiler,/home/fsadmin/COMMON/samba/userprofiles,fsadmin,fsadmin,777) +_files(win,userprofiles,Brugerprofiler,/home/fsadmin/COMMON/samba/userprofiles,fsadmin,fsadmin,777) diff --git a/samba/smb-shares.m4 b/samba/smb-shares.m4 index 6aca51e..8db5712 100644 --- a/samba/smb-shares.m4 +++ b/samba/smb-shares.m4 @@ -2,7 +2,7 @@ ifelse(` /etc/samba/smb-shares.m4 Copyright 2002 Jonas Smedegaard <dr@jones.dk> -$Id: smb-shares.m4,v 1.7 2002-04-07 23:48:42 jonas Exp $ +$Id: smb-shares.m4,v 1.8 2002-04-13 06:41:27 jonas Exp $ m4 share definitions for generating Samba server smb.conf include file @@ -21,7 +21,7 @@ where <gid>: group name of mountpoint owner <modes>: Numeric access modes of mount point <path>: Full path to mount point - <group>: Primary group with (readonly) access to mountpoint. Public (or whatever limited by filesystem) readonly access if omitted + <group>: Primary group with access to mountpoint (default readonly). Public access if omitted <othergroup>: Secondary group with readonly access Example: @@ -33,117 +33,102 @@ Example: _printer(win,LW,Networkprinter queue for Apple LaserWriter 16/600,/tmp,lw) ')dnl -define(_veto_mac, - `/.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/')dnl -define(_share_logon, -[$1] - comment = $2 - path = $3 -)dnl -define(_share_profiles, -[$1] - comment = $2 - path = $3 - force user = %u - writable = yes - browsable = yes - root preexec = '/bin/mkdir $3/%U \ - /bin/chown %U $3/%U \ - /bin/chmod 700 $3/%U' -)dnl -define(_share_reference, -[$1] - comment = $2 - path = $3 - guest ok = yes -)dnl -dnl -define(_share_home, +changequote(<, >)dnl +define(<_veto_mac>, </.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/>)dnl +define(<_warn>, +< // WARNING: $1 +>)dnl +define(<_masks>, +< create mask = $1 + directory mask = $2 +>)dnl +define(<_pre_mkdir>, +< root preexec = '/bin/mkdir $1 \ + /bin/chown $2 $1 \ + /bin/chmod $3 $1' +>)dnl +define(<_dir>, <>)dnl +define(<_files>, +<ifelse($1,win, +undefine(<_mkdir>)dnl +undefine(<_group_read>)dnl +undefine(<_world_read>)dnl +undefine(<_user_write>)dnl +undefine(<_group_write>)dnl [$2] - comment = $3 path = $4 - writeable = yes - root preexec = '/bin/mkdir $4 \ - /bin/chown %S $4 \ - /bin/chmod 700 $4' -)dnl -define(_share_home_mac, -[home_mac] - comment = $1 - path = $2 +ifelse($3,,, +< comment = $3 +>)ifelse($2,<netlogon>, +< browseable = no +>, + $2,<userprofiles>, +<dnl +define(<_mkdir>, <$4/%U>)dnl +define(<_chown>, <%U>)dnl +define(<_chmod>, <700>)dnl +>, + $2,<reference>, +< guest ok = yes +>, + $2,<homes>, +<dnl +define(<_mkdir>, <$4>)dnl +define(<_chown>, <%S>)dnl +define(<_chmod>, <644>)dnl +define(<_user_write>)dnl +define(<_group_read>)dnl +define(<_world_read>)dnl +>, +<>)dnl +ifdef(<_mkdir>, +_pre_mkdir(<_mkdir>, <_chown>, <_chmod>)dnl )dnl -define(_share_home_web, -[$1] - comment = $2 - path = $3 - writeable = yes - create mask = 0644 - directory mask = 0755 +ifdef($8, + ifelse($8,ro, +<dnl +define(<_group_read>)dnl +>, + $8,rw, + ifdef($9, + ifelse($9,, + _warn(<share group is "rw" but no group specified>), +<dnl +define(<_user_write>)dnl +define(<_group_write>)dnl +>)), + _warn(<share group is wrong. Must be "ro" or "rw">)dnl +))dnl +ifdef(<_user_write>, +< writeable = yes +>ifdef(<_group_write>, + ifdef(<_world_read>, + _masks(0664,0775), + _masks(0660,0770)), +ifdef(<_group_read>, + ifdef(<_world_read>, + _masks(0644,0755), + _masks(0640,0750)), + _masks(0600,0700))dnl +ifdef(<_veto>, +< delete veto files = Yes +>)dnl +), +dnl ***user read, group read***(?) +dnl ***user read*** )dnl -dnl -define(_share_pc, -[$1] - comment = $2 - path = $3 - browsable = yes - writeable = yes - create mask = 0660 - directory mask = 0770 - valid users = @$4 - force group = +$4 -)dnl -define(_share_mac, -[$1] - comment = $2 - path = $3 - browsable = yes - valid users = @$4 - veto files = _veto_mac -)dnl -define(_share_common, -[$1] - comment = $2 - path = $3 - browsable = yes - writeable = yes - create mask = 0660 - directory mask = 0770 - valid users = @$4 - force group = +$4 - delete veto files = Yes - veto files = _veto_mac -)dnl -define(_share_printer, -[$1] - comment = $2 - path = $3 - printable = yes - printer name = $4 -)dnl -dnl -define(_megashare, -[$1] -ifelse($2,,, - comment = $2 -) path = $3 - browsable = yes -ifelse($7,rw, - writeable = yes - create mask = 0660 - directory mask = 0770 -ifelse($8,,, - valid users = @$8 - force group = +$8 -) delete veto files = Yes -) veto files = _veto_mac +ifelse($9,,, +< valid users = @$9 +>ifdef(<_group_write>, +< force group = +$9 +>))dnl +ifdef(<_veto>, +< veto files = _veto_mac +>)dnl )dnl +>)dnl +define(<_homefiles>, +<ifelse($1,win, +<_files($1,$2,$3,$4)>)>)dnl dnl -define(_dir,`')dnl -define(_homefiles,`ifelse($1,win,_share_home($2,$3,$4))')dnl -dnl define(_files,`ifelse($1,win,_megashare($2,$3,$4,$5,$6,$7,$8))')dnl -define(_files,`ifelse($1,win, - ifelse($2,netlogon,_share_logon($2,$3,$4), - $2,profiles,_share_profiles($2,$3,$4), - $2,reference,_share_reference($2,$3,$4), - _share_common($2,$3,$4,$6)))')dnl include(/etc/local-COMMON/file-FQDN.m4)dnl |