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 13:03:29 +0000 |
commit | d2b8576bfadd70eec3ef764c33e761eb22830536 (patch) | |
tree | a107cdbd0fdc8377ff6de8be99472c83f7887853 /meta/recipes-devtools/pseudo/pseudo-1.6.2 | |
parent | 16e8b40b50254afc08319bc61d63756e0492330d (diff) | |
download | poky-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/pseudo-1.6.2')
-rw-r--r-- | meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch | 56 |
1 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..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 @@ | |||
1 | From e11468a47369596f57c5e99bd0a3dd58b2c6d5e0 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Peter A. Bigot" <pab@pabigot.com> | ||
3 | Date: Sun, 12 Oct 2014 08:27:14 -0500 | ||
4 | Subject: [PATCH 1/3] pseudo_client.c: protect pwd_lck against magic | ||
5 | |||
6 | While attempting to diagnose unexpected uid/gid assignment I added | ||
7 | --without-passwd-fallback to the pseudo build. This caused build | ||
8 | failures due to inability to lock /etc/passwd. | ||
9 | |||
10 | Instrumentation revealed that attempts to create the lock file ended up | ||
11 | with pseudo_etc_file() creating the correct lock name, but the | ||
12 | subsequent open had an extra PSEUDO_PASSWD directory prefix causing | ||
13 | it to fail. | ||
14 | |||
15 | Inspection of pseudo_client shows the only other use of PSEUDO_ETC_FILE | ||
16 | to be protected against magic. Applying the same shield to the | ||
17 | unprotected calls in pseudo_pwd_lck_{open,close} fixes the issue. | ||
18 | |||
19 | Upstream-Status: Pending | ||
20 | Signed-off-by: Peter A. Bigot <pab@pabigot.com> | ||
21 | --- | ||
22 | pseudo_client.c | 4 ++++ | ||
23 | 1 file changed, 4 insertions(+) | ||
24 | |||
25 | diff --git a/pseudo_client.c b/pseudo_client.c | ||
26 | index 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 | -- | ||
55 | 1.8.5.5 | ||
56 | |||