Revert "DRM_CONTROL_ALLOW logic was reversed"
authorAlan Hourihane <alanh@tungstengraphics.com>
Thu, 7 Feb 2008 21:13:36 +0000 (21:13 +0000)
committerAlan Hourihane <alanh@tungstengraphics.com>
Thu, 7 Feb 2008 21:18:37 +0000 (21:18 +0000)
This reverts commit 7af1bb874d9b8b1b8760ad200cee587c41c23434.

linux-core/drm_drv.c

index 5077f06..7177f17 100644 (file)
@@ -666,7 +666,7 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
        } else if (((ioctl->flags & DRM_ROOT_ONLY) && !capable(CAP_SYS_ADMIN)) ||
                   ((ioctl->flags & DRM_AUTH) && !file_priv->authenticated) ||
                   ((ioctl->flags & DRM_MASTER) && !file_priv->master) ||
-                  ((ioctl->flags & DRM_CONTROL_ALLOW) && !(file_priv->minor->type == DRM_MINOR_CONTROL)) ) {
+                  ((!(ioctl->flags & DRM_CONTROL_ALLOW)) && (file_priv->minor->type == DRM_MINOR_CONTROL)) ) {
                retcode = -EACCES;
        } else {
                retcode = func(dev, kdata, file_priv);