Skip to content

Commit

Permalink
s3: torture: Remove cmd_fchmod_acl().
Browse files Browse the repository at this point in the history
No longer needed.

Signed-off-by: Jeremy Allison <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
  • Loading branch information
jrasamba committed May 25, 2018
1 parent 55f013e commit a3d7544
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
1 change: 0 additions & 1 deletion docs-xml/manpages/vfstest.1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
<listitem><para><command>get_nt_acl</command> - VFS get_nt_acl()</para></listitem>
<listitem><para><command>fset_nt_acl</command> - VFS fset_nt_acl()</para></listitem>
<listitem><para><command>set_nt_acl</command> - VFS open() and fset_nt_acl()</para></listitem>
<listitem><para><command>fchmod_acl</command> - VFS fchmod_acl()</para></listitem>
<listitem><para><command>sys_acl_get_file</command> - VFS sys_acl_get_file()</para></listitem>
<listitem><para><command>sys_acl_get_fd</command> - VFS sys_acl_get_fd()</para></listitem>
<listitem><para><command>sys_acl_blob_get_file</command> - VFS sys_acl_blob_get_file()</para></listitem>
Expand Down
31 changes: 0 additions & 31 deletions source3/torture/cmd_vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,36 +930,6 @@ static NTSTATUS cmd_fchmod(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
return NT_STATUS_OK;
}

static NTSTATUS cmd_fchmod_acl(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
{
int fd;
mode_t mode;
if (argc != 3) {
printf("Usage: fchmod_acl <fd> <mode>\n");
return NT_STATUS_OK;
}

fd = atoi(argv[1]);
mode = atoi(argv[2]);
if (fd < 0 || fd >= 1024) {
printf("fchmod_acl: error=%d (file descriptor out of range)\n", EBADF);
return NT_STATUS_OK;
}
if (vfs->files[fd] == NULL) {
printf("fchmod_acl: error=%d (invalid file descriptor)\n", EBADF);
return NT_STATUS_OK;
}

if (SMB_VFS_FCHMOD_ACL(vfs->files[fd], mode) == -1) {
printf("fchmod_acl: error=%d (%s)\n", errno, strerror(errno));
return NT_STATUS_UNSUCCESSFUL;
}

printf("fchmod_acl: ok\n");
return NT_STATUS_OK;
}


static NTSTATUS cmd_chown(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
{
struct smb_filename *smb_fname = NULL;
Expand Down Expand Up @@ -2023,7 +1993,6 @@ struct cmd_set vfs_commands[] = {
"fset_nt_acl <fd>\n" },
{ "set_nt_acl", cmd_set_nt_acl, "VFS open() and fset_nt_acl()",
"set_nt_acl <file>\n" },
{ "fchmod_acl", cmd_fchmod_acl, "VFS fchmod_acl()", "fchmod_acl <fd> <mode>" },
{ "sys_acl_get_file", cmd_sys_acl_get_file, "VFS sys_acl_get_file()", "sys_acl_get_file <path>" },
{ "sys_acl_get_fd", cmd_sys_acl_get_fd, "VFS sys_acl_get_fd()", "sys_acl_get_fd <fd>" },
{ "sys_acl_blob_get_file", cmd_sys_acl_blob_get_file,
Expand Down

0 comments on commit a3d7544

Please sign in to comment.