diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-17 02:55:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:57 -0500 |
commit | fef617c31bd4a8be09449d6bc726c729ae758423 (patch) | |
tree | 4951f62b04442e046f786b88e76dc48aac901e3f /source4/ntvfs/posix/vfs_posix.c | |
parent | f6da6a10de7d7f101f6485f4a34ef4ef5b6ab6c0 (diff) | |
download | samba-fef617c31bd4a8be09449d6bc726c729ae758423.tar.gz samba-fef617c31bd4a8be09449d6bc726c729ae758423.tar.bz2 samba-fef617c31bd4a8be09449d6bc726c729ae758423.zip |
r3012: added initial support for byte range locking in the posix vfs. This is
enough for us to pass locktest, but does not yet support lock timeouts
and some of the other esoteric features.
(This used to be commit 58a92abd88f190bc60894a68e0528e95ae33fe39)
Diffstat (limited to 'source4/ntvfs/posix/vfs_posix.c')
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index a17b90e369..5e7a605c9f 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -35,11 +35,12 @@ static void pvfs_setup_options(struct pvfs_state *pvfs) { int snum = pvfs->tcon->service; - if (lp_map_hidden(snum)) pvfs->flags |= PVFS_FLAG_MAP_HIDDEN; - if (lp_map_archive(snum)) pvfs->flags |= PVFS_FLAG_MAP_ARCHIVE; - if (lp_map_system(snum)) pvfs->flags |= PVFS_FLAG_MAP_SYSTEM; - if (lp_readonly(snum)) pvfs->flags |= PVFS_FLAG_READONLY; - if (lp_strict_sync(snum)) pvfs->flags |= PVFS_FLAG_STRICT_SYNC; + if (lp_map_hidden(snum)) pvfs->flags |= PVFS_FLAG_MAP_HIDDEN; + if (lp_map_archive(snum)) pvfs->flags |= PVFS_FLAG_MAP_ARCHIVE; + if (lp_map_system(snum)) pvfs->flags |= PVFS_FLAG_MAP_SYSTEM; + if (lp_readonly(snum)) pvfs->flags |= PVFS_FLAG_READONLY; + if (lp_strict_sync(snum)) pvfs->flags |= PVFS_FLAG_STRICT_SYNC; + if (lp_strict_locking(snum)) pvfs->flags |= PVFS_FLAG_STRICT_LOCKING; pvfs->share_name = talloc_strdup(pvfs, lp_servicename(snum)); } @@ -86,6 +87,13 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs, ntvfs->private_data = pvfs; + pvfs->brl_context = brl_init(pvfs, + pvfs->tcon->smb_conn->connection->server_id, + pvfs->tcon->service); + if (pvfs->brl_context == NULL) { + return NT_STATUS_INTERNAL_DB_CORRUPTION; + } + status = pvfs_mangle_init(pvfs); if (!NT_STATUS_IS_OK(status)) { return status; @@ -162,16 +170,6 @@ static NTSTATUS pvfs_seek(struct ntvfs_module_context *ntvfs, } /* - lock a byte range -*/ -static NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_lock *lck) -{ - DEBUG(0,("pvfs_lock not implemented\n")); - return NT_STATUS_NOT_IMPLEMENTED; -} - -/* set info on a pathname */ static NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs, |