summaryrefslogtreecommitdiff
path: root/source4/ntvfs/cifs_posix_cli
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-07-23 18:43:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:10:18 -0500
commit9c66f601f1520a99b9236c32bc9f03a33bd4b2aa (patch)
treebba8797304b7db98aa205c3cb04344072be00030 /source4/ntvfs/cifs_posix_cli
parent2dc38416b65177aca94b4de3c9cfcb5c8edb0df2 (diff)
downloadsamba-9c66f601f1520a99b9236c32bc9f03a33bd4b2aa.tar.gz
samba-9c66f601f1520a99b9236c32bc9f03a33bd4b2aa.tar.bz2
samba-9c66f601f1520a99b9236c32bc9f03a33bd4b2aa.zip
r17206: Add a modular API for share configuration.
Commit the classic backwards compatible module which is the default one (This used to be commit a89cc346b9296cb49929898d257a064a6c2bae86)
Diffstat (limited to 'source4/ntvfs/cifs_posix_cli')
-rw-r--r--source4/ntvfs/cifs_posix_cli/vfs_simple.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/ntvfs/cifs_posix_cli/vfs_simple.c b/source4/ntvfs/cifs_posix_cli/vfs_simple.c
index cf28a02806..eb62336d13 100644
--- a/source4/ntvfs/cifs_posix_cli/vfs_simple.c
+++ b/source4/ntvfs/cifs_posix_cli/vfs_simple.c
@@ -43,7 +43,7 @@
#define O_DIRECTORY 0
#endif
-#define CHECK_READ_ONLY(req) do { if (lp_readonly(ntvfs->ctx->config.snum)) return NT_STATUS_ACCESS_DENIED; } while (0)
+#define CHECK_READ_ONLY(req) do { if (share_bool_option(ntvfs->ctx->config, SHARE_READONLY, True)) return NT_STATUS_ACCESS_DENIED; } while (0)
/*
connect to a share - used when a tree_connect operation comes
@@ -56,12 +56,11 @@ static NTSTATUS svfs_connect(struct ntvfs_module_context *ntvfs,
{
struct stat st;
struct svfs_private *private;
- int snum = ntvfs->ctx->config.snum;
private = talloc(ntvfs, struct svfs_private);
private->next_search_handle = 0;
- private->connectpath = talloc_strdup(private, lp_pathname(snum));
+ private->connectpath = talloc_strdup(private, share_string_option(ntvfs->ctx->config, SHARE_PATH, ""));
private->open_files = NULL;
private->search = NULL;
@@ -317,7 +316,7 @@ static NTSTATUS svfs_open(struct ntvfs_module_context *ntvfs,
return ntvfs_map_open(ntvfs, req, io);
}
- readonly = lp_readonly(ntvfs->ctx->config.snum);
+ readonly = share_bool_option(ntvfs->ctx->config, SHARE_READONLY, True);
if (readonly) {
create_flags = 0;
rdwr_flags = O_RDONLY;
@@ -728,7 +727,7 @@ static NTSTATUS svfs_fsinfo(struct ntvfs_module_context *ntvfs,
fs->generic.out.quota_soft = 0;
fs->generic.out.quota_hard = 0;
fs->generic.out.quota_flags = 0;
- fs->generic.out.volume_name = talloc_strdup(req, lp_servicename(ntvfs->ctx->config.snum));
+ fs->generic.out.volume_name = talloc_strdup(req, ntvfs->ctx->config->name);
fs->generic.out.fs_type = ntvfs->ctx->fs_type;
return NT_STATUS_OK;