]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_options.c
New option afpd.conf adminauthuser
[netatalk.git] / etc / afpd / afp_options.c
index f2d73cd3cc8ee71a665fe988ee9e285f20ca67d5..06cf20bc1b4bd6775336b2786361506f0da565bb 100644 (file)
@@ -142,6 +142,8 @@ void afp_options_free(struct afp_options *opt,
        free(opt->logconfig);
        if (opt->mimicmodel && (opt->mimicmodel != save->mimicmodel))
        free(opt->mimicmodel);
+       if (opt->adminauthuser && (opt->adminauthuser != save->adminauthuser))
+       free(opt->adminauthuser);
 }
 
 /* initialize options */
@@ -194,6 +196,7 @@ void afp_options_init(struct afp_options *options)
     options->dsireadbuf = 12;
        options->mimicmodel = NULL;
     options->fce_fmodwait = 60; /* put fmod events 60 seconds on hold */
+    options->adminauthuser = NULL;
 }
 
 /* parse an afpd.conf line. i'm doing it this way because it's
@@ -511,6 +514,9 @@ int afp_options_parseline(char *buf, struct afp_options *options)
     if ((c = getoption(buf, "-mimicmodel")) && (opt = strdup(c)))
        options->mimicmodel = opt;
 
+    if ((c = getoption(buf, "-adminauthuser")) && (opt = strdup(c)))
+       options->adminauthuser = opt;
+
     return 1;
 }