]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/file.c
replaced all #include <sys/syslog.h> with #include <syslog.h>
[netatalk.git] / etc / afpd / file.c
index de4ee8a15c35b4edfb8f62035f083b1cca9d9633..40d6b183596c54d2f6c43f4fa603fcb5838002e6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.30 2001-12-03 05:03:38 jmarcus Exp $
+ * $Id: file.c,v 1.34 2002-01-03 17:49:38 sibaz Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -38,7 +38,7 @@ char *strchr (), *strrchr ();
 #include <sys/mman.h>
 #include <errno.h>
 
-#include <sys/syslog.h>
+#include <syslog.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/param.h>
@@ -409,8 +409,7 @@ int         ibuflen, *rbuflen;
         return( AFPERR_NOOBJ );
     }
 
-    if ((vol->v_flags & AFPVOL_MSWINDOWS) &&
-            strpbrk(path, MSWINDOWS_BADCHARS))
+    if (!wincheck(vol, path))
         return AFPERR_PARAM;
 
     upath = mtoupath(vol, path);
@@ -762,7 +761,7 @@ const int         noadouble;
     /* existence check moved to afp_moveandrename */
 
 #ifdef DEBUG
-    syslog (LOG_INFO, "begin renamefile:");
+    syslog(LOG_INFO, "begin renamefile:");
 #endif /* DEBUG */
 
     if ( rename( src, dst ) < 0 ) {
@@ -833,7 +832,7 @@ rename_retry:
     ad_close( &ad, ADFLAGS_HF );
 
 #ifdef DEBUG
-    syslog (LOG_INFO, "end renamefile:");
+    syslog(LOG_INFO, "end renamefile:");
 #endif /* DEBUG */
 
     return( AFP_OK );
@@ -852,7 +851,7 @@ int         ibuflen, *rbuflen;
     u_int16_t  svid, dvid;
 
 #ifdef DEBUG
-    syslog (LOG_INFO, "begin afp_copyfile:");
+    syslog(LOG_INFO, "begin afp_copyfile:");
 #endif /* DEBUG */
 
     *rbuflen = 0;
@@ -936,7 +935,7 @@ int         ibuflen, *rbuflen;
 #endif /* DROPKLUDGE */
 
 #ifdef DEBUG
-    syslog (LOG_INFO, "end afp_copyfile:");
+    syslog(LOG_INFO, "end afp_copyfile:");
 #endif /* DEBUG */
 
     return( retvalue );
@@ -1680,6 +1679,7 @@ int               ibuflen, *rbuflen;
         case EPERM:
         case EACCES:
             err = AFPERR_ACCESS;
+                       break;
         default:
             err = AFPERR_PARAM;
         }
@@ -1692,6 +1692,7 @@ int               ibuflen, *rbuflen;
         case EPERM:
         case EACCES:
             err = AFPERR_ACCESS;
+                       break;
         default:
             err = AFPERR_PARAM;
         }