From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AC347139085 for ; Tue, 20 Dec 2016 16:20:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4DDC2241B9; Tue, 20 Dec 2016 16:19:49 +0000 (UTC) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 863042241A9 for ; Tue, 20 Dec 2016 16:19:49 +0000 (UTC) Received: by mail-it0-x244.google.com with SMTP id b123so14493808itb.2 for ; Tue, 20 Dec 2016 08:19:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:in-reply-to:references :mime-version; bh=lfEuQ8CPpljYK1noieHcHQGvmH2qx6NKpJ8ttDxTl9E=; b=QTx9EhmS5QmENoZ1ybf2wxsuHV96Mdyzmp3sombBDzqmcKuyi5W+0J6gyvI4oHoVGp WWMfBfKpBb8xi63YOfafIM5kLk18Vg/2suCxxxVOZkjDk1bWZVTQFhIFEh2j+mWQYvts 8XMPnxOmI2UGMWvOWcvx+QqHxNF242dlzVHY6J0JtYsQAQh+1kxra/odiUKhLnmSGGWz zW+35Eiy9Ut22x1/v1W0Yz2/KqaLIFg3+KQqNkNaKYBy4LROceR/YsfF/xql9m9yRwuK /Yz13Ths7Hl4zu5QWj44ZFxKitMkkTnd20ezzJ93m2vbs1viNRj9Vj0pNiM7ZMBIkdLg Z8ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :in-reply-to:references:mime-version; bh=lfEuQ8CPpljYK1noieHcHQGvmH2qx6NKpJ8ttDxTl9E=; b=F775VMU+ZnV5MG3KS5wzl/RX1x2XRvM4tWTFJ81bIid7rXFkuAX4mDeo60PU1rZ7s9 N0qDdgnQLhKyZWtBcpyuhqUHN1c7rv1mpfWENrBtQUZAjJruoLjs12WSLJK1cME9YLAV wCial3R+xpICGdZDgG1Pas76dYF+MOHvttqLECa2D2w/eiNG+N6+BW7ODPy7vX7nd6gT WoRa37NdkiZbh7jCKjfpV6BXS4ZoiZjVFfFgj36Q2CUn91osftHXlbcw2PTJ5Fru1t41 CoXuRbjK6jIc4c/O4lSRtl1YOlZcf/9g1rIrGIMQ2PamrvDJeXbbq1pbabc4e1d9Z+cH fzPA== X-Gm-Message-State: AIkVDXK7q7snVNQVW7bAGzD8+Dlh8UkPZcA9eMkd5N6g/pR8JchuiumTqFSp6V46NFkwfw== X-Received: by 10.36.5.198 with SMTP id 189mr812787itl.115.1482250788405; Tue, 20 Dec 2016 08:19:48 -0800 (PST) Received: from zoe.localnet (c-76-122-173-248.hsd1.mi.comcast.net. [76.122.173.248]) by smtp.gmail.com with ESMTPSA id j201sm9158976ita.2.2016.12.20.08.19.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Dec 2016 08:19:47 -0800 (PST) From: Michael Mol To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: X w/o suid root Date: Tue, 20 Dec 2016 11:19:46 -0500 Message-ID: <1594267.mscVpbQE7E@zoe> User-Agent: KMail/5.2.3 (Linux/4.8.0-30-generic; KDE/5.26.0; x86_64; ; ) In-Reply-To: <20161219232252.15928.1F31F3FA@matica.foolinux.mooo.com> References: <20161216234309.29062.24B0C902@matica.foolinux.mooo.com> <20161219062842.9403.125F8924@matica.foolinux.mooo.com> <20161219232252.15928.1F31F3FA@matica.foolinux.mooo.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2224426.TDacRxlVYa"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Archives-Salt: fedaa322-14ec-4222-bd4b-a81771683ba9 X-Archives-Hash: 855a836f0d3d977c3bcb681ef373d467 --nextPart2224426.TDacRxlVYa Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Monday, December 19, 2016 3:35:24 PM EST Ian Zimmerman wrote: > On 2016-12-18 22:43, Ian Zimmerman wrote: > > But now I hit the error chronicled at [2]. A look at kernel source, in > > drivers/gpu/drm/drm_ioctl.c, shows that the relevant kernel ioctl is > > > > declared thus: > > DRM_IOCTL_DEF(DRM_IOCTL_SET_MASTER, drm_setmaster_ioctl, DRM_ROOT_ONLY), > > And the answer is .. OF COURSE!! .. systemd. > > With systemd integration, the get_drm_info() function in xorg source file > hw/xfree86/os-support/linux/lnx_platform.c sets the server_fd flag, > which makes it do this later: > > if (server_fd) > xf86_platform_devices[delayed_index].flags |= XF86_PDEV_SERVER_FD; > > .. which makes the radeon_set_drm_master() function in xf86-video-ati > file src/radeon_kms.c immediately return TRUE and bypass the failing > ioctl(DRM_IOCTL_SET_MASTER). > > So now I know that my only way to non-suid (and anyone else with similar > hardware and without systemd) is to patch the X source, and/or the > kernel source. I'll probably take a few days break from this issue > pondering if it's worth it. Patch it, test it, file a bug report and supply your patch. Seems to me you found a legitimate bug. --nextPart2224426.TDacRxlVYa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEcBAABCAAGBQJYWVoiAAoJED5TcEBdxYwQgZsH/0xq7lPPWDUnyESsDc+ICtZ9 DkVhwTm4ZqCmQiYKBvpVorZr8kQZ4v17T9c+RYHQMMkXtLIBPXXGVwxFlX4KRptg pfivY2xTShbbmv8hgu0vIVti0n7r8JOIWUzUzofgwH63Ke0ROaWiua/rMzxi/jAs tFaW/qdu9D9LREFEuCZyVK9Cb7nJNCU0eTWDjUrLPLaKkZ6rtOU+GalGlegv1+i0 hva4bCZDoVJxK1OC9OUuVQyoYyuK0pX4181M8eWqtzgGP4kvpvUp6MJBHNue/Hbw Sth7nQzi7u2n9+xfqXKTNoNfxrtwC5fkmDWtsyC17Ks9zGPDrSPPvynIkJYtsjo= =/amW -----END PGP SIGNATURE----- --nextPart2224426.TDacRxlVYa--