summaryrefslogtreecommitdiff
path: root/source3/locking/posix.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-07-23 20:28:58 -0400
committerVolker Lendecke <vl@samba.org>2009-07-24 11:42:05 -0400
commit033185e2a1b2892fe8dc74a18a38e5e13e08cb22 (patch)
tree67f652f7c4caba015eb3ad7b5ad7d0f6ed56cc8d /source3/locking/posix.c
parentbe5cf236968658263b0be5e1e4742741c70f65f8 (diff)
downloadsamba-033185e2a1b2892fe8dc74a18a38e5e13e08cb22.tar.gz
samba-033185e2a1b2892fe8dc74a18a38e5e13e08cb22.tar.bz2
samba-033185e2a1b2892fe8dc74a18a38e5e13e08cb22.zip
Make the smbd VFS typesafe
Diffstat (limited to 'source3/locking/posix.c')
-rw-r--r--source3/locking/posix.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 33ffaf95ca..17945399c5 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -177,6 +177,14 @@ static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out,
return True;
}
+bool smb_vfs_call_lock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, int op, SMB_OFF_T offset,
+ SMB_OFF_T count, int type)
+{
+ VFS_FIND(lock);
+ return handle->fns->lock(handle, fsp, op, offset, count, type);
+}
+
/****************************************************************************
Actual function that does POSIX locks. Copes with 64 -> 32 bit cruft and
broken NFS implementations.
@@ -220,6 +228,14 @@ static bool posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OF
return ret;
}
+bool smb_vfs_call_getlock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_OFF_T *poffset,
+ SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
+{
+ VFS_FIND(getlock);
+ return handle->fns->getlock(handle, fsp, poffset, pcount, ptype, ppid);
+}
+
/****************************************************************************
Actual function that gets POSIX locks. Copes with 64 -> 32 bit cruft and
broken NFS implementations.