]> arthur.barton.de Git - netatalk.git/commitdiff
Merge remote-tracking branch 'origin/branch-netatalk-3-0' into develop
authorRalph Boehme <sloowfranklin@gmail.com>
Sun, 15 Sep 2013 15:21:23 +0000 (17:21 +0200)
committerRalph Boehme <sloowfranklin@gmail.com>
Sun, 15 Sep 2013 15:21:23 +0000 (17:21 +0200)
Conflicts:
NEWS
VERSION
doc/manpages/man5/afp.conf.5.xml
doc/www/ReleaseNotes
libatalk/util/netatalk_conf.c
macros/summary.m4
man/man5/afp.conf.5.in

12 files changed:
1  2 
NEWS
bin/ad/ad_util.c
configure.ac
doc/manpages/man5/afp.conf.5.xml
doc/www/ReleaseNotes
etc/afpd/file.c
include/atalk/globals.h
include/atalk/volume.h
libatalk/util/netatalk_conf.c
macros/netatalk.m4
macros/summary.m4
man/man5/afp.conf.5.in

diff --combined NEWS
index 5ab6e8a9a3df4690a9191bb1171ca50878a728ad,b932367d9bf190362ac0fa071279e4896b4a895b..9fe7aef13eb8258ddd227bedbfcda515fb94f499
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -1,20 -1,28 +1,39 @@@
 +Changes in 3.1.0
 +================
 +* NEW: AFP Spotlight support with Gnome Tracker
 +* NEW: New option "spotlight" (G/V)
 +* NEW: Configure option --with-tracker-pkgconfig-version
 +* NEW: Configure option --with-tracker-prefix
 +* NEW: If Spotlight is enabled, launch our own dbus instance
 +* NEW: New option "dbus daemon" (G)
 +* UPD: Add configure option --with-afpstats for overriding the
 +       result of autodetecting dbus-glib presence
 +
+ Changes in 3.0.6
+ ================
+ * FIX: charset conversion failed when copying from Mac OS 9. Bug #523.
+ * UPD: Don't force S_ISGID for directories on FreeBSD. Bug #525.
+ * NEW: Add support for ZFS ACLs on FreeBSD with libsunacl. From FR#83.
+ * FIX: Active Directory LDAP queries for ACL support with new options
+        "ldap user filter" and "ldap group filter". Bug #526.
  Changes in 3.0.5
  ================
  * FIX: Fix a crash when using pam_winbind. Fixes bug #516.
  * NEW: New global/volume option "ignored attributes"
  * FIX: "afp listen" option failed to take IPv6 addresses. Bug #515.
  * FIX: Fix a possible crash in set_groups. Bug #518.
+ * NEW: Send optional AFP messages for vetoed files, new option
+        "veto message" can be used to enable sending messages.
+        Then whenever a client tries to access any file or directory
+        with a vetoed name, it will be sent an AFP message indicating
+        the name and the directory. From FR #81.
+ * NEW: New boolean volume option "delete veto files". If this option is
+        set to yes, then Netatalk will attempt to recursively delete any
+        vetoed files and directories. FR #82.
+ * UPD: systemd unit dir is /usr/lib/systemd/system .
+ * FIX: Saving files from application like MS Word may result in the file
+        loosing metadata like the Finder label. Bug #521.
  
  Changes in 3.0.4
  ================
@@@ -25,7 -33,7 +44,7 @@@
         lead to a failure setting the size of a files ressource fork.
         This affected application like Adobe Photoshop where saving
         files may fail. Fixes bug #511.
- * UPD: Enhance ACL mapping, change global ACL option 'map acl' to take
+ * UPD: Enhance ACL mapping, change global ACL option 'map acls' to take
         the following options: "none", "rights" (default), "mode".
         none   = no mapping, this resembles the previous false/no setting
         rights = map ACLs to Finder UARights, this resembles the previous
diff --combined bin/ad/ad_util.c
index a168eed8a201f16413eaa3637431e2cea05d9d8a,340dc5685e66426f80244b87bc3d3976fd1b6f18..7d4d2fb9e832fbb009fccb9a5b17588a73360076
@@@ -51,6 -51,9 +51,9 @@@
  #ifdef HAVE_SOLARIS_ACLS
  #include <sys/acl.h>
  #endif  /* HAVE_SOLARIS_ACLS */
+ #ifdef HAVE_FREEBSD_SUNACL
+ #include <sunacl.h>
+ #endif
  
  #ifdef HAVE_POSIX_ACLS
  #include <sys/types.h>
