summaryrefslogtreecommitdiffstats
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-27 09:29:36 +0100
committerAndrew Bartlett <abartlet@samba.org>2014-04-02 09:03:44 +0200
commit0053603283e032834c99ef78e2471515c14c48be (patch)
treee8cc4804fa6a16183e1dd27bff3b97fac43e2861 /source4/ntvfs
parent1ac4fba4bf03ba4e3db3bc1064716a31ace3ddec (diff)
downloadsamba-0053603283e032834c99ef78e2471515c14c48be.tar.gz
samba-0053603283e032834c99ef78e2471515c14c48be.tar.xz
samba-0053603283e032834c99ef78e2471515c14c48be.zip
s4:ntvfs/posix: avoid const warnings in pvfs_resolve_name_handle()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index 837ea174d62..12fc0c1110b 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -694,7 +694,7 @@ NTSTATUS pvfs_resolve_name_handle(struct pvfs_state *pvfs,
if (h->have_opendb_entry) {
struct odb_lock *lck;
- char *name = NULL;
+ const char *name = NULL;
lck = odb_lock(h, h->pvfs->odb_context, &h->odb_locking_key);
if (lck == NULL) {
@@ -705,7 +705,7 @@ NTSTATUS pvfs_resolve_name_handle(struct pvfs_state *pvfs,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- status = odb_get_path(lck, (const char **) &name);
+ status = odb_get_path(lck, &name);
if (NT_STATUS_IS_OK(status)) {
/*
* This relies an the fact that
@@ -719,6 +719,7 @@ NTSTATUS pvfs_resolve_name_handle(struct pvfs_state *pvfs,
const char *new_file;
char *new_orig;
char *delim;
+ char *full_name = discard_const_p(char, name);
delim = strrchr(name, '/');
if (!delim) {
@@ -747,7 +748,7 @@ NTSTATUS pvfs_resolve_name_handle(struct pvfs_state *pvfs,
talloc_free(h->name->original_name);
talloc_free(h->name->full_name);
- h->name->full_name = talloc_steal(h->name, name);
+ h->name->full_name = talloc_steal(h->name, full_name);
h->name->original_name = new_orig;
}
}