commit 23d2eabfe76d7dcb1b9ab28fcca967592ed6e53d
parent d4ce7f18b993640e671c31892122426ce685835f
Author: sin <sin@2f30.org>
Date: Fri, 23 Mar 2018 11:56:35 +0000
Chmod fd to 0755, makes it work on grsec kernels
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/pexec.c b/pexec.c
@@ -105,6 +105,9 @@ main(int argc, char *argv[])
if (fd < 0)
err(1, "memfd_create");
+ if (fchmod(fd, 0755) < 0)
+ err(1, "fchmod");
+
while ((n = xread(STDIN_FILENO, buf, BUFSIZ)) > 0)
xwrite(fd, buf, n);