Blob Blame History Raw
From ac8bc2cbea5081f1f0a9395fbaf76616fe5b6fb9 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Mon, 20 Jun 2016 13:37:56 +0200
Subject: [PATCH 54/62] NSS: add user email to fill_orig()

The IPA server must send the email address of a user to the clients to
allow login by email.

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 91767924bdf9b5a28e8902206a40348d6c83a139)
---
 src/db/sysdb.h                 | 1 +
 src/responder/nss/nsssrv_cmd.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index c2f58ccb97c37d93391e72ee2d77835283a6c12f..8713efa6e8fcc6fb620340fe152989a5dae58434 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -220,6 +220,7 @@
                         SYSDB_SID_STR, \
                         SYSDB_UPN, \
                         SYSDB_USER_CERT, \
+                        SYSDB_USER_EMAIL, \
                         SYSDB_OVERRIDE_DN, \
                         SYSDB_OVERRIDE_OBJECT_DN, \
                         SYSDB_DEFAULT_OVERRIDE_NAME, \
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 4e84b3202cbf367e70a47a3c7edb06e357657538..77e540d8da969614e4ab40c62e6ae1f271962f31 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -4421,6 +4421,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
                                    SYSDB_AD_USER_ACCOUNT_CONTROL,
                                    SYSDB_SSH_PUBKEY,
                                    SYSDB_USER_CERT,
+                                   SYSDB_USER_EMAIL,
                                    SYSDB_ORIG_DN,
                                    SYSDB_ORIG_MEMBEROF,
                                    SYSDB_DEFAULT_ATTRS, NULL};
@@ -4977,6 +4978,7 @@ static errno_t fill_orig(struct sss_packet *packet,
                                     SYSDB_AD_USER_ACCOUNT_CONTROL,
                                     SYSDB_SSH_PUBKEY,
                                     SYSDB_USER_CERT,
+                                    SYSDB_USER_EMAIL,
                                     SYSDB_ORIG_DN,
                                     SYSDB_ORIG_MEMBEROF,
                                     NULL};
-- 
2.4.11