]> arthur.barton.de Git - netatalk.git/commitdiff
New option 'afpstats'
authorRalph Boehme <sloowfranklin@gmail.com>
Mon, 4 Mar 2013 16:45:19 +0000 (17:45 +0100)
committerRalph Boehme <sloowfranklin@gmail.com>
Mon, 4 Mar 2013 16:45:19 +0000 (17:45 +0100)
NEWS
etc/afpd/main.c
include/atalk/globals.h
libatalk/util/netatalk_conf.c
man/man5/afp.conf.5.tmpl

diff --git a/NEWS b/NEWS
index 070b773c353605796414bb1646cd3f5368255a32..7f43cf0f74e3bca2bed6c6d6e1ac0524cec835c2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,7 +18,9 @@ Changes in 3.0.3
 * NEW: AFP stats about active session via dbus IPC. Client side python
        program `afpstats`. Requires dbus, dbus-glib any python-dbus.
        configure option --dbus-sysconf-dir for specifying dbus
-       system security configuration files.       
+       system security configuration files.
+       New option 'afpstats' (default: no) which determines whether
+       to enable the feature or not.
 * NEW: dtrace probes, cf include/atalk/afp_dtrace.d for available
        probes.
 * UPD: Reload groups when reloading volumes. FR #71.
index 2265047958dc35f5b56512f272b129d0984652fd..141d420cdf80fc53752c6fbc680e9029d86f84fc 100644 (file)
@@ -329,7 +329,8 @@ int main(int ac, char **av)
 
 #ifdef HAVE_DBUS_GLIB
     /* Run dbus AFP statics thread */
-    (void)afpstats_init(server_children);
+    if (obj.options.flags & OPTION_DBUS_AFPSTATS)
+        (void)afpstats_init(server_children);
 #endif
 
     afp_child_t *child;
index e5fbb292f9ba1cf561141d3e18c8eabfe37d6629..96f062a06aa1600ea939280532c4eeb525b4463c 100644 (file)
@@ -55,6 +55,7 @@
 #define OPTION_ACL2MACCESS   (1 << 8)
 #define OPTION_NOZEROCONF    (1 << 9)
 #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 PASSWD_NONE     0
 #define PASSWD_SET     (1 << 0)
index b51b2a0d13cffad8d1b7c70bbcc4e3077c22e5f2..fdc7e556b2a646b95b1e51908b3465a0c2618646 100644 (file)
@@ -1719,6 +1719,8 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
         options->flags |= OPTION_NOSENDFILE;
     if (iniparser_getboolean(config, INISEC_GLOBAL, "solaris share reservations", 1))
         options->flags |= OPTION_SHARE_RESERV;
+    if (iniparser_getboolean(config, INISEC_GLOBAL, "afpstats", 0))
+        options->flags |= OPTION_DBUS_AFPSTATS;
     if (iniparser_getboolean(config, INISEC_GLOBAL, "afp read locks", 0))
         options->flags |= OPTION_AFP_READ_LOCK;
     if (!iniparser_getboolean(config, INISEC_GLOBAL, "save password", 1))
index c03ad30a8b8a201090e8c8b732e30dc90c2cb715..6840bf7dcbf25bf062b2acd148632d046e9a4c31 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: afp.conf
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
-.\"      Date: 19 Jan 2013
+.\"      Date: 19 Feb 2013
 .\"    Manual: Netatalk 3.0
 .\"    Source: Netatalk 3.0
 .\"  Language: English
 .\"
-.TH "AFP\&.CONF" "5" "19 Jan 2013" "Netatalk 3.0" "Netatalk 3.0"
+.TH "AFP\&.CONF" "5" "19 Feb 2013" "Netatalk 3.0" "Netatalk 3.0"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -508,6 +508,11 @@ afp read locks = \fIBOOLEAN\fR (default: \fIno\fR) \fB(G)\fR
 Whether to apply locks to the byte region read in FPRead calls\&. The AFP spec mandates this, but it\*(Aqs not really in line with UNIX semantics and is a performance hug\&.
 .RE
 .PP
+afpstats = \fIBOOLEAN\fR (default: \fIno\fR) \fB(G)\fR
+.RS 4
+Whether to provide AFP runtime statistics (connected users, open volumes) via dbus\&.
+.RE
+.PP
 basedir regex = \fIregex\fR \fB(H)\fR
 .RS 4
 Regular expression which matches the parent directory of the user homes\&. If
@@ -871,7 +876,7 @@ cnid scheme = \fIbackend\fR \fB(V)\fR
 set the CNID backend to be used for the volume, default is [:DEFAULT_CNID_SCHEME:] available schemes: [:COMPILED_BACKENDS:]
 .RE
 .PP
-ea = \fInone|auto|sys|ad\fR
+ea = \fInone|auto|sys|ad\fR \fB(V)\fR
 .RS 4
 Specify how Extended Attributes
 are stored\&.
@@ -914,7 +919,7 @@ specifies the Mac client charset for this Volume, e\&.g\&.
 \fIMAC_CYRILLIC\fR\&. If not specified the global setting is applied\&. This setting is only required if you need volumes, where the Mac charset differs from the one globally set in the [Global] section\&.
 .RE
 .PP
-casefold = \fBoption\fR
+casefold = \fBoption\fR \fB(V)\fR
 .RS 4
 The casefold option handles, if the case of filenames should be changed\&. The available options are:
 .sp
@@ -951,7 +956,7 @@ is for directories only\&. Don\*(Aqt use with "\fBunix priv = no\fR"\&.
 .\}
 .nf
 file perm = 0660 directory perm =
-                0770
+              0770
 .fi
 .if n \{\
 .RE