]> arthur.barton.de Git - netatalk.git/commitdiff
Global boolean option "spotlight"
authorFrank Lahm <franklahm@googlemail.com>
Wed, 17 Oct 2012 21:38:07 +0000 (23:38 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 17 Oct 2012 21:38:07 +0000 (23:38 +0200)
Add a global know to make Spotlight support a configurable option.
Defaults to disabled.

etc/afpd/main.c
include/atalk/globals.h
libatalk/util/netatalk_conf.c

index e2a353e9bb2630c5911876aa7e19b93a9d3951cd..2598a72ecc1424a78a7f902de1fbac0191e4c3d4 100644 (file)
@@ -344,7 +344,8 @@ int main(int ac, char **av)
 
     /* Initialize */
     cnid_init();
-    sl_mod_load(_PATH_AFPDUAMPATH "mod_spotlight.so");
+    if (obj.options.flags & OPTION_SPOTLIGHT)
+        sl_mod_load(_PATH_AFPDUAMPATH "mod_spotlight.so");
 
     /* watch atp, dsi sockets and ipc parent/child file descriptor. */
 
index b8412d15d7c7b300f8b90b3c94a58ddeb96e374b..6a45f14429818075abeb345ba0cedd6cb5fd59b0 100644 (file)
@@ -43,7 +43,7 @@
 #define OPTION_NOZEROCONF    (1 << 9)
 #define OPTION_KEEPSESSIONS  (1 << 10) /* preserve sessions across master afpd restart with SIGQUIT */
 #define OPTION_SHARE_RESERV  (1 << 11) /* whether to use Solaris fcntl F_SHARE locks */
-
+#define OPTION_SPOTLIGHT     (1 << 12) /* whether to enable Spotlight support */
 #define PASSWD_NONE     0
 #define PASSWD_SET     (1 << 0)
 #define PASSWD_NOSAVE  (1 << 1)
index a08ddebd44dafacaf84a7d8b87fc735e627392a3..08b6183ed9de3c5ab438d986848d2f0b101e962a 100644 (file)
@@ -1448,6 +1448,8 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
         options->flags |= OPTION_SHARE_RESERV;
     if (iniparser_getboolean(config, INISEC_GLOBAL, "afp read locks", 0))
         options->flags |= OPTION_AFP_READ_LOCK;
+    if (iniparser_getboolean(config, INISEC_GLOBAL, "spotlight", 0))
+        options->flags |= OPTION_SPOTLIGHT;
     if (!iniparser_getboolean(config, INISEC_GLOBAL, "save password", 1))
         options->passwdbits |= PASSWD_NOSAVE;
     if (iniparser_getboolean(config, INISEC_GLOBAL, "set password", 0))