projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'powerpc-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[cascardo/linux.git]
/
fs
/
orangefs
/
devorangefs-req.c
diff --git
a/fs/orangefs/devorangefs-req.c
b/fs/orangefs/devorangefs-req.c
index
db170be
..
a287a66
100644
(file)
--- a/
fs/orangefs/devorangefs-req.c
+++ b/
fs/orangefs/devorangefs-req.c
@@
-116,6
+116,13
@@
static int orangefs_devreq_open(struct inode *inode, struct file *file)
{
int ret = -EINVAL;
{
int ret = -EINVAL;
+ /* in order to ensure that the filesystem driver sees correct UIDs */
+ if (file->f_cred->user_ns != &init_user_ns) {
+ gossip_err("%s: device cannot be opened outside init_user_ns\n",
+ __func__);
+ goto out;
+ }
+
if (!(file->f_flags & O_NONBLOCK)) {
gossip_err("%s: device cannot be opened in blocking mode\n",
__func__);
if (!(file->f_flags & O_NONBLOCK)) {
gossip_err("%s: device cannot be opened in blocking mode\n",
__func__);