From: Björn Baumbach Date: Fri, 23 Apr 2021 16:03:53 +0000 (+0200) Subject: samba-tool group listmembers: always list objects which can not expire X-Git-Tag: tevent-0.11.0~1034 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e2426e51576aae6211950b25aaacdd97815b111;p=thirdparty%2Fsamba.git samba-tool group listmembers: always list objects which can not expire Otherwise for example contacts wouldn't be listed when the --hide-expired option is used. Contacts typically do not have the accountExpires attribute. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14692 Signed-off-by: Björn Baumbach Reviewed-by: Rowland penny Autobuild-User(master): Björn Baumbach Autobuild-Date(master): Mon Apr 26 13:21:43 UTC 2021 on sn-devel-184 --- diff --git a/python/samba/netcmd/group.py b/python/samba/netcmd/group.py index a958db2c42c..3c8a9054339 100644 --- a/python/samba/netcmd/group.py +++ b/python/samba/netcmd/group.py @@ -544,8 +544,11 @@ samba-tool group listmembers \"Domain Users\" -H ldap://samba.samdom.example.com filter_expires = "" if hide_expired is True: current_nttime = samdb.get_nttime() - filter_expires = \ - "(|(accountExpires=0)(accountExpires>=%u))" % (current_nttime) + filter_expires = ("(|" + "(!(accountExpires=*))" + "(accountExpires=0)" + "(accountExpires>=%u)" + ")" % (current_nttime)) filter_disabled = "" if hide_disabled is True: diff --git a/selftest/knownfail.d/samba4.blackbox.group b/selftest/knownfail.d/samba4.blackbox.group deleted file mode 100644 index c236c8a63e1..00000000000 --- a/selftest/knownfail.d/samba4.blackbox.group +++ /dev/null @@ -1 +0,0 @@ -^samba4.blackbox.group.py