aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-09-11 03:11:35 -0400
committerMike Frysinger <vapier@gentoo.org>2015-09-11 03:11:35 -0400
commit775921d02b2d1fea48e6232520497c2ad7431975 (patch)
treea99ed9b547dcbef15fe495fb9a11cd32f0eae02c /libsandbox
parenttests: add dynamic/static categories (diff)
downloadsandbox-775921d02b2d1fea48e6232520497c2ad7431975.tar.gz
sandbox-775921d02b2d1fea48e6232520497c2ad7431975.tar.bz2
sandbox-775921d02b2d1fea48e6232520497c2ad7431975.zip
libsandbox: handle open's O_TMPFILE flagv2.7
This new flag needs us to unpack & pass down the mode rather than always sending in the value of 0. URL: http://bugs.gentoo.org/529044 Reported-by: Aidan Thornton <makosoft@googlemail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox')
-rw-r--r--libsandbox/wrapper-funcs/openat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsandbox/wrapper-funcs/openat.c b/libsandbox/wrapper-funcs/openat.c
index 3e46ad5..846c63f 100644
--- a/libsandbox/wrapper-funcs/openat.c
+++ b/libsandbox/wrapper-funcs/openat.c
@@ -24,7 +24,7 @@
#define WRAPPER_SAFE_POST_EXPAND \
int mode = 0; \
- if (flags & O_CREAT) { \
+ if (flags & (O_CREAT | O_TMPFILE)) { \
va_list ap; \
va_start(ap, flags); \
mode = va_arg(ap, int); \