Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6f3d811 authored by Al Viro's avatar Al Viro
Browse files

don't leak O_CLOEXEC into ->f_flags



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ddd3e077
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -814,7 +814,7 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o
		op->mode = 0;

	/* Must never be set by userspace */
	flags &= ~FMODE_NONOTIFY;
	flags &= ~FMODE_NONOTIFY & ~O_CLOEXEC;

	/*
	 * O_SYNC is implemented as __O_SYNC|O_DSYNC.  As many places only
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ static int seq_show(struct seq_file *m, void *v)
		if (file) {
			struct fdtable *fdt = files_fdtable(files);

			f_flags = file->f_flags & ~O_CLOEXEC;
			f_flags = file->f_flags;
			if (close_on_exec(fd, fdt))
				f_flags |= O_CLOEXEC;