[PATCH 11/14] s3-torture: Make sure status is used initialized.
Andreas Schneider
asn at samba.org
Wed Dec 4 06:01:57 MST 2013
Signed-off-by: Andreas Schneider <asn at samba.org>
---
source3/torture/cmd_vfs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index f923ed5..658cb49 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -1489,6 +1489,7 @@ static NTSTATUS cmd_set_nt_acl(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int a
return NT_STATUS_UNSUCCESSFUL;
}
+ status = NT_STATUS_OK;
ret = SMB_VFS_FSTAT(fsp, &smb_fname->st);
if (ret == -1) {
/* If we have an fd, this stat should succeed. */
@@ -1564,6 +1565,7 @@ static NTSTATUS cmd_sys_acl_get_fd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
+ status = NT_STATUS_OK;
acl = SMB_VFS_SYS_ACL_GET_FD(vfs->files[fd], talloc_tos());
if (!acl) {
printf("sys_acl_get_fd failed (%s)\n", strerror(errno));
@@ -1579,7 +1581,6 @@ static NTSTATUS cmd_sys_acl_get_fd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
static NTSTATUS cmd_sys_acl_get_file(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
- NTSTATUS status;
SMB_ACL_T acl;
char *acl_text;
int type;
@@ -1592,7 +1593,7 @@ static NTSTATUS cmd_sys_acl_get_file(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
acl = SMB_VFS_SYS_ACL_GET_FILE(vfs->conn, argv[1], type, talloc_tos());
if (!acl) {
printf("sys_acl_get_file failed (%s)\n", strerror(errno));
- return status;
+ return NT_STATUS_UNSUCCESSFUL;
}
acl_text = sys_acl_to_text(acl, NULL);
printf("%s", acl_text);
--
1.8.5
More information about the samba-technical
mailing list