summaryrefslogtreecommitdiff
path: root/netatalk/AppleVolumes.default.m4
blob: 4ffe3543f88fee6287d3f83cb34aeb887e13331a (plain)
  1. ifelse(`
  2. /etc/netatalk/AppleVolumes.default.m4
  3. Copyright 2002 Jonas Smedegaard <dr@jones.dk>
  4. $Id: AppleVolumes.default.m4,v 1.1 2002-08-27 01:19:36 jonas Exp $
  5. m4 share definitions for generating Netatalk server AppleVolumes.default file
  6. Usage: m4 -DFQDN=<FQDN> /etc/local-COMMON/netatalk/AppleVolumes.default.m4 > /etc/netatalk/AppleVolumes.default
  7. Depend on file /etc/local-COMMON/file-<FQDN>.m4 containing lines of
  8. the following syntax:
  9. _dir(<path>,<uid>,<gid>,<modes>)dnl
  10. _homefiles(<os>,<mount>,<desc>,<path>[,ro])dnl
  11. _files(<os>,<mount>,<desc>,<path>,<uid>,<gid>,<modes>[,ro[,<group>]|,rw,<group>[,<othergroup>]])dnl
  12. where
  13. <os>: Client operating systems (mac|win|any)
  14. <mount>: Mount point name
  15. Some mount points are handled specially:
  16. "netlogon" has browsing and share modes disabled
  17. "userprofiles" sets "force user" and pre-creates user subdirectory mode 700
  18. "reference" allows guests
  19. "homes" has read/write access and pre-creates directory mode 750
  20. Samba: Use single word and max. 8 characters for WfW compatibility
  21. <desc>: Mount point description. Full(?) support for iso8859-1.
  22. <path>: Full path to mount point directory
  23. <uid>: user name of owner of mount point directory
  24. <gid>: group name of owner of mount point directory
  25. <modes>: Numeric access modes of mount point directory
  26. ro|rw|rop|rwp: Read-only or read/write access to mount point, and wether it should be private (not publically announced).
  27. Read-only access if undefined.
  28. _homefiles are always private.
  29. _homefiles are by default read-only, except "homes" (see above).
  30. <group>: Primary group with access to mountpoint.
  31. If mount point has access "rw" then primary group has read/write access as well.
  32. <othergroup>: Secondary group with readonly access
  33. Example:
  34. _dir(/home/fsadmin/COMMON,fsadmin,fsadmin,755)dnl
  35. _files(win,netlogon,Network logon,/etc/samba/netlogon,root,root,755,ro)
  36. _files(win,userprofiles,User profiles,/home/fsadmin/COMMON/samba/userprofiles,root,root,755)
  37. _files(win,reference,DEBIAN: Samba Linux server,/home/fsadmin/COMMON/reference)
  38. _homefiles(win,homes,Personal files,%H/pc))
  39. _homefiles(mac,,Personal files,~/mac))
  40. _files(win,soft,softshare,/home/fsadmin/COMMON/software,fsadmin,fsadmin,775)dnl
  41. _printer(win,LW,Networkprinter queue for Apple LaserWriter 16/600,/tmp,lw)
  42. TODO:
  43. Support for netatalk is not yet implemented.
  44. <othergroup> is not yet implemented.
  45. Get rid of <os>: <othergroup> is now 10nth parameter which is only available in GNU m4.
  46. All _homefiles (including "homes") should probably have similar access default (read-only).
  47. ')dnl
  48. changequote(<, >)dnl
  49. define(<_veto_mac>, </.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/>)dnl
  50. define(<_warn>,
  51. < # WARNING: $1
  52. # >)dnl
  53. define(<_dir>, <>)dnl
  54. dnl *************
  55. dnl *** files ***
  56. dnl *************
  57. define(<_files>,
  58. <ifelse($1,mac,
  59. undefine(<_group_read>)dnl
  60. undefine(<_world_read>)dnl
  61. undefine(<_user_write>)dnl
  62. undefine(<_group_write>)dnl
  63. $4 ifelse(<$3>,,<"$2">,<"<$3>">)dnl
  64. ifdef($8,
  65. ifelse($8,ro,
  66. <define(<_group_read>)>,
  67. $8,rop,
  68. <define(<_group_read>)>,
  69. $8,rw,
  70. <define(<_user_write>)dnl
  71. ifdef($9,
  72. ifelse($9,,,
  73. define(<_group_write>)))>,
  74. $8,rwp,
  75. <define(<_user_write>)>,
  76. _warn(<share access is wrong. Must be either "ro", "rop", "rw" or "rwp">)dnl
  77. ))dnl
  78. ifdef(<_user_write>,
  79. ifdef(<_group_write>,
  80. ifdef(<_world_read>,,),
  81. ifdef(<_group_read>,
  82. ifdef(<_world_read>,,),
  83. )),
  84. dnl ***user read, group read***(?)
  85. dnl ***user read***
  86. )dnl
  87. ifelse($9,,,
  88. < allow:@$9> ifdef(<_user_write>,,
  89. < ro>))dnl
  90. ifdef(<_veto>,
  91. < veto files = _veto_mac
  92. >)dnl
  93. )dnl
  94. >)dnl
  95. dnl *****************
  96. dnl *** homefiles ***
  97. dnl *****************
  98. define(<_homefiles>,
  99. <ifelse($1,mac,
  100. define(<_homefiles_access>, <rwp>)dnl
  101. ifdef($5,
  102. ifelse($5,ro,
  103. define(<_homefiles_access>, <rop>)))dnl
  104. <_files($1,$2,<$3>,$4,,,,_homefiles_access)>dnl
  105. )>)dnl
  106. define(<_printer>, <>)dnl
  107. >)dnl
  108. dnl
  109. include(/etc/local-COMMON/file-FQDN.m4)dnl