]> arthur.barton.de Git - netatalk.git/commitdiff
Remove volume option debugfile
authorfranklahm <franklahm>
Mon, 8 Feb 2010 10:29:22 +0000 (10:29 +0000)
committerfranklahm <franklahm>
Mon, 8 Feb 2010 10:29:22 +0000 (10:29 +0000)
NEWS
etc/afpd/file.c
etc/afpd/volume.c
include/atalk/volume.h

diff --git a/NEWS b/NEWS
index 42dedb42b657d127db686a04a97417edf3784215..5441053468672a8eaa50ab6b1f0dd2f4870b42ed 100644 (file)
--- 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.
index 41195251c086e1da8fd3049f50b5d2b2440404c2..31107ce28177101c76f79efea70483003817d30e 100644 (file)
@@ -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);
 }
 
index 53c3a9cbc438f3f68977dacad24774c9341355c3..fd174e1737c609a36d7fb306a2d4bd71eb8b58f8 100644 (file)
@@ -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;
index df24620fba8dbc94d463e8076ccb209c200fbd07..da8f173bececd0c0ef5972759ff86b6972665862 100644 (file)
@@ -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;