diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-15 06:57:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:50 -0500 |
commit | 187412f3da4fbc6feeca15bd0c2527534255964e (patch) | |
tree | bd09f3cab5515bd89233a509d2a42238894f24eb /source4/ntvfs/posix/pvfs_open.c | |
parent | 4719461a07a5494f01b4295e6f9e0479ea8e96a0 (diff) | |
download | samba-187412f3da4fbc6feeca15bd0c2527534255964e.tar.gz samba-187412f3da4fbc6feeca15bd0c2527534255964e.tar.bz2 samba-187412f3da4fbc6feeca15bd0c2527534255964e.zip |
r3747: - added some of the infrastructure needed for streams support in pvfs
(the IDL, and the load/save meta-data logic)
- changed pvfs_resolve_name() to default to non-wildcard, needing
PVFS_RESOLVE_WILDCARD to enable wildcards. Most callers don't want
wildcards, so defaulting this way makes more sense.
- fixed deletion of EAs
(This used to be commit e7afd4403cc1b7e0928776929f8988aa6f15640b)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_open.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 9bb3487679..4f089a8c07 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -103,6 +103,10 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs, NTSTATUS status; uint32_t create_action; + if (name->stream_name) { + return NT_STATUS_OBJECT_NAME_INVALID; + } + /* if the client says it must be a directory, and it isn't, then fail */ if (name->exists && !(name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY)) { @@ -180,8 +184,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs, if (mkdir(name->full_name, mode) == -1) { return pvfs_map_errno(pvfs,errno); } - status = pvfs_resolve_name(pvfs, req, io->ntcreatex.in.fname, - PVFS_RESOLVE_NO_WILDCARD, &name); + status = pvfs_resolve_name(pvfs, req, io->ntcreatex.in.fname, 0, &name); if (!NT_STATUS_IS_OK(status)) { return status; } @@ -684,8 +687,7 @@ static NTSTATUS pvfs_open_t2open(struct ntvfs_module_context *ntvfs, struct pvfs_filename *name; NTSTATUS status; - status = pvfs_resolve_name(pvfs, req, io->t2open.in.fname, - PVFS_RESOLVE_NO_WILDCARD, &name); + status = pvfs_resolve_name(pvfs, req, io->t2open.in.fname, 0, &name); if (!NT_STATUS_IS_OK(status)) { return status; } @@ -735,8 +737,8 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, } /* resolve the cifs name to a posix name */ - status = pvfs_resolve_name(pvfs, req, io->ntcreatex.in.fname, - PVFS_RESOLVE_NO_WILDCARD, &name); + status = pvfs_resolve_name(pvfs, req, io->ntcreatex.in.fname, + PVFS_RESOLVE_STREAMS, &name); if (!NT_STATUS_IS_OK(status)) { return status; } @@ -826,8 +828,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, } /* try re-resolving the name */ - status = pvfs_resolve_name(pvfs, req, io->ntcreatex.in.fname, - PVFS_RESOLVE_NO_WILDCARD, &name); + status = pvfs_resolve_name(pvfs, req, io->ntcreatex.in.fname, 0, &name); if (!NT_STATUS_IS_OK(status)) { return status; } |