[PATCH] s4/torture/rpc/samsync.c: remove duplicate code

Aurélien Aptel aaptel at suse.com
Thu Mar 3 16:41:57 UTC 2016


Hi,

Another PVS fix

There is a redundant check in s4/torture/rpc/samsync.c

I suspected the extra check can be removed because I don't see any other
existing XXX_TRUST_ACCOUNT in all of the NT_STATUS defines besides the
ones already checked in the code. But maybe the original writer wanted
to test for something unrelated and left the copy-pasted version untouched...

} else if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT)) {
	if (user->acct_flags & ACB_DOMTRUST) {
		return true;
	}
} else if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT)) {
	if (user->acct_flags & ACB_DOMTRUST) {
		return true;
	}
}

Attached patch just removes the extra check.

Let me know what you think.

Thanks!

-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG
Nürnberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-s4-torture-rpc-samsync.c-remove-duplicate-test.patch
Type: text/x-patch
Size: 980 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160303/8395584c/0009-s4-torture-rpc-samsync.c-remove-duplicate-test.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160303/8395584c/attachment.sig>


More information about the samba-technical mailing list