From: Philippe Waroquiers Date: Sun, 15 Apr 2012 21:20:52 +0000 (+0000) Subject: Change permission mask for FIFOs and shared memory to 0600 instead of 0666 X-Git-Tag: svn/VALGRIND_3_8_0~357 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6dc9b3a933487136a80a96c9995ca2fa42a5471;p=thirdparty%2Fvalgrind.git Change permission mask for FIFOs and shared memory to 0600 instead of 0666 Following a discussion about which user can debug which VAlgrind gdbserver: The default umask will remove the "other" and "group" write bits. Without the w bits, nothing works in any case. Moreover, if the vgdb process does not belong to the user running the V gdbserver, connections are also not possible. => remove useless/confusing bits. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12505 --- diff --git a/coregrind/m_gdbserver/remote-utils.c b/coregrind/m_gdbserver/remote-utils.c index 76bf4981c0..88b903f01e 100644 --- a/coregrind/m_gdbserver/remote-utils.c +++ b/coregrind/m_gdbserver/remote-utils.c @@ -196,7 +196,7 @@ static void safe_mknod (char *nod) { SysRes m; - m = VG_(mknod) (nod, VKI_S_IFIFO|0666, 0); + m = VG_(mknod) (nod, VKI_S_IFIFO|0600, 0); if (sr_isError (m)) { if (sr_Err (m) == VKI_EEXIST) { if (VG_(clo_verbosity) > 1) { @@ -307,7 +307,7 @@ void remote_open (char *name) pid_from_to_creator = pid; - o = VG_(open) (shared_mem, VKI_O_CREAT|VKI_O_RDWR, 0666); + o = VG_(open) (shared_mem, VKI_O_CREAT|VKI_O_RDWR, 0600); if (sr_isError (o)) { sr_perror(o, "cannot create shared_mem file %s\n", shared_mem); fatal("");