@@@ -233,6 -236,73 +236,6 @@@ int convert_dots_encoding(const afpvol_
      return 0;
  }
  
 -/*!
 - * ResolvesCNID of a given paths
 - *
 - * path might be:
 - * (a) relative:
 - *     "dir/subdir" with cwd: "/afp_volume/topdir"
 - * (b) absolute:
 - *     "/afp_volume/dir/subdir"
 - *
 - * path MUST be pointing inside vol, this is usually the case as vol has been build from
 - * path using loadvolinfo and friends.
 - *
 - * @param vol  (r) pointer to afpvol_t
 - * @param path (r) path, see above
 - * @param did  (rw) parent CNID of returned CNID
 - *
 - * @returns CNID of path
 - */
 -cnid_t cnid_for_path(const afpvol_t *vol,
 -                     const char *path,
 -                     cnid_t *did)
 -{
 -    EC_INIT;
 -
 -    cnid_t cnid;
 -    bstring rpath = NULL;
 -    bstring statpath = NULL;
 -    struct bstrList *l = NULL;
 -    struct stat st;
 -
 -    cnid = htonl(2);
 -
 -    EC_NULL(rpath = rel_path_in_vol(path, vol->vol->v_path));
 -    EC_NULL(statpath = bfromcstr(vol->vol->v_path));
 -    EC_ZERO(bcatcstr(statpath, "/"));
 -
 -    l = bsplit(rpath, '/');
 -    for (int i = 0; i < l->qty ; i++) {
 -        *did = cnid;
 -
 -        EC_ZERO(bconcat(statpath, l->entry[i]));
 -        EC_ZERO_LOGSTR(lstat(cfrombstr(statpath), &st),
 -                       "lstat(rpath: %s, elem: %s): %s: %s",
 -                       cfrombstr(rpath), cfrombstr(l->entry[i]),
 -                       cfrombstr(statpath), strerror(errno));
 -
 -        if ((cnid = cnid_add(vol->vol->v_cdb,
 -                             &st,
 -                             *did,
 -                             cfrombstr(l->entry[i]),
 -                             blength(l->entry[i]),
 -                             0)) == CNID_INVALID) {
 -            EC_FAIL;
 -        }
 -        EC_ZERO(bcatcstr(statpath, "/"));
 -    }
 -
 -EC_CLEANUP:
 -    bdestroy(rpath);
 -    bstrListDestroy(l);
 -    bdestroy(statpath);
 -    if (ret != 0)
 -        return CNID_INVALID;
 -
 -    return cnid;
 -}
 -
  /*!
   * Resolves CNID of a given paths parent directory
   *
diff --combined configure.ac
index a570f09711bfd67a00af627589d590ea22717727,90f10fec28828e9eb6c1e8b94a647a98b20f97f2..6eec7f4eeea3768d7bd0cc169c293d3822f7ee35
@@@ -25,8 -25,6 +25,8 @@@ AC_PROG_P
  AM_PROG_CC_C_O
  AC_C_BIGENDIAN
  AC_C_INLINE
 +AC_PROG_LEX
 +AC_PROG_YACC
  
  dnl Check if we can use attribute unused (gcc only) from ethereal
  AC_MSG_CHECKING(to see if we can add '__attribute__((unused))' to CFLAGS)
@@@ -184,9 -182,6 +184,9 @@@ AC_NETATALK_SENDFIL
  dnl Check whether bundled libevent shall not be used
  AC_NETATALK_LIBEVENT
  
 +dnl Check for Tracker
 +AC_NETATALK_SPOTLIGHT
 +
  dnl libatalk API checks
  AC_DEVELOPER
  
@@@ -215,7 -210,7 +215,7 @@@ AC_SUBST(UAMS_PATH
  AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
  AM_CONDITIONAL(HAVE_LIBGCRYPT, test x$neta_cv_have_libgcrypt = xyes)
  AM_CONDITIONAL(HAVE_OPENSSL, test x$neta_cv_have_openssl = xyes)
- AM_CONDITIONAL(HAVE_ACLS, test x"$with_acl_support" = x"yes")
+ AM_CONDITIONAL(HAVE_ACLS, test x"$ac_cv_have_acls" = x"yes")
  AM_CONDITIONAL(HAVE_LDAP, test x"$netatalk_cv_ldap" = x"yes")
  AM_CONDITIONAL(USE_DHX, test x$neta_cv_compile_dhx = xyes)
  AM_CONDITIONAL(USE_DHX2, test x$neta_cv_compile_dhx2 = xyes)
@@@ -268,7 -263,6 +268,7 @@@ AC_OUTPUT([Makefil
        etc/afpd/Makefile
        etc/cnid_dbd/Makefile
        etc/netatalk/Makefile
 +      etc/spotlight/Makefile
        etc/uams/Makefile
        include/Makefile
        include/atalk/Makefile
        libatalk/compat/Makefile
        libatalk/dsi/Makefile
        libatalk/iniparser/Makefile
 +      libatalk/talloc/Makefile
        libatalk/tdb/Makefile
        libatalk/unicode/Makefile
        libatalk/unicode/charsets/Makefile
index f346e37165173ced446896b41b19de932363a46d,e17dcc474f1641e5bf4eeb44e4c322dfef7c0c92..4b1b14d6fab43cd9b191b1fd3caebc233809664f
@@@ -5,7 -5,7 +5,7 @@@
  
      <manvolnum>5</manvolnum>
  
-     <refmiscinfo class="date">30 Apr 2013</refmiscinfo>
+     <refmiscinfo class="date">13 Sep 2013</refmiscinfo>
  
      <refmiscinfo class="source">@NETATALK_VERSION@</refmiscinfo>
    </refmeta>
  
            <listitem>
              <para>This specifies the DSI server quantum. The default value is
-             1 MB. The maximum value is 0xFFFFFFFFF, the minimum is 32000. If
-             you specify a value that is out of range, the default value will
-             be set. Do not change this value unless you're absolutely sure,
-             what you're doing</para>
+             0x100000 (1 MiB). The maximum value is 0xFFFFFFFFF, the minimum is
+             32000. If you specify a value that is out of range, the default
+             value will be set. Do not change this value unless you're
+             absolutely sure, what you're doing</para>
            </listitem>
          </varlistentry>
  
  
            <listitem>
              <para>Speficy a set of file and directory attributes that shall
 -            be ignored by the server, <attribute>all</attribute> includes all
 +            be ignored by the server, <option>all</option> includes all
              the other options.</para>
              <para>In OS X when the Finder sets a lock on a file/directory or you
              set the BSD uchg flag in the Terminal, all three attributes are
            </listitem>
          </varlistentry>
  
 +        <varlistentry>
 +          <term>spotlight =
 +          <replaceable>BOOLEAN</replaceable> (default:
 +          <emphasis>no</emphasis>) <type>(G)/(V)</type></term>
 +
 +          <listitem>
 +            <para>Whether to enable Spotlight searches. Note: once the global
 +            option is enabled, any volume that is not enabled won't be
 +            searchable at all.</para>
 +          </listitem>
 +        </varlistentry>
 +
+         <varlistentry>
+           <term>veto message = <replaceable>BOOLEAN</replaceable> (default:
+           <emphasis>no</emphasis>) <type>(G)</type></term>
+           <listitem>
+             <para>Send optional AFP messages for vetoed files. Then whenever a
+             client tries to access any file or directory with a vetoed name,
+             it will be sent an AFP message indicating the name and the
+             directory.</para>
+           </listitem>
+         </varlistentry>
          <varlistentry>
            <term>vol dbpath = <replaceable>path</replaceable>
            <type>(G)</type></term>
        mode. You can adjust this behaviour with the configuration option
        <option>mac acls</option>:</para>
  
 -      <variablelist id="mac_acls">
 +      <variablelist id="map_acls">
          <varlistentry>
            <term>map acls = <parameter>none|rights|mode</parameter>
            <type>(G)</type></term>
            </listitem>
          </varlistentry>
  
+         <varlistentry>
+           <term>ldap group attr = <parameter>dn</parameter>
+           <type>(G)</type></term>
+           <listitem>
+             <para>Name of the LDAP attribute with the groups short
+             name.</para>
+           </listitem>
+         </varlistentry>
          <varlistentry>
            <term>ldap uuid string = <parameter>STRING</parameter>
            <type>(G)</type></term>
              internal UUID representation is converted to and from the binary
              format used in the objectGUID attribute found on objects in Active
              Directory when interacting with the server.</para>
+             <para>See also the options <option>ldap user filter</option> and
+             <option>ldap group filter</option>.</para>
              <para><variablelist>
                  <varlistentry>
                    <term>string</term>
          </varlistentry>
  
          <varlistentry>
-           <term>ldap group attr = <parameter>dn</parameter>
+           <term>ldap user filter = <parameter>STRING (default: unused)</parameter>
            <type>(G)</type></term>
  
            <listitem>
-             <para>Name of the LDAP attribute with the groups short
-             name.</para>
+             <para>Optional LDAP filter that matches user objects. This is necessary for Active Directory
+             environments where users and groups are stored in the same directory subtree.</para>
+             <para>Recommended setting for Active Directory: <parameter>objectClass=user</parameter>.</para>
            </listitem>
          </varlistentry>
+         <varlistentry>
+           <term>ldap group filter = <parameter>STRING (default: unused)</parameter>
+           <type>(G)</type></term>
+           <listitem>
+             <para>Optional LDAP filter that matches group objects. This is necessary for Active Directory
+             environments where users and groups are stored in the same directory subtree.</para>
+             <para>Recommended setting for Active Directory: <parameter>objectClass=group</parameter>.</para>
+           </listitem>
+         </varlistentry>
        </variablelist>
      </refsect2>
    </refsect1>
            </listitem>
          </varlistentry>
  
+         <varlistentry>
+           <term>delete veto files = <replaceable>BOOLEAN</replaceable>
+           (default: <emphasis>no</emphasis>) <type>(V)</type></term>
+           <listitem>
+             <para>This option is used when Netatalk is attempting to delete a
+             directory that contains one or more vetoed files or directories
+             (see the veto files option). If this option is set to no (the
+             default) then if a directory contains any non-vetoed files or
+             directories then the directory delete will fail. This is usually
+             what you want.</para>
+             <para>If this option is set to yes, then Netatalk will attempt to
+             recursively delete any files and directories within the vetoed
+             directory.</para>
+           </listitem>
+         </varlistentry>
          <varlistentry>
            <term>follow symlinks = <replaceable>BOOLEAN</replaceable> (default:
            <emphasis>no</emphasis>) <type>(V)</type></term>
diff --combined doc/www/ReleaseNotes
index 07674bf8a8e4bc917f335e04d0c44370c3266280,850be9eadea0428c7814604bdb43439644b86efa..49e9b8c76aaf385e0f76a56c330b1ecab1b5dcda
@@@ -1,8 -1,9 +1,8 @@@
 -Netatalk 3.0.5
 -==============
 +Netatalk 3.1-beta1
 +===================
  
 -The Netatalk development team is proud to announce version 3.0.5 of
 -the Netatalk File Sharing suite. This is the latest update to the 3.0
 -release series. All users are encouraged to upgrade their systems to 3.0.5.
 +The Netatalk development team is proud to announce the first beta release
 +of the next Netatalk version 3.1. This release is intended for testing only.
  
  Netatalk is a freely-available Open Source AFP fileserver.
  A *NIX/*BSD system running Netatalk is capable of serving many Macintosh
@@@ -16,23 -17,22 +16,23 @@@ The suite contains
  * cnid_dbd   - the CNID database daemon serving CNIDs for AFP volumes
  * various supporting programs and utilities
  
 -Summary of major new features and enhancements in 3.0
 +Summary of major new features and enhancements in 3.1
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 -* New ini style configuration file afp.conf which replaces all previous
 -  configuration files
 -* New default AppleDouble backend using filesystem Extended Attributes,
 -  conversion from AppleDouble v2 is done automatically on access
 -* New service controller process "netatalk" responsible for starting and
 -  restarting afpd and cnid_metad as necessary
 -* AppleTalk support has been removed
 -* Coherent cross-platform locking with Solaris CIFS server
 +* AFP Spotlight Support with Gnome Tracker:
 +  https://projects.gnome.org/tracker/
 +
 +Please refer to the online manual for details about compiling Netatalk
 +with Spotlight support and how to configure:
 +
 +http://netatalk.sourceforge.net/3.1/htmldocs/installation.html#compiling-netatalk
 +
 +http://netatalk.sourceforge.net/3.1/htmldocs/configuration.html#id2615270
  
  Please make sure to read the upgrading section in the Netatalk online
 -manual before trying to upgrade your system to 3.0!
 +manual before trying to upgrade your system from version 2:
  
 -  http://netatalk.sourceforge.net/3.0/htmldocs/upgrade.html
 +http://netatalk.sourceforge.net/3.1/htmldocs/upgrade.html
  
  License
  ~~~~~~~
@@@ -41,25 -41,26 +41,43 @@@ Netatalk is a Free/Open Source Softwar
  the GNU General Public License (GPLv2).  The full license text is available
  at:
  
 -  http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
 +http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
 +
 +Changes in 3.1-beta1
 +~~~~~~~~~~~~~~~~~~~~
 +* REM: Remove support for Tracker versions < 0.7
 +* UPD: Add support for additional Spotlight RPC calls
 +
 +Changes in 3.1-alpha1
 +~~~~~~~~~~~~~~~~~~~~~
 +* NEW: AFP Spotlight support with Gnome Tracker
 +* NEW: New option "spotlight" (G/V)
 +* NEW: Configure option --with-tracker-pkgconfig-version
 +* NEW: Configure option --with-tracker-prefix
 +* NEW: If Spotlight is enabled, launch our own dbus instance
 +* NEW: New option "dbus daemon" (G)
 +* UPD: Add configure option --with-afpstats for overriding the
 +       result of autodetecting dbus-glib presence
 +
  
+ Changes in 3.0.5
+ ~~~~~~~~~~~~~~~~
+ * FIX: Fix a crash when using pam_winbind. Fixes bug #516.
+ * NEW: New global/volume option "ignored attributes"
+ * FIX: "afp listen" option failed to take IPv6 addresses. Bug #515.
+ * FIX: Fix a possible crash in set_groups. Bug #518.
+ * NEW: Send optional AFP messages for vetoed files, new option
+        "veto messages" can be used to enable sending messages.
+        Then whenever a client tries to access any file or directory
+        with a vetoed name, it will be sent an AFP message indicating
+        the name and the directory. From FR #81.
+ * NEW: New boolean volume option "delete veto files". If this option is
+        set to yes, then Netatalk will attempt to recursively delete any
+        vetoed files and directories. FR #82.
+ * UPD: systemd unit dir is /usr/lib/systemd/system .
+ * FIX: Saving files from application like MS Word may result in the file
+        loosing metadata like the Finder label. Bug #521.
  Changes in 3.0.4
  ~~~~~~~~~~~~~~~~
  * FIX: Opening files without metadata EA may result in an invalid
diff --combined etc/afpd/file.c
index 44b57d58b836be84a7ece229a7b8016df91a4eee,f639c49baf7ea8809de4e923d43beaf9a5a0fe16..edb55ea3eafced56c9464077a45360266f444779
@@@ -25,7 -25,6 +25,7 @@@
  #include <atalk/globals.h>
  #include <atalk/fce_api.h>
  #include <atalk/netatalk_conf.h>
 +#include <atalk/spotlight.h>
  
  #include "directory.h"
  #include "dircache.h"
@@@ -765,9 -764,9 +765,9 @@@ createfile_iderr
      ad_flush(&ad);
      ad_close(&ad, ADFLAGS_DF|ADFLAGS_HF );
      fce_register(FCE_FILE_CREATE, fullpathname(upath), NULL, fce_file);
 +    sl_index_file(path);
  
      curdir->d_offcnt++;
 -
      setvoltime(obj, vol );
  
      return (retvalue);
@@@ -2209,6 -2208,42 +2209,42 @@@ int afp_exchangefiles(AFPObj *obj, cha
          }
          goto err_temp_to_dest;
      }
+     if (AD_META_OPEN(adsp) || AD_META_OPEN(addp)) {
+         struct adouble adtmp;
+         bool opened_ads, opened_add;
+         ad_init(&adtmp, vol);
+         ad_init_offsets(&adtmp);
+         if (!AD_META_OPEN(adsp)) {
+             if (ad_open(adsp, p, ADFLAGS_HF) != 0)
+                 return -1;
+             opened_ads = true;
+         }
+         if (!AD_META_OPEN(addp)) {
+             if (ad_open(addp, upath, ADFLAGS_HF) != 0)
+                 return -1;
+             opened_add = true;
+         }
+         if (ad_copy_header(&adtmp, adsp) != 0)
+             goto err_temp_to_dest;
+         if (ad_copy_header(adsp, addp) != 0)
+             goto err_temp_to_dest;
+         if (ad_copy_header(addp, &adtmp) != 0)
+             goto err_temp_to_dest;
+         ad_flush(adsp);
+         ad_flush(addp);
+         if (opened_ads)
+             ad_close(adsp, ADFLAGS_HF);
+         if (opened_add)
+             ad_close(addp, ADFLAGS_HF);
+     }
+     /* FIXME: we should switch ressource fork too */
      
      /* here we need to reopen if crossdev */
      if (sid && ad_setid(addp, destst.st_dev, destst.st_ino,  sid, sdir->d_did, vol->v_stamp)) 
