-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The SSSD group listings breaks the present implementation by parsing the domain group as the file-size. Resolves: #3395 Signed-off-by: Sachin Patil <[email protected]>
- Loading branch information
Sachin Patil
committed
May 10, 2022
1 parent
57a3cd8
commit 438b570
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,6 +168,14 @@ | |
adsf | ||
""" | ||
|
||
SSSD_LISTINGS = """ | ||
/var/log: | ||
total 20 | ||
-rw-r--r--. 1 root domain [email protected] 36548 Jan 13 10:43 Xorg.1.log | ||
-rw-r--r--. 1 root domain [email protected] 28245 Jan 13 10:38 Xorg.1.log.old | ||
-rw-------. 1 root root 52756 Jun 28 10:26 X.log | ||
""" | ||
|
||
|
||
def test_parse_selinux(): | ||
results = parse(SELINUX_DIRECTORY.splitlines(), "/boot") | ||
|
@@ -312,3 +320,10 @@ def test_rhel8_selinux(): | |
assert res["date"] == "Apr 8 16:41" | ||
assert res["name"] == "abcd-efgh-ijkl-mnop" | ||
assert res["dir"] == "/var/lib/nova/instances" | ||
|
||
|
||
def test_sssd_listing(): | ||
results = parse(SSSD_LISTINGS.splitlines(), "/var/log") | ||
assert len(results) == 1 | ||
assert results["/var/log"]["entries"]['Xorg.1.log']['group'] == "domain [email protected]" | ||
assert len(results["/var/log"]["entries"]) == 3 |