From b1a544fc80d22050415ec5749ce5c5936772ecd8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 2 Feb 2012 19:41:56 +0100 Subject: s3-vfstest: Add removexattr --- source3/torture/cmd_vfs.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source3') diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index 9e1c62db10..8447bec0aa 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -1253,6 +1253,25 @@ static NTSTATUS cmd_setxattr(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } +static NTSTATUS cmd_removexattr(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, + int argc, const char **argv) +{ + ssize_t ret; + + if (argc != 3) { + printf("Usage: removexattr \n"); + return NT_STATUS_OK; + } + + ret = SMB_VFS_REMOVEXATTR(vfs->conn, argv[1], argv[2]); + if (ret == -1) { + int err = errno; + printf("removexattr returned (%s)\n", strerror(err)); + return map_nt_error_from_unix(err); + } + return NT_STATUS_OK; +} + struct cmd_set vfs_commands[] = { { "VFS Commands" }, @@ -1299,5 +1318,7 @@ struct cmd_set vfs_commands[] = { "listxattr " }, { "setxattr", cmd_setxattr, "VFS setxattr()", "setxattr []" }, + { "removexattr", cmd_removexattr, "VFS removexattr()", + "removexattr \n" }, { NULL } }; -- cgit