public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2 v2] lib: allow checkpoints to be used by any uid
@ 2017-10-06 11:57 Jan Stancek
  2017-10-06 11:57 ` [LTP] [PATCH 2/2 v2] security/dirtyc0w: synchronize parent and child Jan Stancek
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2017-10-06 11:57 UTC (permalink / raw)
  To: ltp

Allow unprivileged child to synchronize with privileged parent.
Use chmod after open, because effective permissions set by open()
are modified by the process's umask: (mode & ~umask).

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 lib/tst_test.c | 1 +
 1 file changed, 1 insertion(+)

No changes in v2.

diff --git a/lib/tst_test.c b/lib/tst_test.c
index 26414e31ca77..233b370794a6 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -93,6 +93,7 @@ static void setup_ipc(void)
 	ipc_fd = open(shm_path, O_CREAT | O_EXCL | O_RDWR, 0600);
 	if (ipc_fd < 0)
 		tst_brk(TBROK | TERRNO, "open(%s)", shm_path);
+	SAFE_CHMOD(shm_path, 0666);
 
 	SAFE_FTRUNCATE(ipc_fd, size);
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-10 12:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06 11:57 [LTP] [PATCH 1/2 v2] lib: allow checkpoints to be used by any uid Jan Stancek
2017-10-06 11:57 ` [LTP] [PATCH 2/2 v2] security/dirtyc0w: synchronize parent and child Jan Stancek
2017-10-09 14:43   ` Cyril Hrubis
2017-10-10 12:17     ` Jan Stancek
2017-10-10 12:22       ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox