]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool group listmembers: always list objects which can not expire
authorBjörn Baumbach <bb@sernet.de>
Fri, 23 Apr 2021 16:03:53 +0000 (18:03 +0200)
committerBjörn Baumbach <bb@sernet.de>
Mon, 26 Apr 2021 13:21:43 +0000 (13:21 +0000)
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 <bb@sernet.de>
Reviewed-by: Rowland penny <rpenny@samba.org>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Mon Apr 26 13:21:43 UTC 2021 on sn-devel-184

python/samba/netcmd/group.py
selftest/knownfail.d/samba4.blackbox.group [deleted file]

index a958db2c42c360323813f7d9a5777e36d8b99f4d..3c8a9054339e0c32b07a0a3ce6515132dcc95b23 100644 (file)
@@ -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 (file)
index c236c8a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba4.blackbox.group.py