summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-05-02 03:20:47 +0000
committerJeremy Allison <jra@samba.org>2000-05-02 03:20:47 +0000
commitba020b0612ee975df15ceaf2eabf0cc3f208dc3e (patch)
treecaba9b545ebd4f9edf62da2da012481c119a957c /source3/smbd
parent693ffb8466ada58ecc59fde754ba79fc6f51528d (diff)
downloadsamba-ba020b0612ee975df15ceaf2eabf0cc3f208dc3e.tar.gz
samba-ba020b0612ee975df15ceaf2eabf0cc3f208dc3e.tar.bz2
samba-ba020b0612ee975df15ceaf2eabf0cc3f208dc3e.zip
Moved uglyness needed in fcntl locking (64->32 bit mapping, NFS
errors etc.) into locking/posix.c, where it is needed. fcntl_lock in lib/util.c is now very small and clean. Added (*lock) op to vfs layer. Jeremy. (This used to be commit 46092ee1410faa4e3c143d80a960a8adaa19d7fc)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/vfs-wrap.c5
-rw-r--r--source3/smbd/vfs.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c
index a3dd752023..5db1689450 100644
--- a/source3/smbd/vfs-wrap.c
+++ b/source3/smbd/vfs-wrap.c
@@ -305,3 +305,8 @@ int vfswrap_ftruncate(int fd, SMB_OFF_T offset)
result = sys_ftruncate(fd, offset);
return result;
}
+
+BOOL vfswrap_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
+{
+ return fcntl_lock(fd, op, offset, count,type);
+}
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index d76d64684b..895d84d51c 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -65,7 +65,8 @@ struct vfs_ops default_vfs_ops = {
vfswrap_unlink,
vfswrap_chmod,
vfswrap_utime,
- vfswrap_ftruncate
+ vfswrap_ftruncate,
+ vfswrap_lock
};
/****************************************************************************
@@ -210,7 +211,11 @@ BOOL vfs_init_custom(connection_struct *conn)
}
if (conn->vfs_ops.ftruncate == NULL) {
- conn->vfs_ops.ftruncate= default_vfs_ops.ftruncate;
+ conn->vfs_ops.ftruncate = default_vfs_ops.ftruncate;
+ }
+
+ if (conn->vfs_ops.lock == NULL) {
+ conn->vfs_ops.lock = default_vfs_ops.lock;
}
return True;