diff --combined include/atalk/globals.h
index 6c29ee02d71430db7cb1afe532233e28fc0010e9,61cf247fe9987ce9f1cbe74d621c7eac4ed981cb..11a35867b5c160eb1d8cab5f8eba601b597c85e6
@@@ -48,7 -48,7 +48,7 @@@
  #define OPTION_CLOSEVOL      (1 << 1)
  #define OPTION_SERVERNOTIF   (1 << 2)
  #define OPTION_NOSENDFILE    (1 << 3)
/* #define OPTION_CUSTOMICON    (1 << 4) */
#define OPTION_VETOMSG       (1 << 4) /* whether to send an AFP message for veto file access */
  #define OPTION_AFP_READ_LOCK (1 << 5) /* whether to do AFP spec conforming read locks (default: no) */
  #define OPTION_ANNOUNCESSH   (1 << 6)
  #define OPTION_UUID          (1 << 7)
@@@ -57,8 -57,6 +57,8 @@@
  #define OPTION_ACL2MODE      (1 << 10)
  #define OPTION_SHARE_RESERV  (1 << 11) /* whether to use Solaris fcntl F_SHARE locks */
  #define OPTION_DBUS_AFPSTATS (1 << 12) /* whether to run dbus thread for afpstats */
 +#define OPTION_SPOTLIGHT     (1 << 13) /* whether to initialize Spotlight support */
 +#define OPTION_SPOTLIGHT_VOL (1 << 14) /* whether spotlight shall be enabled by default for volumes */
  
  #define PASSWD_NONE     0
  #define PASSWD_SET     (1 << 0)
