sssd/0017-TESTS-Allow-storing-e-mail-address-for-users.patch
Fabiano Fidêncio 68ef824a5f Resolves: upstream#3766 - CVE-2018-10852: information leak from the sssd-sudo responder
And also ...

- Related: upstream#941 - return multiple server addresses to the Kerberos
                          locator plugin
- Related: upstream#3652 - kdcinfo doesn't get populated for other domains
- Resolves: upstream#3747 - sss_ssh_authorizedkeys exits abruptly if SSHD
                            closes its end of the pipe before reading all the
                            SSH keys
- Resolves: upstream#3607 - Handle conflicting e-mail addresses more gracefully
- Resolves: upstream#3754 - SSSD AD uses LDAP filter to detect POSIX attributes
                            stored in AD GC also for regular AD DC queries
- Related: upstream#3219 - [RFE] Regular expression used in sssd.conf not being
                           able to consume an @-sign in the user/group name.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-06-25 09:38:16 +02:00

66 lines
2.2 KiB
Diff

From 75710952e74ea6070a53baaf5ea4e80507cdc26c Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Thu, 21 Jun 2018 12:37:42 +0200
Subject: [PATCH] TESTS: Allow storing e-mail address for users
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This would allow adding tests for by-e-mail lookups later
Related:
https://pagure.io/SSSD/sssd/issue/3607
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
(cherry picked from commit d057eb2e20a19ce975dc2202f7c0e9f204eb9510)
---
src/tests/intg/ldap_ent.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/tests/intg/ldap_ent.py b/src/tests/intg/ldap_ent.py
index a4c987969d3dcefba2af69e095b220180e0fa54c..1f23e3ab7a7ee62909babb8338379a5f2d4e37f2 100644
--- a/src/tests/intg/ldap_ent.py
+++ b/src/tests/intg/ldap_ent.py
@@ -25,7 +25,8 @@ def user(base_dn, uid, uidNumber, gidNumber,
loginShell=None,
cn=None,
sn=None,
- sshPubKey=()):
+ sshPubKey=(),
+ mail=None):
"""
Generate an RFC2307(bis) user add-modlist for passing to ldap.add*
"""
@@ -56,6 +57,8 @@ def user(base_dn, uid, uidNumber, gidNumber,
if len(sshPubKey) > 0:
pubkeys = [key.encode('utf-8') for key in sshPubKey]
user[1].append(('sshPublicKey', pubkeys))
+ if mail is not None:
+ user[1].append(('mail', [mail.encode('utf-8')]))
return user
@@ -124,7 +127,8 @@ class List(list):
loginShell=None,
cn=None,
sn=None,
- sshPubKey=()):
+ sshPubKey=(),
+ mail=None):
"""Add an RFC2307(bis) user add-modlist."""
self.append(user(base_dn or self.base_dn,
uid, uidNumber, gidNumber,
@@ -134,7 +138,8 @@ class List(list):
loginShell=loginShell,
cn=cn,
sn=sn,
- sshPubKey=sshPubKey))
+ sshPubKey=sshPubKey,
+ mail=mail))
def add_group(self, cn, gidNumber, member_uids=[],
base_dn=None):
--
2.17.1