svn commit: r316963 - stable/11/sys/compat/linux
Dmitry Chagin
dchagin at FreeBSD.org
Sat Apr 15 15:12:27 UTC 2017
Author: dchagin
Date: Sat Apr 15 15:12:25 2017
New Revision: 316963
URL: https://svnweb.freebsd.org/changeset/base/316963
Log:
MFC r314867:
Linux kernel does not export to the user space ipc_perm.mode values
other than S_IRWXUGO (0777).
Modified:
stable/11/sys/compat/linux/linux_ipc.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/compat/linux/linux_ipc.c
==============================================================================
--- stable/11/sys/compat/linux/linux_ipc.c Sat Apr 15 15:11:23 2017 (r316962)
+++ stable/11/sys/compat/linux/linux_ipc.c Sat Apr 15 15:12:25 2017 (r316963)
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/msg.h>
#include <sys/sem.h>
#include <sys/shm.h>
+#include <sys/stat.h>
#include "opt_compat.h"
@@ -151,7 +152,7 @@ bsd_to_linux_ipc_perm(struct ipc_perm *b
lpp->gid = bpp->gid;
lpp->cuid = bpp->cuid;
lpp->cgid = bpp->cgid;
- lpp->mode = bpp->mode;
+ lpp->mode = bpp->mode & (S_IRWXU|S_IRWXG|S_IRWXO);
lpp->seq = bpp->seq;
}
More information about the svn-src-all
mailing list