]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/directory.c
sys/syslog.h -> syslog.h
[netatalk.git] / etc / afpd / directory.c
index d7e7f4be4f4df4ef305a089378befe04f4ea2b4e..215a60c48c5287d9c951efd110c560275449a0b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.c,v 1.19.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: directory.c,v 1.19.2.5 2002-03-12 15:05:50 srittau Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -12,7 +12,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#include <sys/syslog.h>
+#include <syslog.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
@@ -55,6 +55,7 @@ char *strchr (), *strrchr ();
 #include "volume.h"
 #include "fork.h"
 #include "file.h"
+#include "filedir.h"
 #include "globals.h"
 #include "unix.h"
 
@@ -455,9 +456,11 @@ static int deletedir(char *dir)
                     continue; /* somebody went and deleted it behind our backs. */
                 case EROFS:
                     err = AFPERR_VLOCK;
+                    break;
                 case EPERM:
                 case EACCES :
                     err = AFPERR_ACCESS;
+                    break;
                 default :
                     err = AFPERR_PARAM;
                 }
@@ -1422,8 +1425,7 @@ int               ibuflen, *rbuflen;
     }
 
     /* check for illegal bits */
-    if ((vol->v_flags & AFPVOL_MSWINDOWS) &&
-            strpbrk(path, MSWINDOWS_BADCHARS))
+    if (!wincheck(vol, path))
         return AFPERR_PARAM;
 
     upath = mtoupath(vol, path);