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_xattr.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_xattr.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_xattr.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_xattr.c b/source4/ntvfs/posix/pvfs_xattr.c index d5a7d17a31..269a2cc863 100644 --- a/source4/ntvfs/posix/pvfs_xattr.c +++ b/source4/ntvfs/posix/pvfs_xattr.c @@ -276,3 +276,40 @@ NTSTATUS pvfs_doseas_save(struct pvfs_state *pvfs, struct pvfs_filename *name, i return pvfs_xattr_ndr_save(pvfs, name->full_name, fd, XATTR_DOSEAS_NAME, eas, (ndr_push_flags_fn_t)ndr_push_xattr_DosEAs); } + + +/* + load the set of streams from extended attributes +*/ +NTSTATUS pvfs_streams_load(struct pvfs_state *pvfs, struct pvfs_filename *name, int fd, + struct xattr_DosStreams *streams) +{ + NTSTATUS status; + ZERO_STRUCTP(streams); + if (!(pvfs->flags & PVFS_FLAG_XATTR_ENABLE)) { + return NT_STATUS_OK; + } + status = pvfs_xattr_ndr_load(pvfs, streams, name->full_name, fd, + XATTR_DOSSTREAMS_NAME, + streams, + (ndr_pull_flags_fn_t)ndr_pull_xattr_DosStreams); + if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { + return NT_STATUS_OK; + } + return status; +} + +/* + save the set of streams into filesystem xattr +*/ +NTSTATUS pvfs_streams_save(struct pvfs_state *pvfs, struct pvfs_filename *name, int fd, + struct xattr_DosStreams *streams) +{ + if (!(pvfs->flags & PVFS_FLAG_XATTR_ENABLE)) { + return NT_STATUS_OK; + } + return pvfs_xattr_ndr_save(pvfs, name->full_name, fd, + XATTR_DOSSTREAMS_NAME, + streams, + (ndr_push_flags_fn_t)ndr_push_xattr_DosStreams); +} |