diff options
| author | Pavel Filipenský <pfilipen@redhat.com> | 2022-05-23 13:10:31 +0200 |
|---|---|---|
| committer | Jeremy Allison <jra@samba.org> | 2022-05-23 18:25:28 +0000 |
| commit | 02a9a160e2d6d14b6dc04dcda1a136484f5edd95 (patch) | |
| tree | b4eceb66ea06a553151b10a46729399be87bfe6d /python | |
| parent | 3bb6b05781fa79de697d859d18c4fc252831fdef (diff) | |
| download | samba-02a9a160e2d6d14b6dc04dcda1a136484f5edd95.tar.gz samba-02a9a160e2d6d14b6dc04dcda1a136484f5edd95.tar.bz2 samba-02a9a160e2d6d14b6dc04dcda1a136484f5edd95.zip | |
python/gp_cert_auto_enroll: Fix bitwise test in expression
Found by covscan.
result_independent_of_operands: "(e.data & 4) == 1" is always false regardless of the values of its operands. This occurs as the operand of assignment.
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/gp_cert_auto_enroll_ext.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/samba/gp_cert_auto_enroll_ext.py b/python/samba/gp_cert_auto_enroll_ext.py index 680525c9ced..585dc560550 100644 --- a/python/samba/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp_cert_auto_enroll_ext.py @@ -358,9 +358,9 @@ class gp_cert_auto_enroll_ext(gp_pol_ext): # This policy applies as specified in [MS-CAESO] 4.4.5.1 if e.data == 0x8000: continue # The policy is disabled - enroll = e.data & 0x1 == 1 - manage = e.data & 0x2 == 1 - retrive_pending = e.data & 0x4 == 1 + enroll = e.data & 0x1 == 0x1 + manage = e.data & 0x2 == 0x2 + retrive_pending = e.data & 0x4 == 0x4 if enroll: self.__enroll(pol_conf.entries, trust_dir, private_dir) |
