]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - fs/open.c
userns: limit the maximum depth of user_namespace->parent chain
[linux-imx.git] / fs / open.c
index d53e29895082306747de0998c730159b73d08528..7931f76acc2beede0298747df1d505b30cd225b4 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -823,7 +823,7 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o
        int lookup_flags = 0;
        int acc_mode;
 
-       if (flags & O_CREAT)
+       if (flags & (O_CREAT | __O_TMPFILE))
                op->mode = (mode & S_IALLUGO) | S_IFREG;
        else
                op->mode = 0;