diff options
author | Peter A. Bigot <pab@pabigot.com> | 2014-10-12 16:54:34 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-11-25 12:58:20 +0000 |
commit | eb5b99e4fbfdf31497a4606fc55cab268ec8d654 (patch) | |
tree | 4a67a378035893fc91c6d517855615adb9281d00 /meta/recipes-devtools | |
parent | 20310e68a2930dd1ddc6d0d9fc577fffa5a2777f (diff) | |
download | openembedded-core-contrib-eb5b99e4fbfdf31497a4606fc55cab268ec8d654.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.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch | 56 | ||||
-rw-r--r-- | meta/recipes-devtools/pseudo/pseudo_1.6.2.bb | 1 |
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 00000000000..d0c0a27e54f --- /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 @@ +From e11468a47369596f57c5e99bd0a3dd58b2c6d5e0 Mon Sep 17 00:00:00 2001 +From: "Peter A. Bigot" <pab@pabigot.com> +Date: Sun, 12 Oct 2014 08:27:14 -0500 +Subject: [PATCH 1/3] pseudo_client.c: protect pwd_lck against magic + +While attempting to diagnose unexpected uid/gid assignment I added +--without-passwd-fallback to the pseudo build. This caused build +failures due to inability to lock /etc/passwd. + +Instrumentation revealed that attempts to create the lock file ended up +with pseudo_etc_file() creating the correct lock name, but the +subsequent open had an extra PSEUDO_PASSWD directory prefix causing +it to fail. + +Inspection of pseudo_client shows the only other use of PSEUDO_ETC_FILE +to be protected against magic. Applying the same shield to the +unprotected calls in pseudo_pwd_lck_{open,close} fixes the issue. + +Upstream-Status: Pending +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + pseudo_client.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/pseudo_client.c b/pseudo_client.c +index 8deaa1b..442dd19 100644 +--- a/pseudo_client.c ++++ b/pseudo_client.c +@@ -416,20 +416,24 @@ pseudo_pwd_lck_open(void) { + } + } + pseudo_pwd_lck_close(); ++ pseudo_antimagic(); + pseudo_pwd_lck_fd = PSEUDO_ETC_FILE(".pwd.lock", + pseudo_pwd_lck_name, O_RDWR | O_CREAT); ++ pseudo_magic(); + return pseudo_pwd_lck_fd; + } + + int + pseudo_pwd_lck_close(void) { + if (pseudo_pwd_lck_fd != -1) { ++ pseudo_antimagic(); + close(pseudo_pwd_lck_fd); + if (pseudo_pwd_lck_name) { + unlink(pseudo_pwd_lck_name); + free(pseudo_pwd_lck_name); + pseudo_pwd_lck_name = 0; + } ++ pseudo_magic(); + pseudo_pwd_lck_fd = -1; + return 0; + } else { +-- +1.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 ece50bfdfd7..df8ce832c14 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 SRC_URI = " \ http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \ + file://0001-pseudo_client.c-protect-pwd_lck-against-magic.patch \ " SRC_URI[md5sum] = "4d7b4f9d1b4aafa680ce94a5a9a52f1f" |