@@@ -120,7 -118,6 +120,7 @@@ struct afp_options 
      char *mimicmodel;
      char *adminauthuser;
      char *ignored_attr;
 +    char *slmod_path;
      struct afp_volume_name volfile;
  };
  
@@@ -165,7 -162,7 +165,7 @@@ extern const char         *Cnid_port
  extern int  get_afp_errno   (const int param);
  extern void afp_options_init (struct afp_options *);
  extern void afp_options_parse_cmdline(AFPObj *obj, int ac, char **av);
- extern void setmessage (const char *);
+ extern int setmessage (const char *);
  extern void readmessage (AFPObj *);
  
  /* afp_util.c */
diff --combined include/atalk/volume.h
index c3ebd39b62c12633a06dca2c091110fa1ecaa4d3,a9e497a6d76ddf4cf4053b673da181de09a03a79..7172887a2d489947316df310aa44966277602cc6
@@@ -118,7 -118,6 +118,7 @@@ struct vol 
    Keep in sync with libatalk/util/volinfo.c
  */
  #define AFPVOL_NOV2TOEACONV (1 << 5) /* no adouble:v2 to adouble:ea conversion */
 +#define AFPVOL_SPOTLIGHT (1 << 6)   /* Index volume for Spotlight searches */
  #define AFPVOL_RO        (1 << 8)   /* read-only volume */
  #define AFPVOL_NOSTAT    (1 << 16)  /* advertise the volume even if we can't stat() it
                                       * maybe because it will be mounted later in preexec */
  #define AFPVOL_SEARCHDB  (1 << 25)   /* Use fast CNID db search instead of filesystem */
  #define AFPVOL_NONETIDS  (1 << 26)   /* signal the client it shall do privelege mapping */
  #define AFPVOL_FOLLOWSYM (1 << 27)   /* follow symlinks on the server, default is not to */
+ #define AFPVOL_DELVETO   (1 << 28)   /* delete veto files and dirs */
  
  /* Extended Attributes vfs indirection  */
  #define AFPVOL_EA_NONE           0   /* No EAs */
index e1dec578911292b6afd588ab02651d1392c85700,4860cd8240d7dbeada16c7dcf9dac45f92cd32cb..d6fb4a17c03a8a681e3644a558bc8b687cd18dac
@@@ -232,7 -232,7 +232,7 @@@ static int check_vol_acl_support(const 
  {
      int ret = 0;
  
- #ifdef HAVE_SOLARIS_ACLS
+ #ifdef HAVE_NFSV4_ACLS
      ace_t *aces = NULL;
      ret = 1;
      if (get_nfsv4_acl(vol->v_path, &aces) == -1)
          ret = 0;
  #endif
  
- #ifdef HAVE_SOLARIS_ACLS
+ #ifdef HAVE_NFSV4_ACLS
      if (aces) free(aces);
  #endif
  #ifdef HAVE_POSIX_ACLS
@@@ -772,10 -772,8 +772,12 @@@ static struct vol *creatvol(AFPObj *obj
          volume->v_flags |= AFPVOL_NOV2TOEACONV;
      if (getoption_bool(obj->iniconfig, section, "follow symlinks", preset, 0))
          volume->v_flags |= AFPVOL_FOLLOWSYM;
 +    if (getoption_bool(obj->iniconfig, section, "spotlight", preset, obj->options.flags & OPTION_SPOTLIGHT_VOL)) {
 +        volume->v_flags |= AFPVOL_SPOTLIGHT;
 +        obj->options.flags |= OPTION_SPOTLIGHT;
 +    }
+     if (getoption_bool(obj->iniconfig, section, "delete veto files", preset, 0))
+         volume->v_flags |= AFPVOL_DELVETO;
  
      if (getoption_bool(obj->iniconfig, section, "preexec close", preset, 0))
          volume->v_preexec_close = 1;
      initvol_vfs(volume);
  
      /* get/store uuid from file in afpd master*/
 -    if (!(pwd) && (volume->v_flags & AFPVOL_TM)) {
 -        char *uuid = get_vol_uuid(obj, volume->v_localname);
 -        if (!uuid) {
 -            LOG(log_error, logtype_afpd, "Volume '%s': couldn't get UUID",
 -                volume->v_localname);
 -        } else {
 -            volume->v_uuid = uuid;
 -            LOG(log_debug, logtype_afpd, "Volume '%s': UUID '%s'",
 -                volume->v_localname, volume->v_uuid);
 -        }
 +    become_root();
 +    char *uuid = get_vol_uuid(obj, volume->v_localname);
 +    unbecome_root();
 +    if (!uuid) {
 +        LOG(log_error, logtype_afpd, "Volume '%s': couldn't get UUID",
 +            volume->v_localname);
 +    } else {
 +        volume->v_uuid = uuid;
 +        LOG(log_debug, logtype_afpd, "Volume '%s': UUID '%s'",
 +            volume->v_localname, volume->v_uuid);
      }
  
      /* no errors shall happen beyond this point because the cleanup would mess the volume chain up */
@@@ -1731,9 -1729,6 +1733,9 @@@ int afp_config_parse(AFPObj *AFPObj, ch
      options->configfile  = AFPObj->cmdlineconfigfile ? strdup(AFPObj->cmdlineconfigfile) : strdup(_PATH_CONFDIR "afp.conf");
      options->sigconffile = strdup(_PATH_STATEDIR "afp_signature.conf");
      options->uuidconf    = strdup(_PATH_STATEDIR "afp_voluuid.conf");
 +#ifdef HAVE_TRACKER_SPARQL
 +    options->slmod_path  = strdup(_PATH_AFPDUAMPATH "slmod_sparql.so");
 +#endif
      options->flags       = OPTION_UUID | AFPObj->cmdlineflags;
      
      if ((config = atalk_iniparser_load(AFPObj->options.configfile)) == NULL)
          options->flags |= OPTION_DBUS_AFPSTATS;
      if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "afp read locks", 0))
          options->flags |= OPTION_AFP_READ_LOCK;
 +    if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "spotlight", 0))
 +        options->flags |= OPTION_SPOTLIGHT_VOL;
+     if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "veto message", 0))
+         options->flags |= OPTION_VETOMSG;
      if (!atalk_iniparser_getboolean(config, INISEC_GLOBAL, "save password", 1))
          options->passwdbits |= PASSWD_NOSAVE;
      if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "set password", 0))
