Skip to content

Commit 49a5846

Browse files
author
Dan Lavu
committed
adding common sssd configuration for subids
1 parent 28bd25b commit 49a5846

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

sssd_test_framework/hosts/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def backup(self) -> Any:
120120
backup /etc/krb5.conf "$path/krb5.conf"
121121
backup /etc/krb5.keytab "$path/krb5.keytab"
122122
backup /etc/sssd "$path/config"
123+
backup /etc/authselect/nsswitch.conf "$path/nsswitch.conf"
123124
backup /var/log/sssd "$path/logs"
124125
backup /var/lib/sss "$path/lib"
125126
backup /home "$path/home"
@@ -162,6 +163,7 @@ def restore(self, backup_data: Any | None) -> None:
162163
restore "{backup_path}/krb5.conf" /etc/krb5.conf
163164
restore "{backup_path}/krb5.keytab" /etc/krb5.keytab
164165
restore "{backup_path}/config" /etc/sssd
166+
restore "{backup_path}/nsswitch.conf" /etc/authselect/nsswitch.conf
165167
restore "{backup_path}/logs" /var/log/sssd
166168
restore "{backup_path}/lib" /var/lib/sss
167169
cp --force --archive "{backup_path}/home/*" /home/ || :

sssd_test_framework/utils/sssd.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,3 +1081,9 @@ def socket_responders(self, responders: list[str] | None = None) -> None:
10811081
for responder in responders:
10821082
socket_unit = f"sssd-{responder}.socket"
10831083
self.sssd.svc.start(socket_unit)
1084+
1085+
def subid(self) -> None:
1086+
"""
1087+
Configure SSSD for subid.
1088+
"""
1089+
self.sssd.host.conn.run('echo "subid: sss" >> /etc/authselect/nsswitch.conf')

0 commit comments

Comments
 (0)