|
From: <sv...@va...> - 2012-04-15 21:21:00
|
philippe 2012-04-15 22:20:52 +0100 (Sun, 15 Apr 2012)
New Revision: 12505
Log:
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.
Modified files:
trunk/coregrind/m_gdbserver/remote-utils.c
Modified: trunk/coregrind/m_gdbserver/remote-utils.c (+2 -2)
===================================================================
--- trunk/coregrind/m_gdbserver/remote-utils.c 2012-04-14 00:07:29 -23:00 (rev 12504)
+++ trunk/coregrind/m_gdbserver/remote-utils.c 2012-04-15 22:20:52 +01:00 (rev 12505)
@@ -196,7 +196,7 @@
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 @@
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("");
|