]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_options.c
Merge from branch-2-1
[netatalk.git] / etc / afpd / afp_options.c
index aa728512e0ba722be8133d4d5f23f1ea25b699fc..1bc1ebe1265982cdb5ca3d6bc534eccc6f66b9b1 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id: afp_options.c,v 1.54 2010-04-02 16:17:22 hat001 Exp $
- *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -49,6 +47,7 @@ char *strchr (), *strrchr ();
 #include "globals.h"
 #include "status.h"
 #include "auth.h"
+#include "dircache.h"
 
 #include <atalk/compat.h>
 
@@ -137,8 +136,8 @@ void afp_options_free(struct afp_options *opt,
         free(opt->uamlist);
     if (opt->passwdfile && (opt->passwdfile != save->passwdfile))
         free(opt->passwdfile);
-    if (opt->signature && (opt->signature != save->signature))
-       free(opt->signature);
+    if (opt->signatureopt && (opt->signatureopt != save->signatureopt))
+       free(opt->signatureopt);
     if (opt->k5service && (opt->k5service != save->k5service))
        free(opt->k5service);
     if (opt->k5realm && (opt->k5realm != save->k5realm))
@@ -177,6 +176,7 @@ void afp_options_init(struct afp_options *options)
     options->sleep = 10* 120; /* 10 h in 30 seconds tick */
     options->server_notif = 1;
     options->authprintdir = NULL;
+    options->signatureopt = "auto";
     options->umask = 0;
 #ifdef ADMIN_GRP
     options->admingid = 0;
@@ -195,6 +195,7 @@ void afp_options_init(struct afp_options *options)
     /* don't advertize slp by default */
     options->flags |= OPTION_NOSLP;
 #endif
+    options->dircachesize = DEFAULT_MAX_DIRCACHE_SIZE;
 }
 
 /* parse an afpd.conf line. i'm doing it this way because it's
@@ -398,6 +399,8 @@ int afp_options_parseline(char *buf, struct afp_options *options)
         options->port = strdup(c);
     if ((c = getoption(buf, "-ddpaddr")))
         atalk_aton(c, &options->ddpaddr);
+    if ((c = getoption(buf, "-signature")) && (opt = strdup(c)))
+        options->signatureopt = opt;
 
     /* do a little checking for the domain name. */
     if ((c = getoption(buf, "-fqdn"))) {
@@ -446,14 +449,10 @@ int afp_options_parseline(char *buf, struct afp_options *options)
 
     if ((c = getoption(buf, "-ntseparator")) && (opt = strdup(c)))
        options->ntseparator = opt;
-     
-    if ((c = getoption(buf, "-signature")) && (opt = strdup(c))) {
-        set_signature(opt, options);
-    }
-    else {
-        set_signature("auto", options);
-    }
 
+    if ((c = getoption(buf, "-dircachesize")))
+        options->dircachesize = atoi(c);
+     
     return 1;
 }