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-11-25 13:03:29 +0000
commitd2b8576bfadd70eec3ef764c33e761eb22830536 (patch)
treea107cdbd0fdc8377ff6de8be99472c83f7887853 /meta/recipes-devtools/pseudo
parent16e8b40b50254afc08319bc61d63756e0492330d (diff)
downloadpoky-d2b8576bfadd70eec3ef764c33e761eb22830536.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) Signed-off-by: Peter A. Bigot <pab@pabigot.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.patch56
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_1.6.2.bb1
2 files changed, 57 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..d0c0a27e54
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch
@@ -0,0 +1,56 @@
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
56
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"