@@@ -2009,8 -2004,6 +2013,8 @@@ void afp_config_free(AFPObj *obj
          CONFIG_ARG_FREE(obj->options.fqdn);
      if (obj->options.ignored_attr)
          CONFIG_ARG_FREE(obj->options.ignored_attr);
 +    if (obj->options.slmod_path)
 +        CONFIG_ARG_FREE(obj->options.slmod_path);
  
      if (obj->options.unixcodepage)
          CONFIG_ARG_FREE(obj->options.unixcodepage);
diff --combined macros/netatalk.m4
index 1c230f7cbd919985768c72649cfe7c54e4faa2b1,27c30322dcd248e870e21321d6999e0d0073fefb..72daa01e68349e5597eb6b2d1c365bd433e9ccc4
@@@ -77,19 -77,16 +77,19 @@@ AC_DEFUN([AC_NETATALK_DTRACE], 
  
  dnl Check for dbus-glib, for AFP stats
  AC_DEFUN([AC_NETATALK_DBUS_GLIB], [
 -    atalk_cv_with_dbus=no
 +  atalk_cv_with_dbus=no
 +
 +  AC_ARG_WITH(afpstats,
 +    AS_HELP_STRING(
 +      [--with-afpstats],
 +      [Enable AFP statistics via dbus (default: enabled if dbus found)]
 +    ),,[withval=auto]
 +  )
 +
 +  if test x"$withval" != x"no" ; then
      PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1, have_dbus=yes, have_dbus=no)
      PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1, have_dbus_glib=yes, have_dbus_glib=no)
      PKG_CHECK_MODULES(DBUS_GTHREAD, gthread-2.0, have_dbus_gthread=yes, have_dbus_gthread=no)
 -    AC_SUBST(DBUS_CFLAGS)
 -    AC_SUBST(DBUS_LIBS)
 -    AC_SUBST(DBUS_GLIB_CFLAGS)
 -    AC_SUBST(DBUS_GLIB_LIBS)
 -    AC_SUBST(DBUS_GTHREAD_CFLAGS)
 -    AC_SUBST(DBUS_GTHREAD_LIBS)
      if test x$have_dbus_glib = xyes -a x$have_dbus = xyes -a x$have_dbus_gthread = xyes ; then
          saved_CFLAGS=$CFLAGS
          saved_LIBS=$LIBS
          CFLAGS="$saved_CFLAGS"
          LIBS="$saved_LIBS"
      fi
 -    AM_CONDITIONAL(HAVE_DBUS_GLIB, test x$atalk_cv_with_dbus = xyes)
 +  fi
  
 -    AC_ARG_WITH(
 -        dbus-sysconf-dir,
 -        [AS_HELP_STRING([--with-dbus-sysconf-dir=PATH],[Path to dbus system bus security configuration directory (default: ${sysconfdir}/dbus-1/system.d/)])],
 -        ac_cv_dbus_sysdir=$withval,
 -        ac_cv_dbus_sysdir='${sysconfdir}/dbus-1/system.d'
 -    )
 +  if test x"$withval" = x"yes" -a x"$atalk_cv_with_dbus" = x"no"; then
 +    AC_MSG_ERROR([afpstats requested but dbus-glib not found])
 +  fi
  
 -    if test x$atalk_cv_with_dbus = xyes ; then
 -        AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if support for dbus-glib was found])
 -        DBUS_SYS_DIR="$ac_cv_dbus_sysdir"
 -        AC_SUBST(DBUS_SYS_DIR)
 -    fi
 +  AC_ARG_WITH(
 +      dbus-sysconf-dir,
 +      [AS_HELP_STRING([--with-dbus-sysconf-dir=PATH],[Path to dbus system bus security configuration directory (default: ${sysconfdir}/dbus-1/system.d/)])],
 +      ac_cv_dbus_sysdir=$withval,
 +      ac_cv_dbus_sysdir='${sysconfdir}/dbus-1/system.d'
 +  )
 +  DBUS_SYS_DIR=""
 +  if test x$atalk_cv_with_dbus = xyes ; then
 +      AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if support for dbus-glib was found])
 +      DBUS_SYS_DIR="$ac_cv_dbus_sysdir"
 +  fi
 +
 +  AC_SUBST(DBUS_SYS_DIR)
 +  AC_SUBST(DBUS_CFLAGS)
 +  AC_SUBST(DBUS_LIBS)
 +  AC_SUBST(DBUS_GLIB_CFLAGS)
 +  AC_SUBST(DBUS_GLIB_LIBS)
 +  AC_SUBST(DBUS_GTHREAD_CFLAGS)
 +  AC_SUBST(DBUS_GTHREAD_LIBS)
 +  AM_CONDITIONAL(HAVE_DBUS_GLIB, test x$atalk_cv_with_dbus = xyes)
  ])
  
  dnl Whether to enable developer build
