From a1fbe98fceb7b7e11ba1694b358a7c4c8ee919dc Mon Sep 17 00:00:00 2001 From: franklahm Date: Mon, 8 Feb 2010 10:29:22 +0000 Subject: [PATCH] Remove volume option debugfile --- NEWS | 4 ---- etc/afpd/file.c | 16 ++-------------- etc/afpd/volume.c | 13 +++---------- include/atalk/volume.h | 4 ++-- 4 files changed, 7 insertions(+), 30 deletions(-) diff --git a/NEWS b/NEWS index 42dedb42..54410534 100644 --- a/NEWS +++ b/NEWS @@ -24,10 +24,6 @@ Changes in 2.1-beta1 * NEW: support for Unicode characters in the range above U+010000 using internal surrogate pairs * NEW: apple_dump: utility to dump AppleSingle and AppleDouble files -* NEW: afpd: new volume option to enable live debugging of AFP connections: - debugfile:FILE. When FILE is created in volume root from the AFP - client, the afpd process raises its debug level to log_maxdebug - and writes to FILE. * UPD: atalkd and papd are now disabled by default. AppleTalk is legacy. * UPD: slp advertisement is now disabled by default. server option -slp SRVLOC is legacy. diff --git a/etc/afpd/file.c b/etc/afpd/file.c index 41195251..31107ce2 100644 --- a/etc/afpd/file.c +++ b/etc/afpd/file.c @@ -1,5 +1,5 @@ /* - * $Id: file.c,v 1.132 2010-02-04 10:52:29 franklahm Exp $ + * $Id: file.c,v 1.133 2010-02-08 10:29:22 franklahm Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -596,7 +596,7 @@ int afp_createfile(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, } upath = s_path->u_name; - + /* if upath is deleted we already in trouble anyway */ if ((of = of_findname(s_path))) { adp = of->of_ad; @@ -667,18 +667,6 @@ createfile_done: setvoltime(obj, vol ); - /* Check if this is the magic debugfile */ - if (retvalue == AFP_OK - && curdir->d_did == htonl(2) - && vol->v_debugfile - && strcmp(upath, vol->v_debugfile) == 0) { - char *path = absupath(vol, curdir, upath); - char *logstring = malloc(strlen("default log_maxdebug ") + strlen(path) + 1); - sprintf(logstring, "default log_maxdebug %s", path); - setuplog(logstring); - free(logstring); - } - return (retvalue); } diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index 53c3a9cb..fd174e17 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -1,5 +1,5 @@ /* - * $Id: volume.c,v 1.116 2010-02-04 10:52:29 franklahm Exp $ + * $Id: volume.c,v 1.117 2010-02-08 10:29:22 franklahm Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -128,8 +128,8 @@ static void free_extmap(void); #define VOLOPT_FPERM 25 /* fperm default files perms */ #define VOLOPT_DFLTPERM 26 /* perm */ #define VOLOPT_EA_VFS 27 /* Extended Attributes vfs indirection */ -#define VOLOPT_DEBUG_FILE 28 /* Enable debugging for one AFP process */ -#define VOLOPT_MAX 29 /* <== IMPORTANT !!!!!! */ + +#define VOLOPT_MAX 28 /* <== IMPORTANT !!!!!! */ #define VOLOPT_NUM (VOLOPT_MAX + 1) #define VOLPASSLEN 8 @@ -522,9 +522,6 @@ static void volset(struct vol_option *options, struct vol_option *save, else if (strcasecmp(val + 1, "none") == 0) options[VOLOPT_EA_VFS].i_value = AFPVOL_EA_NONE; - } else if (optionok(tmp, "debugfile:", val)) { - setoption(options, save, VOLOPT_DEBUG_FILE, val); - } else { /* ignore unknown options */ LOG(log_debug, logtype_afpd, "ignoring unknown volume option: %s", tmp); @@ -789,10 +786,6 @@ static int creatvol(AFPObj *obj, struct passwd *pwd, if (options[VOLOPT_ROOTPOSTEXEC].c_value) volume->v_root_postexec = volxlate(obj, NULL, MAXPATHLEN, options[VOLOPT_ROOTPOSTEXEC].c_value, pwd, path, name); } - - if (options[VOLOPT_DEBUG_FILE].c_value) - volume->v_debugfile = strdup(options[VOLOPT_DEBUG_FILE].c_value); - } volume->v_dperm |= volume->v_perm; volume->v_fperm |= volume->v_perm; diff --git a/include/atalk/volume.h b/include/atalk/volume.h index df24620f..da8f173b 100644 --- a/include/atalk/volume.h +++ b/include/atalk/volume.h @@ -1,5 +1,5 @@ /* - * $Id: volume.h,v 1.12 2010-02-04 10:52:29 franklahm Exp $ + * $Id: volume.h,v 1.13 2010-02-08 10:29:22 franklahm Exp $ * * Copyright (c) 1990,1994 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -82,7 +82,7 @@ struct vol { char *v_postexec; int v_root_preexec_close; int v_preexec_close; - char *v_debugfile; /* magic file that enables debugging when created in did 2 */ + #ifdef FORCE_UIDGID char *v_forceuid; char *v_forcegid; -- 2.39.2