summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-02-02 19:41:56 +0100
committerVolker Lendecke <vl@samba.org>2012-02-02 20:35:27 +0100
commitb1a544fc80d22050415ec5749ce5c5936772ecd8 (patch)
tree5e513827a71991263f3e661ce76261d9c095518f /source3/torture
parentdbe9ff29996287e6b91b69cd56d61e0a83f551a7 (diff)
downloadsamba-b1a544fc80d22050415ec5749ce5c5936772ecd8.tar.gz
samba-b1a544fc80d22050415ec5749ce5c5936772ecd8.tar.bz2
samba-b1a544fc80d22050415ec5749ce5c5936772ecd8.zip
s3-vfstest: Add removexattr
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/cmd_vfs.c21
1 files changed, 21 insertions, 0 deletions
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 <path> <xattr>\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 <path>" },
{ "setxattr", cmd_setxattr, "VFS setxattr()",
"setxattr <path> <name> <value> [<flags>]" },
+ { "removexattr", cmd_removexattr, "VFS removexattr()",
+ "removexattr <path> <name>\n" },
{ NULL }
};