@@@ -140,52 -125,6 +140,52 @@@ AC_DEFUN([AC_DEVELOPER], 
      AM_CONDITIONAL(DEVELOPER, test x"$enable_dev" = x"yes")
  ])
  
 +dnl Tracker, for Spotlight
 +AC_DEFUN([AC_NETATALK_SPOTLIGHT], [
 +    ac_cv_have_tracker=no
 +    ac_cv_tracker_pkg_version_default=0.12
 +    ac_cv_tracker_pkg_version_min=0.12
 +
 +    dnl Tracker SPARQL
 +    AC_ARG_WITH([tracker-pkgconfig-version],
 +      [AS_HELP_STRING([--with-tracker-pkgconfig-version=VERSION],[Version suffix of the Tracker SPARQL and tracker-miner pkg in pkg-config (default: 0.12)])],
 +      [ac_cv_tracker_pkg_version=$withval],
 +      [ac_cv_tracker_pkg_version=$ac_cv_tracker_pkg_version_default]
 +    )
 +
 +    AC_ARG_WITH([tracker-prefix],
 +      [AS_HELP_STRING([--with-tracker-prefix=PATH],[Prefix of Tracker installation (default: none)])],
 +      [ac_cv_tracker_prefix=$withval],
 +      [ac_cv_tracker_prefix="`pkg-config --variable=prefix tracker-sparql-$ac_cv_tracker_pkg_version`"]
 +    )
 +
 +    AC_ARG_VAR([PKG_CONFIG_PATH], [Path to additional pkg-config packages])
 +    PKG_CHECK_MODULES([TRACKER], [tracker-sparql-$ac_cv_tracker_pkg_version >= $ac_cv_tracker_pkg_version_min], [ac_cv_have_tracker_sparql=yes], [ac_cv_have_tracker_sparql=no])
 +    PKG_CHECK_MODULES([TRACKER_MINER], [tracker-miner-$ac_cv_tracker_pkg_version >= $ac_cv_tracker_pkg_version_min], [ac_cv_have_tracker_miner=yes], [ac_cv_have_tracker_miner=no])
 +
 +    if test x"$ac_cv_have_tracker_sparql" = x"no" -o x"$ac_cv_have_tracker_miner" = x"no" ; then
 +        if test x"$need_tracker_sparql" = x"yes" ; then
 +            AC_MSG_ERROR([$ac_cv_tracker_pkg not found])
 +        fi
 +    else
 +        AC_DEFINE(HAVE_TRACKER, 1, [Define if Tracker is available])
 +        AC_DEFINE(HAVE_TRACKER_SPARQL, 1, [Define if Tracker SPARQL is available])
 +        AC_DEFINE(HAVE_TRACKER_MINER, 1, [Define if Tracker miner library is available])
 +        AC_DEFINE_UNQUOTED(TRACKER_PREFIX, ["$ac_cv_tracker_prefix"], [Path to Tracker])
 +        AC_DEFINE([DBUS_DAEMON_PATH], ["/bin/dbus-daemon"], [Path to dbus-daemon])
 +    fi
 +
 +    if test x"$ac_cv_have_tracker_sparql" = x"yes" ; then
 +       ac_cv_have_tracker=yes
 +    fi
 +
 +    AC_SUBST(TRACKER_CFLAGS)
 +    AC_SUBST(TRACKER_LIBS)
 +    AC_SUBST(TRACKER_MINER_CFLAGS)
 +    AC_SUBST(TRACKER_MINER_LIBS)
 +    AM_CONDITIONAL(HAVE_TRACKER_SPARQL, [test x"$ac_cv_have_tracker_sparql" = x"yes"])
 +])
 +
  dnl Whether to disable bundled libevent
  AC_DEFUN([AC_NETATALK_LIBEVENT], [
      AC_MSG_CHECKING([whether to use bundled libevent])
@@@ -474,7 -413,7 +474,7 @@@ AC_DEFUN([AC_NETATALK_INIT_STYLE], 
            ;;
      "redhat-systemd")
            AC_MSG_RESULT([enabling redhat-style systemd support])
-           ac_cv_init_dir="/lib/systemd/system"
+           ac_cv_init_dir="/usr/lib/systemd/system"
            ;;
      "suse")
            AC_MSG_ERROR([--with-init-style=suse is obsoleted. Use suse-sysv or suse-systemd.])
            ;;
      "suse-systemd")
            AC_MSG_RESULT([enabling suse-style systemd support (>=openSUSE12.1)])
-           ac_cv_init_dir="/lib/systemd/system"
+           ac_cv_init_dir="/usr/lib/systemd/system"
            ;;
      "gentoo")
            AC_MSG_RESULT([enabling gentoo-style initscript support])
          ;;
      "systemd")
            AC_MSG_RESULT([enabling general systemd support])
-           ac_cv_init_dir="/lib/systemd/system"
+           ac_cv_init_dir="/usr/lib/systemd/system"
          ;;
      "none")
            AC_MSG_RESULT([disabling init-style support])
@@@ -752,7 -691,7 +752,7 @@@ dnl Check for LDAP support, for client-
  AC_DEFUN([AC_NETATALK_LDAP], [
  AC_MSG_CHECKING(for LDAP (necessary for client-side ACL visibility))
  AC_ARG_WITH(ldap,
-     [AS_HELP_STRING([--with-ldap],
+     [AS_HELP_STRING([--with-ldap[[=PATH]]],
          [LDAP support (default=auto)])],
          netatalk_cv_ldap=$withval,
          netatalk_cv_ldap=auto
@@@ -805,6 -744,7 +805,7 @@@ LIBS="$save_LIBS
  
  dnl Check for ACL support
  AC_DEFUN([AC_NETATALK_ACL], [
+ ac_cv_have_acls=no
  AC_MSG_CHECKING(whether to support ACLs)
  AC_ARG_WITH(acls,
      [AS_HELP_STRING([--with-acls],
@@@ -822,112 -762,125 +823,125 @@@ AC_MSG_RESULT($with_acl_support
  
  if test x"$with_acl_support" = x"no"; then
        AC_MSG_RESULT(Disabling ACL support)
-       AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support should be built in])
- else
-     with_acl_support=yes
  fi
  
- if test x"$with_acl_support" = x"yes" ; then
-       AC_MSG_NOTICE(checking whether ACL support is available:)
+ # Platform specific checks
+ if test x"$with_acl_support" != x"no" ; then
        case "$host_os" in
-       *sysv5*)
-               AC_MSG_NOTICE(Using UnixWare ACLs)
-               AC_DEFINE(HAVE_UNIXWARE_ACLS,1,[Whether UnixWare ACLs are available])
-               ;;
        *solaris*)
                AC_MSG_NOTICE(Using solaris ACLs)
-               AC_DEFINE(HAVE_SOLARIS_ACLS,1,[Whether solaris ACLs are available])
+               AC_DEFINE(HAVE_SOLARIS_ACLS,1,[Whether Solaris ACLs are available])
+               AC_DEFINE(HAVE_NFSV4_ACLS,1,[Whether NFSv4 ACLs are available])
                ACL_LIBS="$ACL_LIBS -lsec"
+               ac_cv_have_acls=yes
                ;;
-       *hpux*)
-               AC_MSG_NOTICE(Using HPUX ACLs)
-               AC_DEFINE(HAVE_HPUX_ACLS,1,[Whether HPUX ACLs are available])
-               ;;
-       *irix*)
-               AC_MSG_NOTICE(Using IRIX ACLs)
-               AC_DEFINE(HAVE_IRIX_ACLS,1,[Whether IRIX ACLs are available])
-               ;;
-       *aix*)
-               AC_MSG_NOTICE(Using AIX ACLs)
-               AC_DEFINE(HAVE_AIX_ACLS,1,[Whether AIX ACLs are available])
-               ;;
-       *osf*)
-               AC_MSG_NOTICE(Using Tru64 ACLs)
-               AC_DEFINE(HAVE_TRU64_ACLS,1,[Whether Tru64 ACLs are available])
-               ACL_LIBS="$ACL_LIBS -lpacl"
+       *freebsd*)
+               AC_MSG_NOTICE(checking whether libsunacl is available)
+               sunacl_include_path="/usr/local/include"
+               sunacl_lib_path="/usr/local/lib"
+               save_CPPFLAGS=$CPPFLAGS
+               save_LDFLAGS=$LDFLAGS
+               save_LIBS=$LIBS
+               CPPFLAGS="-I$sunacl_include_path $CPPFLAGS"
+               AC_CHECK_HEADER([sunacl.h])
+               LDFLAGS="-L$sunacl_lib_path $LDFLAGS"
+               AC_CHECK_LIB([sunacl], [acl])
+               if test x"$ac_cv_header_sunacl_h" = x"yes" -a x"$ac_cv_lib_sunacl_acl" = x"yes" ; then
+                       AC_MSG_NOTICE([Enabling support for ZFS ACLs using libsunacl])
+                       ac_cv_have_acls=yes
+                       CFLAGS="-I$sunacl_include_path $CFLAGS"
+                       ACL_LIBS="$ACL_LIBS -L$sunacl_lib_path -lsunacl"
+                       AC_DEFINE(HAVE_FREEBSD_SUNACL, 1, [Whether FreeBSD ZFS ACLs with libsunacl are available])
+                       AC_DEFINE(HAVE_NFSV4_ACLS,1,[Whether NFSv4 ACLs are available])
+               else
+                       AC_MSG_NOTICE([libsunacl not found, disabling ZFS ACL support])
+               fi
+               CPPFLAGS=$save_CPPFLAGS
+               LDFLAGS=$save_LDFLAGS
+               LIBS=$save_LIBS
                ;;
-       *darwin*)
-               AC_MSG_NOTICE(ACLs on Darwin currently not supported)
-               AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available])
+       esac
+ fi
+ if test x"$with_acl_support" != x"no" -a x"$ac_cv_have_acls" != x"yes" ; then
+       # Runtime checks for POSIX ACLs
+       AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -lacl"])
+       case "$host_os" in
+       *linux*)
+               AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"])
                ;;
