summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_unlink.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-10 20:49:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:56:57 -0500
commit307e43bb5628e8b53a930c2928279af994281ba5 (patch)
tree68fa41cf4e697ae94b23cedab5eb7013932fc88d /source4/ntvfs/posix/pvfs_unlink.c
parent2b3767b1fe7744f0412531e1522e1d5af5dc39c6 (diff)
downloadsamba-307e43bb5628e8b53a930c2928279af994281ba5.tar.gz
samba-307e43bb5628e8b53a930c2928279af994281ba5.tar.bz2
samba-307e43bb5628e8b53a930c2928279af994281ba5.zip
r14173: change smb interface structures to always use
a union smb_file, to abtract - const char *path fot qpathinfo and setpathinfo - uint16_t fnum for SMB - smb2_handle handle for SMB2 the idea is to later add a struct ntvfs_handle *ntvfs so that the ntvfs subsystem don't need to know the difference between SMB and SMB2 metze (This used to be commit 2ef3f5970901b5accdb50f0d0115b5d46b0c788f)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_unlink.c')
-rw-r--r--source4/ntvfs/posix/pvfs_unlink.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/ntvfs/posix/pvfs_unlink.c b/source4/ntvfs/posix/pvfs_unlink.c
index ee90adba45..76c9bc10a4 100644
--- a/source4/ntvfs/posix/pvfs_unlink.c
+++ b/source4/ntvfs/posix/pvfs_unlink.c
@@ -113,7 +113,8 @@ static NTSTATUS pvfs_unlink_one(struct pvfs_state *pvfs,
The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
*/
NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
- struct ntvfs_request *req, struct smb_unlink *unl)
+ struct ntvfs_request *req,
+ union smb_unlink *unl)
{
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_dir *dir;
@@ -124,7 +125,7 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
uint_t ofs;
/* resolve the cifs name to a posix name */
- status = pvfs_resolve_name(pvfs, req, unl->in.pattern,
+ status = pvfs_resolve_name(pvfs, req, unl->unlink.in.pattern,
PVFS_RESOLVE_WILDCARD | PVFS_RESOLVE_STREAMS, &name);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -140,7 +141,7 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
}
if (name->stream_name) {
- return pvfs_unlink_stream(pvfs, req, name, unl->in.attrib);
+ return pvfs_unlink_stream(pvfs, req, name, unl->unlink.in.attrib);
}
/* get list of matching files */
@@ -155,13 +156,13 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
while ((fname = pvfs_list_next(dir, &ofs))) {
/* this seems to be a special case */
- if ((unl->in.attrib & FILE_ATTRIBUTE_DIRECTORY) &&
+ if ((unl->unlink.in.attrib & FILE_ATTRIBUTE_DIRECTORY) &&
(strcmp(fname, ".") == 0 ||
strcmp(fname, "..") == 0)) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
- status = pvfs_unlink_one(pvfs, req, pvfs_list_unix_path(dir), fname, unl->in.attrib);
+ status = pvfs_unlink_one(pvfs, req, pvfs_list_unix_path(dir), fname, unl->unlink.in.attrib);
if (NT_STATUS_IS_OK(status)) {
total_deleted++;
}