From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vic Lee Subject: any reason drmDropMaster() has to be root? Date: Wed, 11 Apr 2012 11:15:50 +0800 Message-ID: <4F84F766.5030002@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 12A919E8EB for ; Tue, 10 Apr 2012 20:15:54 -0700 (PDT) Received: by vbbfo1 with SMTP id fo1so458072vbb.36 for ; Tue, 10 Apr 2012 20:15:54 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hi Everyone, I am referring to this line in drm_drv.c in drm module: DRM_IOCTL_DEF(DRM_IOCTL_DROP_MASTER, drm_dropmaster_ioctl, DRM_ROOT_ONLY) I can understand that set_master requires root, but if the process is already master and just want to drop itself from master, I don't see any point why this has to be root. Could anyone clarify this? If not, I suggest to change drop_master to DRM_AUTH only. My use case is like this: I have an application which will start before X starts, and this app will internally call drmOpen(). Since it's the first app to open the gpu it automatically becomes master, but then X won't start afterwards because X requires master for KMS to work. So in the application I must call drmDropMaster() after drmOpen(), but then I have to run the application as root just in order to drop master. Thanks in advanced. Vic