src/server/daemon/vfs.c

changeset 171
af7e2d80dee6
parent 105
63d9051fe35c
child 193
aa8393527b1e
--- a/src/server/daemon/vfs.c	Sat Feb 04 10:06:25 2017 +0100
+++ b/src/server/daemon/vfs.c	Tue Feb 14 12:56:23 2017 +0100
@@ -32,10 +32,10 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
-
 #include <ucx/map.h>
 
 #include "../util/pool.h"
+#include "netsite.h"
 #include "acl.h"
 #include "vfs.h"
 
@@ -146,7 +146,7 @@
     if(((oflags & O_CREAT) == O_CREAT) && sysacl.user_uid != -1) {
         if(fchown(fd, sysacl.user_uid, sysacl.user_gid)) {
             perror("vfs_open: fchown");
-            close(fd);
+            system_close(fd);
             return NULL;
         }
     }
@@ -155,7 +155,7 @@
     VFSFile *file = pool ?
             pool_malloc(pool, sizeof(VFSFile)) : malloc(sizeof(VFSFile));
     if(!file) {
-        close(fd);
+        system_close(fd);
         return NULL;
     }
     file->ctx = ctx;
@@ -487,7 +487,7 @@
 }
 
 void sys_file_close(SYS_FILE fd) {
-    close(fd->fd);
+    system_close(fd->fd);
 }
 
 int sys_dir_read(VFS_DIR dir, VFS_ENTRY *entry, int getstat) {

mercurial