#include <atalk/paths.h>
#include <atalk/util.h>
#include <atalk/compat.h>
+#include <atalk/globals.h>
#include <atalk/fce_api.h>
-#include "globals.h"
#include "status.h"
#include "auth.h"
#include "dircache.h"
options->tcp_rcvbuf = 0; /* 0 means don't change OS default */
options->dsireadbuf = 12;
options->mimicmodel = NULL;
+ options->fce_fmodwait = 60; /* put fmod events 60 seconds on hold */
}
/* parse an afpd.conf line. i'm doing it this way because it's
options->flags |= OPTION_ANNOUNCESSH;
if (strstr(buf, " -noacl2maccess"))
options->flags &= ~OPTION_ACL2MACCESS;
+ if (strstr(buf, " -keepsessions")) {
+ default_options.flags |= OPTION_KEEPSESSIONS;
+ options->flags |= OPTION_KEEPSESSIONS;
+ }
/* passwd bits */
if (strstr(buf, " -nosavepassword"))
}
if ((c = getoption(buf, "-sleep"))) {
- options->sleep = atoi(c) *120;
+ options->disconnected = options->sleep = atoi(c) * 120;
if (options->sleep <= 4) {
- options->sleep = 4;
+ options->disconnected = options->sleep = 4;
}
}
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");
}
}
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;
fce_set_events(c);
}
+ if ((c = getoption(buf, "-fceholdfmod")))
+ options->fce_fmodwait = atoi(c);
+
if ((c = getoption(buf, "-mimicmodel")) && (opt = strdup(c)))
options->mimicmodel = opt;
*/
static void show_version( void )
{
+ int num, i;
+
printf( "afpd %s - Apple Filing Protocol (AFP) daemon of Netatalk\n\n", VERSION );
puts( "This program is free software; you can redistribute it and/or modify it under" );
puts( "afpd has been compiled with support for these features:\n" );
- printf( " AFP3.x support:\tYes\n" );
- printf( " TCP/IP Support:\t" );
- puts( "Yes" );
-
- printf( "DDP(AppleTalk) Support:\t" );
-#ifdef NO_DDP
- puts( "No" );
-#else
- puts( "Yes" );
-#endif
+ num = sizeof( afp_versions ) / sizeof( afp_versions[ 0 ] );
+ printf( " AFP versions:\t" );
+ for ( i = 0; i < num; i++ ) {
+ printf( "%d.%d ", afp_versions[ i ].av_number/10, afp_versions[ i ].av_number%10);
+ }
+ puts( "" );
printf( " CNID backends:\t" );
#ifdef CNID_BACKEND_CDB
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" );
*p = '\0';
}
+#ifdef ultrix
if (NULL == ( p = strrchr( av[ 0 ], '/' )) ) {
p = av[ 0 ];
} else {
p++;
}
+ openlog( p, LOG_PID ); /* ultrix only */
+#endif /* ultrix */
while (EOF != ( c = getopt( ac, av, OPTIONS )) ) {
switch ( c ) {
exit( 2 );
}
-#ifdef ultrix
- openlog( p, LOG_PID ); /* ultrix only */
-#else
- set_processname(p);
-#endif /* ultrix */
-
return 1;
}