diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0005-basic-user-util-properly-protect-use-of-gshadow.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0005-basic-user-util-properly-protect-use-of-gshadow.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0005-basic-user-util-properly-protect-use-of-gshadow.patch b/meta/recipes-core/systemd/systemd/0005-basic-user-util-properly-protect-use-of-gshadow.patch new file mode 100644 index 0000000000..518c05b73a --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0005-basic-user-util-properly-protect-use-of-gshadow.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 66a5b5ce9b991327d594f7b635de16999ca54093 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yann E. MORIN" <yann.morin.1998@free.fr> | ||
3 | Date: Wed, 21 Nov 2018 18:09:04 +0100 | ||
4 | Subject: basic/user-util: properly protect use of gshadow | ||
5 | |||
6 | Commit 100d5f6ee6 (user-util: add new wrappers for [...] database | ||
7 | files), ammended by commit 4f07ffa8f5 (Use #if instead of #ifdef for | ||
8 | ENABLE_GSHADOW) moved code from sysuser to basic/user-util. | ||
9 | |||
10 | In doing so, the combination of both commits properly propagated the | ||
11 | ENABLE_GSHADOW conditions around the function manipulating gshadow, but | ||
12 | they forgot to protect the inclusion of the gshadow.h header. | ||
13 | |||
14 | Fix that to be able to build on C libraries that do not provide gshadow | ||
15 | (e.g. uClibc-ng, where it does not exist.) | ||
16 | |||
17 | Upstream-Status: Backport [https://github.com/systemd/systemd/commit/66a5b5ce9b991327d594f7b635de16999ca54093] | ||
18 | --- | ||
19 | src/basic/user-util.h | 2 ++ | ||
20 | 1 file changed, 2 insertions(+) | ||
21 | |||
22 | diff --git a/src/basic/user-util.h b/src/basic/user-util.h | ||
23 | index b6de0e423..cc899ee76 100644 | ||
24 | --- a/src/basic/user-util.h | ||
25 | +++ b/src/basic/user-util.h | ||
26 | @@ -2,7 +2,9 @@ | ||
27 | #pragma once | ||
28 | |||
29 | #include <grp.h> | ||
30 | +#if ENABLE_GSHADOW | ||
31 | #include <gshadow.h> | ||
32 | +#endif | ||
33 | #include <pwd.h> | ||
34 | #include <shadow.h> | ||
35 | #include <stdbool.h> | ||
36 | -- | ||
37 | 2.18.1 | ||
38 | |||