summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo
diff options
context:
space:
mode:
authorPeter A. Bigot <pab@pabigot.com>2014-10-12 16:54:34 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 10:18:48 +0000
commitd57978aafc2606c51acda2f79c81693b278e62a8 (patch)
treebdbeaa1a128b30d7527ffb5519278280d1db5c15 /meta/recipes-devtools/pseudo
parent7fe785d6928649da330d65d9838ab092e0c82ac3 (diff)
downloadpoky-d57978aafc2606c51acda2f79c81693b278e62a8.tar.gz
pseudo: support --without-passwd-fallback configuration option
A bug in pseudo 1.6.2 results in lock failures if this option is present. (From OE-Core rev: eb5b99e4fbfdf31497a4606fc55cab268ec8d654) (From OE-Core rev: 516f71ac0583d9fe6aded8cd4332e6b329039a2e) Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/pseudo')
-rw-r--r--meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch55
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_1.6.2.bb1
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch b/meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch
new file mode 100644
index 0000000000..b1bb9fb59c
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch
@@ -0,0 +1,55 @@
1From e11468a47369596f57c5e99bd0a3dd58b2c6d5e0 Mon Sep 17 00:00:00 2001
2From: "Peter A. Bigot" <pab@pabigot.com>
3Date: Sun, 12 Oct 2014 08:27:14 -0500
4Subject: [PATCH 1/3] pseudo_client.c: protect pwd_lck against magic
5
6While attempting to diagnose unexpected uid/gid assignment I added
7--without-passwd-fallback to the pseudo build. This caused build
8failures due to inability to lock /etc/passwd.
9
10Instrumentation revealed that attempts to create the lock file ended up
11with pseudo_etc_file() creating the correct lock name, but the
12subsequent open had an extra PSEUDO_PASSWD directory prefix causing
13it to fail.
14
15Inspection of pseudo_client shows the only other use of PSEUDO_ETC_FILE
16to be protected against magic. Applying the same shield to the
17unprotected calls in pseudo_pwd_lck_{open,close} fixes the issue.
18
19Upstream-Status: Pending
20Signed-off-by: Peter A. Bigot <pab@pabigot.com>
21---
22 pseudo_client.c | 4 ++++
23 1 file changed, 4 insertions(+)
24
25diff --git a/pseudo_client.c b/pseudo_client.c
26index 8deaa1b..442dd19 100644
27--- a/pseudo_client.c
28+++ b/pseudo_client.c
29@@ -416,20 +416,24 @@ pseudo_pwd_lck_open(void) {
30 }
31 }
32 pseudo_pwd_lck_close();
33+ pseudo_antimagic();
34 pseudo_pwd_lck_fd = PSEUDO_ETC_FILE(".pwd.lock",
35 pseudo_pwd_lck_name, O_RDWR | O_CREAT);
36+ pseudo_magic();
37 return pseudo_pwd_lck_fd;
38 }
39
40 int
41 pseudo_pwd_lck_close(void) {
42 if (pseudo_pwd_lck_fd != -1) {
43+ pseudo_antimagic();
44 close(pseudo_pwd_lck_fd);
45 if (pseudo_pwd_lck_name) {
46 unlink(pseudo_pwd_lck_name);
47 free(pseudo_pwd_lck_name);
48 pseudo_pwd_lck_name = 0;
49 }
50+ pseudo_magic();
51 pseudo_pwd_lck_fd = -1;
52 return 0;
53 } else {
54--
551.8.5.5
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb b/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
index ece50bfdfd..df8ce832c1 100644
--- a/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
@@ -2,6 +2,7 @@ require pseudo.inc
2 2
3SRC_URI = " \ 3SRC_URI = " \
4 http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \ 4 http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
5 file://0001-pseudo_client.c-protect-pwd_lck-against-magic.patch \
5" 6"
6 7
7SRC_URI[md5sum] = "4d7b4f9d1b4aafa680ce94a5a9a52f1f" 8SRC_URI[md5sum] = "4d7b4f9d1b4aafa680ce94a5a9a52f1f"