From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QOuJIp1ofWD8DAEAgWs5BA (envelope-from ) for ; Mon, 19 Apr 2021 13:25:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iKWNHJ1ofWDtMwAA1q6Kng (envelope-from ) for ; Mon, 19 Apr 2021 11:25:17 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 17B7D2574A for ; Mon, 19 Apr 2021 13:25:17 +0200 (CEST) Received: from localhost ([::1]:36676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYS1k-0000wW-Ah for larch@yhetil.org; Mon, 19 Apr 2021 07:25:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYDhq-0006ac-2P for help-guix@gnu.org; Sun, 18 Apr 2021 16:07:46 -0400 Received: from smtprelay08.ispgateway.de ([134.119.228.107]:27418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYDho-0001E3-42 for help-guix@gnu.org; Sun, 18 Apr 2021 16:07:45 -0400 Received: from [93.195.170.159] (helo=milk) by smtprelay08.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lYDh0-0002u7-0L; Sun, 18 Apr 2021 22:06:54 +0200 From: Simon Streit To: Leo Famulari Subject: Re: mount.davfs: program is not setuid root References: Date: Sun, 18 Apr 2021 22:07:42 +0200 In-Reply-To: (Leo Famulari's message of "Fri, 16 Apr 2021 12:34:53 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: bGlzdHNAbmV0cGFuaWMub3Jn Received-SPF: none client-ip=134.119.228.107; envelope-from=lists@netpanic.org; helo=smtprelay08.ispgateway.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 19 Apr 2021 07:24:31 -0400 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618831517; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=z8cequC3paQf3+mcG4ao+yzQ+O4+1ReWmUtI4ufFFwM=; b=eSHd824hAhi91mg5jzBJTFsaNb+eMRQQQekzWW7al31tOU7x6oiTIlOBRBR5haoawVDnUP JFL8/8ekPmSmaLyUaCkunXVEAVTz5CUKaUjUZb+Dt9+YW+1yHV4SgaaJczzUGT8DkygB3h gJirPY65a1ABueL1kbGiH4dfkwTJ1DrkiBtmwdH5twpymQSpNn5c5MMXy+0Dwylc6k9OM3 Xm54ldsM/QFgYVGk2yb3aDOkC/77UDfFsKfMPmpUVOTojwRcAUz7sOz11vPXEqxpLGT+7t falcABbP9VJqbyPfdr+jDqsPdNV5jsFTlpUcywZ+O2rvFAU9D9rhdCuI20+9kQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618831517; a=rsa-sha256; cv=none; b=EpZ1K+eZN5IAR8F4cafL5OouX+a6iLOlGL9GHZImN+jfbS8QdlnQGNfgeapCy66b4dXXIj kTJ2LPalz3mbcYDRmBu0cNXZn+NYn1NxpFzAA9afBKolEEbhh7ComZB7SMjW+Q7A/ywMCk sjL3bCKwjQ2X9G9XiJ4u6Glaj1C1oVTfITyu7Yz/9Rj7+KxJM7xEbSnYhFFRcwOFHVw6DZ WJRzT1COvPz85+wr9uHK0H37sypEuKp7WeiJxCpM/Aphifyzbm1OKzNGDDiKJIA3POtTkM 1JI9mV37Ow94PaZUY/8v+1RpE/YU5+6AjkZZYaiSnNnIojFL9M7lO5v5Cw4q7A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 17B7D2574A X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: EvTgsG6iivVm Leo Famulari writes: > On Fri, Apr 16, 2021 at 03:31:35PM +0200, Simon Streit wrote: >> But after rebooting, and trying to mount a webdav share as user, I only >> get: >> >> --8<---------------cut here---------------start------------->8--- >> /run/current-system/profile/sbin/mount.davfs: program is not setuid root >> --8<---------------cut here---------------end--------------->8--- >> >> mount.davfs is listed in /run/setuid-programms though. > > On Guix System, /run/setuid-programs [0] always comes before > /run/current-system on PATH. > > But in your case, the non-setuid location is being invoked. Somehow it is. I invoked it with: --8<---------------cut here---------------start------------->8--- $ mount -t davfs URL moint_point --8<---------------cut here---------------end--------------->8--- Looking at the whereabouts of mount: --8<---------------cut here---------------start------------->8--- mount: /run/setuid-programs/mount.davfs /run/setuid-programs/mount /run/setuid-programs/mount.ntfs-3g /run/setuid-programs/mount.nfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/bin/mount /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.davfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.lowntfs-3g /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.ntfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.ntfs-3g --8<---------------cut here---------------end--------------->8--- and mount.davfs: --8<---------------cut here---------------start------------->8--- mount: /run/setuid-programs/mount.davfs /run/setuid-programs/mount /run/setuid-programs/mount.ntfs-3g /run/setuid-programs/mount.nfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/bin/mount /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.davfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.lowntfs-3g /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.ntfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.ntfs-3g --8<---------------cut here---------------end--------------->8--- My $PATH: --8<---------------cut here---------------start------------->8--- /home/sstreet/.local/bin:/home/sstreet/.guix-extra-profiles/texlive/texlive/bin:/home/sstreet/.config/guix/current/bin:/home/sstreet/.guix-profile/bin:/home/sstreet/.guix-profile/sbin:/home/sstreet/.local/bin:/home/sstreet/.local/bin:/run/setuid-programs:/home/sstreet/.config/guix/current/bin:/home/sstreet/.guix-profile/bin:/home/sstreet/.guix-profile/sbin:/run/current-system/profile/bin:/run/current-system/profile/sbin --8<---------------cut here---------------end--------------->8--- It does seem that the binaries are setuid first. But then looking at my own $PATH I see the setuid paths are not first in the list. So do they have to go to the front of the list? I just tested this on a clean user account where setuid are set first, but it fails there too. I also temporarily added the mount point to /etc/fstab. Mounting this mount point as root works. It fails as user too. There is a possibility that I did not get mount flags right there, but that will be a different issue. The next will be to add this do system declaration as well. But first when user can mount it. > > Did you invoke `mount.davfs`, so it would be looked up on PATH? Even when calling the binary from /run/setuid-programs will fail as well. > > Or did you invoke `/run/current-system/profile/sbin/mount.davfs`? > > [0] https://guix.gnu.org/manual/en/html_node/Setuid-Programs.html