-       *)
-               AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -lacl"])
-               case "$host_os" in
-               *linux*)
-                       AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"])
-                       ;;
-               esac
-               AC_CACHE_CHECK([for POSIX ACL support],netatalk_cv_HAVE_POSIX_ACLS,[
+       esac
+       AC_CACHE_CHECK([for POSIX ACL support],netatalk_cv_HAVE_POSIX_ACLS,[
+               acl_LIBS=$LIBS
+               LIBS="$LIBS $ACL_LIBS"
+               AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                       #include <sys/types.h>
+                       #include <sys/acl.h>
+               ]], [[
+                       acl_t acl;
+                       int entry_id;
+                       acl_entry_t *entry_p;
+                       return acl_get_entry(acl, entry_id, entry_p);
+               ]])],
+                       [netatalk_cv_HAVE_POSIX_ACLS=yes; ac_cv_have_acls=yes],
+                       [netatalk_cv_HAVE_POSIX_ACLS=no; ac_cv_have_acls=no]
+               )
+               LIBS=$acl_LIBS
+       ])
+       if test x"$netatalk_cv_HAVE_POSIX_ACLS" = x"yes"; then
+               AC_MSG_NOTICE(Using POSIX ACLs)
+               AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether POSIX ACLs are available])
+               AC_CACHE_CHECK([for acl_get_perm_np],netatalk_cv_HAVE_ACL_GET_PERM_NP,[
                        acl_LIBS=$LIBS
                        LIBS="$LIBS $ACL_LIBS"
                        AC_LINK_IFELSE([AC_LANG_PROGRAM([[
                                #include <sys/types.h>
                                #include <sys/acl.h>
                        ]], [[
-                               acl_t acl;
-                               int entry_id;
-                               acl_entry_t *entry_p;
-                               return acl_get_entry(acl, entry_id, entry_p);
-                       ]])],[netatalk_cv_HAVE_POSIX_ACLS=yes],[netatalk_cv_HAVE_POSIX_ACLS=no
-                 with_acl_support=no])
+                               acl_permset_t permset_d;
+                               acl_perm_t perm;
+                               return acl_get_perm_np(permset_d, perm);
+                       ]])],[netatalk_cv_HAVE_ACL_GET_PERM_NP=yes],[netatalk_cv_HAVE_ACL_GET_PERM_NP=no])
                        LIBS=$acl_LIBS
                ])
-               if test x"$netatalk_cv_HAVE_POSIX_ACLS" = x"yes"; then
-                       AC_MSG_NOTICE(Using POSIX ACLs)
-                       AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether POSIX ACLs are available])
-                       AC_CACHE_CHECK([for acl_get_perm_np],netatalk_cv_HAVE_ACL_GET_PERM_NP,[
-                               acl_LIBS=$LIBS
-                               LIBS="$LIBS $ACL_LIBS"
-                               AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-                                       #include <sys/types.h>
-                                       #include <sys/acl.h>
-                               ]], [[
-                                       acl_permset_t permset_d;
-                                       acl_perm_t perm;
-                                       return acl_get_perm_np(permset_d, perm);
-                               ]])],[netatalk_cv_HAVE_ACL_GET_PERM_NP=yes],[netatalk_cv_HAVE_ACL_GET_PERM_NP=no])
-                               LIBS=$acl_LIBS
-                       ])
-                       if test x"$netatalk_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
-                               AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
-                       fi
-                        AC_CACHE_CHECK([for acl_from_mode], netatalk_cv_HAVE_ACL_FROM_MODE,[
-                                acl_LIBS=$LIBS
-                                LIBS="$LIBS $ACL_LIBS"
-                 AC_CHECK_FUNCS(acl_from_mode,
-                                [netatalk_cv_HAVE_ACL_FROM_MODE=yes],
-                                [netatalk_cv_HAVE_ACL_FROM_MODE=no])
-                                LIBS=$acl_LIBS
-                        ])
-                        if test x"netatalk_cv_HAVE_ACL_FROM_MODE" = x"yes"; then
-                                AC_DEFINE(HAVE_ACL_FROM_MODE,1,[Whether acl_from_mode() is available])
-                        fi
+               if test x"$netatalk_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
+                       AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
+               fi
  
-               else
-                       AC_MSG_NOTICE(ACL support is not avaliable)
-                       AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available])
+               AC_CACHE_CHECK([for acl_from_mode], netatalk_cv_HAVE_ACL_FROM_MODE,[
+                       acl_LIBS=$LIBS
+                       LIBS="$LIBS $ACL_LIBS"
+                       AC_CHECK_FUNCS(acl_from_mode,
+                               [netatalk_cv_HAVE_ACL_FROM_MODE=yes],
+                               [netatalk_cv_HAVE_ACL_FROM_MODE=no]
+                       )
+                       LIBS=$acl_LIBS
+               ])
+               if test x"netatalk_cv_HAVE_ACL_FROM_MODE" = x"yes"; then
+                  AC_DEFINE(HAVE_ACL_FROM_MODE,1,[Whether acl_from_mode() is available])
                fi
-               ;;
-     esac
+       fi
  fi
  
- if test x"$with_acl_support" = x"yes" ; then
-    AC_CHECK_HEADERS([acl/libacl.h])
-     AC_DEFINE(HAVE_ACLS,1,[Whether ACLs support is available])
-     AC_SUBST(ACL_LIBS)
+ if test x"$ac_cv_have_acls" = x"no" ; then
+       if test x"$with_acl_support" = x"yes" ; then
+               AC_MSG_ERROR(ACL support requested but not found)
+       else
+               AC_MSG_NOTICE(ACL support is not avaliable)
+       fi
+ else
+       AC_CHECK_HEADERS([acl/libacl.h])
+       AC_DEFINE(HAVE_ACLS,1,[Whether ACLs support is available])
  fi
+ AC_SUBST(ACL_LIBS)
  ])
  
  dnl Check for Extended Attributes support
