From ea2c7a895d6456c83ee8489e1db7ae5a800f0abf Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Thu, 4 Aug 2005 13:15:27 +0000 Subject: Split the control of master vs root priv. Everything is still marked as needing root. --- linux-core/drm_fops.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux-core/drm_fops.c') 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; -- cgit v1.2.3