summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
new file mode 100644
index 0000000..8c7aa07
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
@@ -0,0 +1,30 @@
1Upstream-Status: Denied [no desire for uclibc support]
2Signed-off-by: Khem Raj <raj.khem@gmail.com>
3
4Index: git/src/shared/util.c
5===================================================================
6--- git.orig/src/shared/util.c 2014-03-15 15:14:21.368160908 -0700
7+++ git/src/shared/util.c 2014-03-15 15:44:21.988194688 -0700
8@@ -85,6 +85,8 @@
9 #include "def.h"
10 #include "missing.h"
11
12+#include "config.h"
13+
14 int saved_argc = 0;
15 char **saved_argv = NULL;
16
17@@ -6222,7 +6224,13 @@
18
19 u = umask(077);
20
21+#ifdef HAVE_MKOSTEMP
22 fd = mkostemp(pattern, flags);
23+#else
24+ fd = mkstemp(pattern);
25+ if (fd >= 0) fcntl(fd, F_SETFD, flags);
26+#endif /* HAVE_MKOSTEMP */
27+
28 if (fd < 0)
29 return -errno;
30