diff --combined macros/summary.m4
index e64debfd19cc631e5f265a36eda38ec6250c7948,0f8193fbf109f7a3782ea29b614e496edd3c6eb7..e72fb6a2310f32ba75c9ba9e53513339042b1a32
@@@ -11,8 -11,7 +11,8 @@@ AC_DEFUN([AC_NETATALK_CONFIG_SUMMARY], 
        fi
        AC_MSG_RESULT([    AFP:])
        AC_MSG_RESULT([         Extended Attributes: $neta_cv_eas])
-       AC_MSG_RESULT([         ACL support: $with_acl_support])
+       AC_MSG_RESULT([         ACL support: $ac_cv_have_acls])
 +      AC_MSG_RESULT([         Spotlight: $ac_cv_have_tracker])
        AC_MSG_RESULT([    CNID:])
        AC_MSG_RESULT([         backends: $compiled_backends])
        AC_MSG_RESULT([    UAMS:])
@@@ -54,7 -53,7 +54,7 @@@ dnl   AC_MSG_RESULT([         Samba share
        AC_MSG_RESULT([         ACL support:             $with_acl_support])
        AC_MSG_RESULT([         Kerberos support:        $with_kerberos])
        AC_MSG_RESULT([         LDAP support:            $netatalk_cv_ldap])
 -      AC_MSG_RESULT([         dbus support:            $atalk_cv_with_dbus])
 +      AC_MSG_RESULT([         AFP stats via dbus:      $atalk_cv_with_dbus])
        AC_MSG_RESULT([         dtrace probes:           $WDTRACE])
        AC_MSG_RESULT([    Paths:])
        AC_MSG_RESULT([         Netatalk lockfile:       $ac_cv_netatalk_lock])
@@@ -91,11 -90,6 +91,11 @@@ AC_DEFUN([AC_NETATALK_LIBS_SUMMARY], 
        AC_MSG_RESULT([    PTHREADS:])
        AC_MSG_RESULT([        LIBS   = $PTHREAD_LIBS])
        AC_MSG_RESULT([        CFLAGS = $PTHREAD_CFLAGS])
 +      if test x"$ac_cv_have_tracker" = x"yes"; then
 +              AC_MSG_RESULT([    TRACKER:])
 +              AC_MSG_RESULT([        LIBS   = $TRACKER_LIBS])
 +              AC_MSG_RESULT([        CFLAGS = $TRACKER_CFLAGS])
 +      fi
        if test x"$neta_cv_have_openssl" = x"yes"; then
                AC_MSG_RESULT([    SSL:])
                AC_MSG_RESULT([        LIBS   = $SSL_LIBS])
diff --combined man/man5/afp.conf.5.in
index f8ade925c8ac010a387258399c5ebbcb61914f57,9389328676df6d91d353f2a30d065bad8f7b98d7..b6d250c5a6d8b98430d0ea47ed42dc31e201c95c
@@@ -571,7 -571,7 +571,7 @@@ and should be quoted\&. Extended charac
  ignored attributes = \fIall | nowrite | nodelete | norename\fR \fB(G)/(V)\fR
  .RS 4
  Speficy a set of file and directory attributes that shall be ignored by the server,
 -<attribute>all</attribute>
 +\fBall\fR
  includes all the other options\&.
  .sp
  In OS X when the Finder sets a lock on a file/directory or you set the BSD uchg flag in the Terminal, all three attributes are used\&. Thus in order to ignore the Finder lock/BSD uchg flag, add set
@@@ -595,11 -595,13 +595,18 @@@ solaris share reservations = \fIBOOLEAN
  Use share reservations on Solaris\&. Solaris CIFS server uses this too, so this makes a lock coherent multi protocol server\&.
  .RE
  .PP
 +spotlight = \fIBOOLEAN\fR (default: \fIno\fR) \fB(G)/(V)\fR
 +.RS 4
 +Whether to enable Spotlight searches\&. Note: once the global option is enabled, any volume that is not enabled won\*(Aqt be searchable at all\&.
 +.RE
 +.PP
+ veto message = \fIBOOLEAN\fR (default: \fIno\fR) \fB(G)\fR
+ .RS 4
+ Use section
+ \fBname\fR
+ as option preset for all volumes (when set in the [Global] section) or for one volume (when set in that volume\*(Aqs section)\&.
+ .RE
+ .PP
  vol dbpath = \fIpath\fR \fB(G)\fR
  .RS 4
  Sets the database information to be stored in path\&. You have to specify a writable location, even if the volume is read only\&. The default is
@@@ -819,6 -821,11 +826,11 @@@ ldap name attr = \fIdn\fR \fB(G)\f
  Name of the LDAP attribute with the users short name\&.
  .RE
  .PP
+ ldap group attr = \fIdn\fR \fB(G)\fR
+ .RS 4
+ Name of the LDAP attribute with the groups short name\&.
+ .RE
+ .PP
  ldap uuid string = \fISTRING\fR \fB(G)\fR
  .RS 4
  Format of the uuid string in the directory\&. A series of x and \-, where every x denotes a value 0\-9a\-f and every \- is a separator\&.
@@@ -829,6 -836,11 +841,11 @@@ Default: xxxxxxxx\-xxxx\-xxxx\-xxxx\-xx
  ldap uuid encoding = \fIstring | ms\-guid (default: string)\fR \fB(G)\fR
  .RS 4
  Format of the UUID of the LDAP attribute, allows usage of the binary objectGUID fields from Active Directory\&. If left unspecified, string is the default, which passes through the ASCII UUID returned by most other LDAP stores\&. If set to ms\-guid, the internal UUID representation is converted to and from the binary format used in the objectGUID attribute found on objects in Active Directory when interacting with the server\&.
+ .sp
+ See also the options
+ \fBldap user filter\fR
+ and
+ \fBldap group filter\fR\&.
  .PP
  string
  .RS 4
@@@ -841,9 -853,20 +858,20 @@@ Binary objectGUID from Active Director
  .RE
  .RE
  .PP
- ldap group attr = \fIdn\fR \fB(G)\fR
+ ldap user filter = \fISTRING (default: unused)\fR \fB(G)\fR
  .RS 4
- Name of the LDAP attribute with the groups short name\&.
+ Optional LDAP filter that matches user objects\&. This is necessary for Active Directory environments where users and groups are stored in the same directory subtree\&.
+ .sp
+ Recommended setting for Active Directory:
+ \fIobjectClass=user\fR\&.
+ .RE
+ .PP
+ ldap group filter = \fISTRING (default: unused)\fR \fB(G)\fR
+ .RS 4
+ Optional LDAP filter that matches group objects\&. This is necessary for Active Directory environments where users and groups are stored in the same directory subtree\&.
+ .sp
+ Recommended setting for Active Directory:
+ \fIobjectClass=group\fR\&.
  .RE
  .SH "EXPLANATION OF VOLUME PARAMETERS"
  .SS "Parameters"
@@@ -1061,6 -1084,13 +1089,13 @@@ is performed when accessing filesystem
  on volumes and do the conversion with that\&. Then this option can be set to no\&.
  .RE
  .PP
+ delete veto files = \fIBOOLEAN\fR (default: \fIno\fR) \fB(V)\fR
+ .RS 4
+ This option is used when Netatalk is attempting to delete a directory that contains one or more vetoed files or directories (see the veto files option)\&. If this option is set to no (the default) then if a directory contains any non\-vetoed files or directories then the directory delete will fail\&. This is usually what you want\&.
+ .sp
+ If this option is set to yes, then Netatalk will attempt to recursively delete any files and directories within the vetoed directory\&.
+ .RE
+ .PP
  follow symlinks = \fIBOOLEAN\fR (default: \fIno\fR) \fB(V)\fR
  .RS 4
  The default setting is false thus symlinks are not followed on the server\&. This is the same behaviour as OS X\*(Aqs AFP server\&. Setting the option to true causes afpd to follow symlinks on the server\&. symlinks may point outside of the AFP volume, currently afpd doesn\*(Aqt do any checks for "wide symlinks"\&.