From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OkKxHmaffGBAVQAAgWs5BA (envelope-from ) for ; Sun, 18 Apr 2021 23:06:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +C0rGGaffGCpEQAAbx9fmQ (envelope-from ) for ; Sun, 18 Apr 2021 21:06:46 +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 D26241B40B for ; Sun, 18 Apr 2021 23:06:45 +0200 (CEST) Received: from localhost ([::1]:40588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYEcv-0004US-2s for larch@yhetil.org; Sun, 18 Apr 2021 17:06:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYDLu-0004YB-L6 for help-guix@gnu.org; Sun, 18 Apr 2021 15:45:06 -0400 Received: from smtprelay01.ispgateway.de ([80.67.18.13]:40772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYDLs-0004aS-QL for help-guix@gnu.org; Sun, 18 Apr 2021 15:45:06 -0400 Received: from [93.195.170.159] (helo=milk) by smtprelay01.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lYDKd-0003B3-S3 for help-guix@gnu.org; Sun, 18 Apr 2021 21:43:47 +0200 From: Simon Streit To: help-guix@gnu.org Subject: Re: mount.davfs: program is not setuid root In-Reply-To: (Leo Famulari's message of "Fri, 16 Apr 2021 12:34:53 -0400") Date: Sun, 18 Apr 2021 15:36:12 +0200 References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) X-From-Line: nobody Sun Apr 18 15:36:13 2021 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: bGlzdHNAbmV0cGFuaWMub3Jn Received-SPF: none client-ip=80.67.18.13; envelope-from=simon@netpanic.org; helo=smtprelay01.ispgateway.de X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 18 Apr 2021 17:06:23 -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: , 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=1618780005; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=14/AODj9htpN3VcbU0ZDZvWUJkdjM14oVFZ0b/TMeHw=; b=NpG6ehm6ZVPk81iT8nEPQ1y6xWLvpqfoBZLv6ONWhNQN1mJTKBB8+f842LC1Ye9TKas287 aZm0X8Xn+jRLjOYJEexS/kI2+/uyerfPMoSQlgES1PXyRN4q9UfDkczbajECBq9Ibo9R75 CIyZa8tLrOaArnP5LNrPPGkp3cQJNAwkqzmLOW4BHY50ufAUIbFi6tc2Z7J0GnER81X2p5 c0CxBlnop9JpVJZLmtqtcJjNWMTnKLYIM0A9Wmh42sZivEtd1MHUg25NEb+V9AHj8cc8+M 03r94qiq0Zkb7ihPHyfkCQLb7KphBR3R6HfrkSr4K4prXvfZY8q6ZJFghMczTQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618780005; a=rsa-sha256; cv=none; b=hL8JPwAkfxD1vd5bWqpm7LaT0ieS3RZqI8lH8gT+c7b8bgDJFr4dx3tFw3tLhmH6lFs0lG JkhBhj0Ks/iAE5sLjR88FUGdjO30YZk3Tcbv1MXAsJoh6uVh8EvfD8e+jHqKrlbCyZ2btG GCtZ6jxISSf0aoo/Y/Oh9aDF2iNq0qEwRH7Dk0Nm2yp7m/qAy/ffuWWQMfB4TyXQxgEmpo 8Zy5QTMxXIT0KMWost3zM5TWNjRABvfCHuy9rsvvUi0ZPgy9VI3AB733fbdHHAo6rZ5zmU TZHxt7gq59HsURgUVP1OYQ+YaqyH+iVtIgLotuGLJz/uC4Bwg86pZ8r9o+O0fA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: D26241B40B X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: er8deDcjFU1B 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--- 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