]> arthur.barton.de Git - netatalk.git/commitdiff
.AppleDxxx folders were user accessible if option 'usedots' was set
authordidg <didg>
Mon, 20 Jul 2009 18:31:04 +0000 (18:31 +0000)
committerdidg <didg>
Mon, 20 Jul 2009 18:31:04 +0000 (18:31 +0000)
etc/afpd/directory.c
etc/afpd/file.c

index ad7741a796bd6227f0172b546a28a89cd305fa46..bd6542f739350476268996c82dca7021e662ff33 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.c,v 1.98 2009-06-19 13:38:32 franklahm Exp $
+ * $Id: directory.c,v 1.99 2009-07-20 18:31:04 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -704,6 +704,13 @@ struct path *path;
         afp_errno = AFPERR_PARAM;
         return NULL;
     }
+
+    if (check_name(vol, path->u_name)) {
+        /* the name is illegal */
+        afp_errno = AFPERR_PARAM;
+        return NULL;
+    }
+
     if (of_stat( path ) != 0 ) {
         if (!(vol->v_flags & AFPVOL_CASEINSEN))
             return NULL;
@@ -2418,9 +2425,6 @@ int       ibuflen _U_, *rbuflen;
         return AFPERR_EXIST;
 
     upath = s_path->u_name;
-    if (0 != (err = check_name(vol, upath))) {
-       return err;
-    }
 
     if (AFP_OK != (err = netatalk_mkdir( upath))) {
         return err;
index a02cb5a92da66167fa0a3592a42d843c1e0e5ee3..5bd632407ec1ded2ac3103c56095da4e5bd99a79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.108 2008-12-23 08:27:50 didg Exp $
+ * $Id: file.c,v 1.109 2009-07-20 18:31:04 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -576,7 +576,6 @@ int ibuflen _U_, *rbuflen;
     char               *path, *upath;
     int                        creatf, did, openf, retvalue = AFP_OK;
     u_int16_t          vid;
-    int                 ret;
     struct path                *s_path;
     
 #ifdef DEBUG
@@ -613,8 +612,6 @@ int ibuflen _U_, *rbuflen;
     }
 
     upath = s_path->u_name;
-    if (0 != (ret = check_name(vol, upath))) 
-       return  ret;
     
     /* if upath is deleted we already in trouble anyway */
     if ((of = of_findname(s_path))) {