Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 709632
Collapse All | Expand All

(-)a/sys-auth/sssd/files/sssd-curl-macros.patch (-34 lines)
Lines 1-34 Link Here
1
From d3cdf9cbfbace4874c6e5c96f1e5ef5b342c813e Mon Sep 17 00:00:00 2001
2
From: Mikle Kolyada <zlogene@gentoo.org>
3
Date: Sun, 16 Dec 2018 20:42:39 +0300
4
Subject: [PATCH] tev_curl.c: remove case duplication
5
6
CURLE_SSL_CACERT and CURLE_PEER_FAILED_VERIFICATION macros are provided
7
by net-misc/curl-7.62.0 and older
8
---
9
 tev_curl.c | 3 ---
10
 1 file changed, 3 deletions(-)
11
12
diff --git a/tev_curl.c b/tev_curl.c
13
index 6a7a580..ce6fdba 100644
14
--- a/src/util/tev_curl.c
15
+++ b/src/util/tev_curl.c
16
@@ -97,7 +97,6 @@ static errno_t curl_code2errno(CURLcode crv)
17
         return ETIMEDOUT;
18
     case CURLE_SSL_ISSUER_ERROR:
19
     case CURLE_SSL_CACERT_BADFILE:
20
-    case CURLE_SSL_CACERT:
21
     case CURLE_SSL_CERTPROBLEM:
22
         return ERR_INVALID_CERT;
23
 
24
@@ -110,8 +109,6 @@ static errno_t curl_code2errno(CURLcode crv)
25
     case CURLE_SSL_ENGINE_NOTFOUND:
26
     case CURLE_SSL_CONNECT_ERROR:
27
         return ERR_SSL_FAILURE;
28
-    case CURLE_PEER_FAILED_VERIFICATION:
29
-        return ERR_UNABLE_TO_VERIFY_PEER;
30
     case CURLE_COULDNT_RESOLVE_HOST:
31
         return ERR_UNABLE_TO_RESOLVE_HOST;
32
     default:
33
-- 
34
2.19.2
(-)a/sys-auth/sssd/files/sssd-fix-CVE-2019-3811.patch (-96 lines)
Lines 1-96 Link Here
1
From 28792523a01a7d21bcc8931794164f253e691a68 Mon Sep 17 00:00:00 2001
2
From: Tomas Halman <thalman@redhat.com>
3
Date: Mon, 3 Dec 2018 14:11:31 +0100
4
Subject: [PATCH] nss: sssd returns '/' for emtpy home directories
5
6
For empty home directory in passwd file sssd returns "/". Sssd
7
should respect system behaviour and return the same as nsswitch
8
"files" module - return empty string.
9
10
Resolves:
11
https://pagure.io/SSSD/sssd/issue/3901
12
13
Reviewed-by: Simo Sorce <simo@redhat.com>
14
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
15
(cherry picked from commit 90f32399b4100ce39cf665649fde82d215e5eb49)
16
---
17
 src/confdb/confdb.c                      |  9 +++++++++
18
 src/man/include/ad_modified_defaults.xml | 19 +++++++++++++++++++
19
 src/responder/nss/nss_protocol_pwent.c   |  2 +-
20
 src/tests/intg/test_files_provider.py    |  2 +-
21
 4 files changed, 30 insertions(+), 2 deletions(-)
22
23
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
24
index a3eb9c66d9..17bb4f8274 100644
25
--- a/src/confdb/confdb.c
26
+++ b/src/confdb/confdb.c
27
@@ -1301,6 +1301,15 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
28
             ret = ENOMEM;
29
             goto done;
30
         }
31
+    } else {
32
+        if (strcasecmp(domain->provider, "ad") == 0) {
33
+            /* ad provider default */
34
+            domain->fallback_homedir = talloc_strdup(domain, "/home/%d/%u");
35
+            if (!domain->fallback_homedir) {
36
+                ret = ENOMEM;
37
+                goto done;
38
+            }
39
+        }
40
     }
41
 
42
     tmp = ldb_msg_find_attr_as_string(res->msgs[0],
43
diff --git a/src/man/include/ad_modified_defaults.xml b/src/man/include/ad_modified_defaults.xml
44
index 818a2bf787..425b7e8ee0 100644
45
--- a/src/man/include/ad_modified_defaults.xml
46
+++ b/src/man/include/ad_modified_defaults.xml
47
@@ -76,4 +76,23 @@
48
             </listitem>
49
         </itemizedlist>
50
     </refsect2>
51
+    <refsect2 id='nss_modifications'>
52
+        <title>NSS configuration</title>
53
+        <itemizedlist>
54
+            <listitem>
55
+                <para>
56
+                    fallback_homedir = /home/%d/%u
57
+                </para>
58
+                <para>
59
+                    The AD provider automatically sets
60
+                    "fallback_homedir = /home/%d/%u" to provide personal
61
+                    home directories for users without the homeDirectory
62
+                    attribute. If your AD Domain is properly
63
+                    populated with Posix attributes, and you want to avoid
64
+                    this fallback behavior, you can explicitly
65
+                    set "fallback_homedir = %o".
66
+                </para>
67
+            </listitem>
68
+        </itemizedlist>
69
+    </refsect2>
70
 </refsect1>
71
diff --git a/src/responder/nss/nss_protocol_pwent.c b/src/responder/nss/nss_protocol_pwent.c
72
index af9e74fc86..86fa4ec465 100644
73
--- a/src/responder/nss/nss_protocol_pwent.c
74
+++ b/src/responder/nss/nss_protocol_pwent.c
75
@@ -118,7 +118,7 @@ nss_get_homedir(TALLOC_CTX *mem_ctx,
76
 
77
     homedir = nss_get_homedir_override(mem_ctx, msg, nss_ctx, domain, &hd_ctx);
78
     if (homedir == NULL) {
79
-        return "/";
80
+        return "";
81
     }
82
 
83
     return homedir;
84
diff --git a/src/tests/intg/test_files_provider.py b/src/tests/intg/test_files_provider.py
85
index ead1cc4c34..4761f1bd15 100644
86
--- a/src/tests/intg/test_files_provider.py
87
+++ b/src/tests/intg/test_files_provider.py
88
@@ -678,7 +678,7 @@ def test_user_no_dir(setup_pw_with_canary, files_domain_only):
89
     Test that resolving a user without a homedir defined works and returns
90
     a fallback value
91
     """
92
-    check_user(incomplete_user_setup(setup_pw_with_canary, 'dir', '/'))
93
+    check_user(incomplete_user_setup(setup_pw_with_canary, 'dir', ''))
94
 
95
 
96
 def test_user_no_gecos(setup_pw_with_canary, files_domain_only):
(-)a/sys-auth/sssd/sssd-1.16.3-r3.ebuild (-4 lines)
Lines 85-93 src_prepare() { Link Here
85
	sed -i 's:#!/sbin/runscript:#!/sbin/openrc-run:' \
85
	sed -i 's:#!/sbin/runscript:#!/sbin/openrc-run:' \
86
		"${S}"/src/sysv/gentoo/sssd.in || die "sed sssd.in"
86
		"${S}"/src/sysv/gentoo/sssd.in || die "sed sssd.in"
87
87
88
	eapply "${FILESDIR}"/${PN}-curl-macros.patch
89
	eapply "${FILESDIR}"/${PN}-fix-CVE-2019-3811.patch
90
91
	default
88
	default
92
	eautoreconf
89
	eautoreconf
93
	multilib_copy_sources
90
	multilib_copy_sources
94
- 

Return to bug 709632