diff options
Diffstat (limited to 'meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch')
-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, 0 insertions, 56 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 deleted file mode 100644 index d0c0a27e54..0000000000 --- a/meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
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 | |||