aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/shell-container.c8
-rw-r--r--support/support_fuse.c6
-rw-r--r--support/support_stack_alloc.c9
-rw-r--r--support/test-container.c2
4 files changed, 14 insertions, 11 deletions
diff --git a/support/shell-container.c b/support/shell-container.c
index dcf53ad..06f3212 100644
--- a/support/shell-container.c
+++ b/support/shell-container.c
@@ -237,25 +237,25 @@ run_command_array (char **argv)
{
if (strcmp (argv[i], "<") == 0 && argv[i + 1])
{
- new_stdin = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0777);
+ new_stdin = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0666);
++i;
continue;
}
if (strcmp (argv[i], ">") == 0 && argv[i + 1])
{
- new_stdout = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0777);
+ new_stdout = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0666);
++i;
continue;
}
if (strcmp (argv[i], ">>") == 0 && argv[i + 1])
{
- new_stdout = open (argv[i + 1], O_WRONLY|O_CREAT|O_APPEND, 0777);
+ new_stdout = open (argv[i + 1], O_WRONLY|O_CREAT|O_APPEND, 0666);
++i;
continue;
}
if (strcmp (argv[i], "2>") == 0 && argv[i + 1])
{
- new_stderr = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0777);
+ new_stderr = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0666);
++i;
continue;
}
diff --git a/support/support_fuse.c b/support/support_fuse.c
index a70a74c..a90882e 100644
--- a/support/support_fuse.c
+++ b/support/support_fuse.c
@@ -212,6 +212,9 @@ support_fuse_handle_directory (struct support_fuse *f)
support_fuse_reply_prepared (f);
}
return true;
+ case FUSE_GETXATTR:
+ support_fuse_reply_error (f, ENOSYS);
+ return true;
default:
return false;
}
@@ -222,7 +225,8 @@ support_fuse_handle_mountpoint (struct support_fuse *f)
{
TEST_VERIFY (f->inh != NULL);
/* 1 is the root node. */
- if (f->inh->opcode == FUSE_GETATTR && f->inh->nodeid == 1)
+ if ((f->inh->opcode == FUSE_GETATTR || f->inh->opcode == FUSE_GETXATTR)
+ && f->inh->nodeid == 1)
return support_fuse_handle_directory (f);
return false;
}
diff --git a/support/support_stack_alloc.c b/support/support_stack_alloc.c
index 5e576be..132e7b4 100644
--- a/support/support_stack_alloc.c
+++ b/support/support_stack_alloc.c
@@ -64,11 +64,10 @@ support_stack_alloc (size_t size)
MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE|MAP_STACK,
-1);
/* Some architecture still requires executable stack for the signal return
- trampoline, although PF_X could be overridden if PT_GNU_STACK is present.
- However since glibc does not export such information with a proper ABI,
- it uses the historical permissions. */
- int prot = PROT_READ | PROT_WRITE
- | (DEFAULT_STACK_PERMS & PF_X ? PROT_EXEC : 0);
+ trampoline, although PROT_EXEC could be overridden if PT_GNU_STACK is
+ present. However since glibc does not export such information with a
+ proper ABI, it uses the historical permissions. */
+ int prot = DEFAULT_STACK_PROT_PERMS;
xmprotect (alloc_base + guardsize, stacksize, prot);
memset (alloc_base + guardsize, 0xA5, stacksize);
return (struct support_stack) { alloc_base + guardsize, stacksize, guardsize };
diff --git a/support/test-container.c b/support/test-container.c
index 1c40ab3..ae643d3 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -273,7 +273,7 @@ devmount (const char *new_root_path, const char *which)
{
int fd;
fd = open (concat (new_root_path, "/dev/", which, NULL),
- O_CREAT | O_TRUNC | O_RDWR, 0777);
+ O_CREAT | O_TRUNC | O_RDWR, 0666);
xclose (fd);
trymount (concat ("/dev/", which, NULL),