diff options
Diffstat (limited to 'source4/ntvfs/posix/posix_eadb.c')
-rw-r--r-- | source4/ntvfs/posix/posix_eadb.c | 81 |
1 files changed, 43 insertions, 38 deletions
diff --git a/source4/ntvfs/posix/posix_eadb.c b/source4/ntvfs/posix/posix_eadb.c index 31c565c9c71..e08597c1c19 100644 --- a/source4/ntvfs/posix/posix_eadb.c +++ b/source4/ntvfs/posix/posix_eadb.c @@ -21,7 +21,9 @@ #include "includes.h" #include "lib/tdb_wrap/tdb_wrap.h" +#ifdef WITH_NTVFS_FILESERVER #include "vfs_posix.h" +#endif #include "posix_eadb.h" #define XATTR_LIST_ATTR ".xattr_list" @@ -143,17 +145,6 @@ NTSTATUS pull_xattr_blob_tdb_raw(struct tdb_wrap *ea_tdb, return NT_STATUS_OK; } -NTSTATUS pull_xattr_blob_tdb(struct pvfs_state *pvfs_state, - TALLOC_CTX *mem_ctx, - const char *attr_name, - const char *fname, - int fd, - size_t estimated_size, - DATA_BLOB *blob) -{ - return pull_xattr_blob_tdb_raw(pvfs_state->ea_db,mem_ctx,attr_name,fname,fd,estimated_size,blob); -} - /* push a xattr as a blob, using ea_tdb */ @@ -199,14 +190,6 @@ done: talloc_free(mem_ctx); return status; } -NTSTATUS push_xattr_blob_tdb(struct pvfs_state *pvfs_state, - const char *attr_name, - const char *fname, - int fd, - const DATA_BLOB *blob) -{ - return push_xattr_blob_tdb_raw(pvfs_state->ea_db, attr_name, fname, fd, blob); -} /* @@ -234,17 +217,6 @@ NTSTATUS delete_posix_eadb_raw(struct tdb_wrap *ea_tdb, const char *attr_name, /* - delete a xattr -*/ -NTSTATUS delete_posix_eadb(struct pvfs_state *pvfs_state, const char *attr_name, - const char *fname, int fd) -{ - return delete_posix_eadb_raw(pvfs_state->ea_db, - attr_name, fname, fd); -} - - -/* delete all xattrs for a file */ NTSTATUS unlink_posix_eadb_raw(struct tdb_wrap *ea_tdb, const char *fname, int fd) @@ -271,14 +243,6 @@ NTSTATUS unlink_posix_eadb_raw(struct tdb_wrap *ea_tdb, const char *fname, int f } /* - delete all xattrs for a file -*/ -NTSTATUS unlink_posix_eadb(struct pvfs_state *pvfs_state, const char *fname) -{ - return unlink_posix_eadb_raw(pvfs_state->ea_db, fname, -1); -} - -/* list all xattrs for a file */ NTSTATUS list_posix_eadb_raw(struct tdb_wrap *ea_tdb, TALLOC_CTX *mem_ctx, @@ -288,3 +252,44 @@ NTSTATUS list_posix_eadb_raw(struct tdb_wrap *ea_tdb, TALLOC_CTX *mem_ctx, return pull_xattr_blob_tdb_raw(ea_tdb, mem_ctx, XATTR_LIST_ATTR, fname, fd, 100, list); } + +#ifdef WITH_NTVFS_FILESERVER +NTSTATUS pull_xattr_blob_tdb(struct pvfs_state *pvfs_state, + TALLOC_CTX *mem_ctx, + const char *attr_name, + const char *fname, + int fd, + size_t estimated_size, + DATA_BLOB *blob) +{ + return pull_xattr_blob_tdb_raw(pvfs_state->ea_db,mem_ctx,attr_name,fname,fd,estimated_size,blob); +} + +NTSTATUS push_xattr_blob_tdb(struct pvfs_state *pvfs_state, + const char *attr_name, + const char *fname, + int fd, + const DATA_BLOB *blob) +{ + return push_xattr_blob_tdb_raw(pvfs_state->ea_db, attr_name, fname, fd, blob); +} + +/* + delete a xattr +*/ +NTSTATUS delete_posix_eadb(struct pvfs_state *pvfs_state, const char *attr_name, + const char *fname, int fd) +{ + return delete_posix_eadb_raw(pvfs_state->ea_db, + attr_name, fname, fd); +} + +/* + delete all xattrs for a file +*/ +NTSTATUS unlink_posix_eadb(struct pvfs_state *pvfs_state, const char *fname) +{ + return unlink_posix_eadb_raw(pvfs_state->ea_db, fname, -1); +} + +#endif |