/*
- * $Id: afp_options.c,v 1.40 2009-03-26 18:21:40 franklahm Exp $
+ * $Id: afp_options.c,v 1.46 2009-10-13 22:55:36 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
options->systemvol.name = _PATH_AFPDSYSVOL;
options->configfile = _PATH_AFPDCONF;
options->uampath = _PATH_AFPDUAMPATH;
- options->uamlist = "uams_clrtxt.so,uams_dhx.so";
+ options->uamlist = "uams_dhx.so,uams_dhx2.so";
options->guest = "nobody";
options->loginmesg = "";
- options->transports = AFPTRANS_ALL;
+ options->transports = AFPTRANS_TCP; /* TCP only */
options->passwdfile = _PATH_AFPDPWFILE;
options->tickleval = 30;
options->timeout = 4;
}
/* -[no]setuplog <logtype> <loglevel> [<filename>]*/
- if ((c = getoption(buf, "-setuplog"))) {
- char *ptr, *logtype, *loglevel, *filename;
- ptr = c;
-
- /* logtype */
- logtype = ptr;
-
- /* get loglevel */
- ptr = strpbrk(ptr, " \t");
- if (ptr) {
- *ptr++ = 0;
- while (*ptr && isspace(*ptr))
- ptr++;
- loglevel = ptr;
-
- /* get filename */
- ptr = strpbrk(ptr, " \t");
- if (ptr) {
- *ptr++ = 0;
- while (*ptr && isspace(*ptr))
- ptr++;
- }
- filename = ptr;
- }
-
- /* finally call setuplog, filename can be NULL */
- setuplog(logtype, loglevel, filename);
+ c = buf;
+ /* Now THIS is hokey! Multiple occurrences are not supported by our current code, */
+ /* so I have to loop myself. */
+ while (NULL != (c = strstr(c, "-setuplog"))) {
+ char *optstr;
+ if ((optstr = getoption(c, "-setuplog"))) {
+ setuplog(optstr);
+ c += sizeof("-setuplog");
+ }
}
- if ((c = getoption(buf, "-unsetuplog"))) {
- char *ptr, *logtype, *loglevel, *filename;
-
- /* logtype */
- logtype = c;
-
- /* get filename, can be NULL */
- strtok(c, " \t");
- filename = strtok(NULL, " \t");
-
- /* finally call setuplog, filename can be NULL */
- setuplog(logtype, NULL, filename);
- }
+ if ((c = getoption(buf, "-unsetuplog")))
+ unsetuplog(c);
#ifdef ADMIN_GRP
if ((c = getoption(buf, "-admingroup"))) {
* Show version information about afpd.
* Used by "afp -v".
*/
-void show_version( )
+void show_version( void )
{
printf( "afpd %s - Apple Filing Protocol (AFP) daemon of Netatalk\n\n", VERSION );
* Show extended version information about afpd and Netatalk.
* Used by "afp -V".
*/
-void show_version_extended( )
+void show_version_extended(void )
{
show_version( );