1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s4/torture: initialise ACE structs to zero

Because soon these structs will have more members, which are typically
going to be zero.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2023-08-22 14:12:46 +12:00 committed by Andrew Bartlett
parent 4a1848a1f5
commit 31dadff39a
4 changed files with 4 additions and 4 deletions

View File

@ -140,7 +140,7 @@ static bool test_sd(struct torture_context *tctx, struct smbcli_state *cli)
int fnum = -1; int fnum = -1;
union smb_fileinfo q; union smb_fileinfo q;
union smb_setfileinfo set; union smb_setfileinfo set;
struct security_ace ace; struct security_ace ace = {};
struct security_descriptor *sd; struct security_descriptor *sd;
struct dom_sid *test_sid; struct dom_sid *test_sid;

View File

@ -1901,7 +1901,7 @@ static bool test_stream_permissions(struct torture_context *tctx,
int fnum = -1; int fnum = -1;
union smb_fileinfo q; union smb_fileinfo q;
union smb_setfileinfo set; union smb_setfileinfo set;
struct security_ace ace; struct security_ace ace = {};
struct security_descriptor *sd; struct security_descriptor *sd;
torture_assert(tctx, torture_setup_dir(cli, BASEDIR), torture_assert(tctx, torture_setup_dir(cli, BASEDIR),

View File

@ -251,7 +251,7 @@ static bool test_samr_connect_user_acl(struct torture_context *tctx,
struct policy_handle uch; struct policy_handle uch;
struct samr_QuerySecurity qs; struct samr_QuerySecurity qs;
struct samr_SetSecurity ss; struct samr_SetSecurity ss;
struct security_ace ace; struct security_ace ace = {};
struct security_descriptor *sd; struct security_descriptor *sd;
struct sec_desc_buf sdb, *sdbuf = NULL; struct sec_desc_buf sdb, *sdbuf = NULL;
bool ret = true; bool ret = true;

View File

@ -2019,7 +2019,7 @@ static bool test_PrinterInfo_SDs(struct torture_context *tctx,
/* set modified sd level 3, query level 2 */ /* set modified sd level 3, query level 2 */
for (i=0; i < 93; i++) { for (i=0; i < 93; i++) {
struct security_ace a; struct security_ace a = {};
const char *sid_string = talloc_asprintf(tctx, "S-1-5-32-9999%i", i); const char *sid_string = talloc_asprintf(tctx, "S-1-5-32-9999%i", i);
a.type = SEC_ACE_TYPE_ACCESS_ALLOWED; a.type = SEC_ACE_TYPE_ACCESS_ALLOWED;
a.flags = 0; a.flags = 0;