summaryrefslogtreecommitdiff
path: root/linux-core/drm_fops.c
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2005-08-04 13:15:27 +0000
committerJon Smirl <jonsmirl@yahoo.com>2005-08-04 13:15:27 +0000
commitea2c7a895d6456c83ee8489e1db7ae5a800f0abf (patch)
treeeec12bb1d1eae45a612ac82ae2bd0e7454ecfd65 /linux-core/drm_fops.c
parent3ffd0c188bc35263f0b53345a0a4a261f4ae1b71 (diff)
Split the control of master vs root priv. Everything is still marked as
needing root.
Diffstat (limited to 'linux-core/drm_fops.c')
-rw-r--r--linux-core/drm_fops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c
index 74c7e93c..4e6cd8b4 100644
--- a/linux-core/drm_fops.c
+++ b/linux-core/drm_fops.c
@@ -244,6 +244,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp, drm_device_t
priv->minor = minor;
priv->head = drm_heads[minor];
priv->ioctl_count = 0;
+ /* for compatibility root is always authenticated */
priv->authenticated = capable(CAP_SYS_ADMIN);
priv->lock_count = 0;
@@ -259,6 +260,8 @@ static int drm_open_helper(struct inode *inode, struct file *filp, drm_device_t
priv->prev = NULL;
dev->file_first = priv;
dev->file_last = priv;
+ /* first opener automatically becomes master */
+ priv->master = 1;
} else {
priv->next = NULL;
priv->prev = dev->file_last;