X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fafpd%2Fafp_options.c;h=16863eb547ae3c12b7ea635562aff80074511d87;hb=b0bcb8f6b0571592a50ce039882c9319e012a270;hp=82db1c8e5bae81acf233e733b5fe96f8b96d719a;hpb=0387b4665bef6a5cb6851581e42cad0ecca3e90c;p=netatalk.git diff --git a/etc/afpd/afp_options.c b/etc/afpd/afp_options.c index 82db1c8e..16863eb5 100644 --- a/etc/afpd/afp_options.c +++ b/etc/afpd/afp_options.c @@ -34,9 +34,9 @@ #include #include #include +#include #include -#include "globals.h" #include "status.h" #include "auth.h" #include "dircache.h" @@ -140,6 +140,8 @@ void afp_options_free(struct afp_options *opt, free(opt->ntseparator); if (opt->logconfig && (opt->logconfig != save->logconfig)) free(opt->logconfig); + if (opt->mimicmodel && (opt->mimicmodel != save->mimicmodel)) + free(opt->mimicmodel); } /* initialize options */ @@ -190,6 +192,7 @@ void afp_options_init(struct afp_options *options) options->tcp_sndbuf = 0; /* 0 means don't change OS default */ options->tcp_rcvbuf = 0; /* 0 means don't change OS default */ options->dsireadbuf = 12; + options->mimicmodel = NULL; } /* parse an afpd.conf line. i'm doing it this way because it's @@ -351,8 +354,11 @@ int afp_options_parseline(char *buf, struct afp_options *options) while (NULL != (c = strstr(c, "-setuplog"))) { char *optstr; if ((optstr = getoption(c, "-setuplog"))) { + /* hokey2: options->logconfig must be converted to store an array of logstrings */ + if (options->logconfig) + free(options->logconfig); + options->logconfig = strdup(optstr); setuplog(optstr); - options->logconfig = optstr; /* at least store the last (possibly only) one */ c += sizeof("-setuplog"); } } @@ -417,8 +423,6 @@ int afp_options_parseline(char *buf, struct afp_options *options) if ((c = getoption(buf, "-port"))) 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; @@ -492,6 +496,9 @@ int afp_options_parseline(char *buf, struct afp_options *options) fce_set_events(c); } + if ((c = getoption(buf, "-mimicmodel")) && (opt = strdup(c))) + options->mimicmodel = opt; + return 1; } @@ -514,13 +521,6 @@ static void show_version( void ) printf( " TCP/IP Support:\t" ); puts( "Yes" ); - printf( "DDP(AppleTalk) Support:\t" ); -#ifdef NO_DDP - puts( "No" ); -#else - puts( "Yes" ); -#endif - printf( " CNID backends:\t" ); #ifdef CNID_BACKEND_CDB printf( "cdb "); @@ -607,20 +607,6 @@ static void show_version_extended(void ) puts( "No" ); #endif - printf( " Dropbox kludge:\t" ); -#ifdef DROPKLUDGE - puts( "Yes" ); -#else - puts( "No" ); -#endif - - printf( " Force volume uid/gid:\t" ); -#ifdef FORCE_UIDGID - puts( "Yes" ); -#else - puts( "No" ); -#endif - printf( " ACL support:\t" ); #ifdef HAVE_ACLS puts( "Yes" );