From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8OmMKgSBfmCrmgAAgWs5BA (envelope-from ) for ; Tue, 20 Apr 2021 09:21:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id SGNCJgSBfmAleQAA1q6Kng (envelope-from ) for ; Tue, 20 Apr 2021 07:21:40 +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 E63D11BB69 for ; Tue, 20 Apr 2021 09:21:39 +0200 (CEST) Received: from localhost ([::1]:34174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYkhV-0001LJ-PW for larch@yhetil.org; Tue, 20 Apr 2021 03:21:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYkhE-0001De-Vy for help-guix@gnu.org; Tue, 20 Apr 2021 03:21:21 -0400 Received: from flashner.co.il ([178.62.234.194]:57324) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYkhD-0003Wh-1j for help-guix@gnu.org; Tue, 20 Apr 2021 03:21:20 -0400 Received: from localhost (unknown [31.210.177.125]) by flashner.co.il (Postfix) with ESMTPSA id 23E2440583; Tue, 20 Apr 2021 07:21:17 +0000 (UTC) Date: Tue, 20 Apr 2021 10:20:44 +0300 From: Efraim Flashner To: Leo Famulari Subject: Re: mount.davfs: program is not setuid root Message-ID: Mail-Followup-To: Leo Famulari , Simon Streit , help-guix@gnu.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hUyGuv++fqjiadDS" Content-Disposition: inline In-Reply-To: X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il 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_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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=1618903300; 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=yRPqodPpQ1SL2TJRxK9ZsWOqKM9RZ8WawJ0h6MIGP90=; b=ehsmx3oKXnT5HNGeabCBK1jMq5b+qPz7/DdlZJPOOJVfij5rY6poc/o4G+DB0bklmZgLqD dgobUHHfqUoZU45EW/vVUI+zESo5JQw0wbfxAh84ncbJ2u42oWxNbB6TxknFbm2Hvcz9oM PruEg2FvgjSVgMJQqj2G+ah0+oX62kSPYrwlGWOxWrrgjm4Jpp3idq2e0KWNxFo6xTCr+9 IWimvAyzlSHDtNewyn171vrAEgQnCdpPPRIIqmqpKZcwTr97b33dyAEtvAfhojI62+PxNH afQN83K42WCCQhi4lVauDQvcTpvg4goHsZmky7avm6MkwU/8KT5dNtfbGmhQ2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618903300; a=rsa-sha256; cv=none; b=ZDylhDaPZuuGaCsGo9VgqVA1Nkbtk5z183Q3ECZX2vNZx7fV1fK9zvJ42GtDezYkc4jJ5q yxlw1o0krZoQaLQpyX6ff6rzMqdURArv4vCWrSpVZAnx6xQZtbvTawlWzc6PYk4nmkAxMN YVhybNp2FL4Sa7b2MZJQIkP+voz2le4Er5vIlOww+vr3zdoQ4mjHTYdMJgIeiC2G0dIY9S nUoe3uVwgWuoxmdgyIYDLwAKpIJVbvCHtzPyPO2Q2tdForZ4qcBmUan1nGXV6v5F3jurRR LRifi8JXDSxDOx4LqYvebP2t4O8qspj+qV7zQ9BJr6J1a0dggZJa/PgUF4jLEg== 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: -4.04 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: E63D11BB69 X-Spam-Score: -4.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: faxmS9/7KFO8 --hUyGuv++fqjiadDS Content-Type: multipart/mixed; boundary="VrrxKvqRb8yTIBka" Content-Disposition: inline --VrrxKvqRb8yTIBka Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 19, 2021 at 08:47:08PM -0400, Leo Famulari wrote: > On Mon, Apr 19, 2021 at 10:30:13PM +0200, Simon Streit wrote: > > I just tried again, and called mount as: > > --8<---------------cut here---------------start------------->8--- > > /run/setuid-programs/mount -t ~/test/ > > --8<---------------cut here---------------end--------------->8--- > > where URL is my remote URL share trying to mount it to local test dir, > > where it fails with: > > --8<---------------cut here---------------start------------->8--- > > /run/current-system/profile/sbin/mount.davfs: program is not setuid root > > --8<---------------cut here---------------end--------------->8--- >=20 > So, '/run/setuid-programs/mount' is somehow resolving to > '/run/current-system/profile/sbin/mount.davfs'? >=20 > The executables in /run/setuid-programs are not supposed to be links. >=20 =46rom the ./configure script in davfs2: Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor dav_user if invoked by root, mount.davfs runs as this user [davfs2] dav_group the group, the mount.davfs daemon belongs to [davfs2] ssbindir where mount will search for mount-helpers [/sbin] dav_localstatedir directory to store pid-files in [/var/run] dav_syscachedir cache directory [/var/cache] LINGUAS select languages for messages and documentation I've attached a diff against guix and also a davfs.scm for building just the modified davfs2. Can you try building it with `guix build -f davfs.scm` and then use the mount.davfs from there to try mounting your davfs mountpoint? --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --VrrxKvqRb8yTIBka Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="davfs-adjust-setuid-directory.diff" Content-Transfer-Encoding: quoted-printable diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index d970fe7198..13da2a54b4 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -212,7 +212,7 @@ another location, similar to @command{mount --bind}. I= t can be used for: (list "--sysconfdir=3D/etc" ; so man pages & binaries contai= n /etc (string-append "--docdir=3D" (assoc-ref %outputs "out") "/share/doc/" ,name "-" ,version) - (string-append "ssbindir=3D" (assoc-ref %outputs "out") "/sbi= n") + "ssbindir=3D/run/setuid-programs" ;; The default =E2=80=98davfs2=E2=80=99 user and group don't = exist on most systems. "dav_user=3Dnobody" "dav_group=3Dnogroup") @@ -226,6 +226,11 @@ another location, similar to @command{mount --bind}. = It can be used for: _ prefix suffix) (string-append prefix suffix))) #t)) + (add-after 'unpack 'dont-install-to-/run/setuid-programs + (lambda _ + (substitute* "src/Makefile.in" + (("ssbindir") "sbindir")) + #t)) (add-after 'unpack 'patch-file-names (lambda _ ;; Don't auto-load the FUSE kernel module. That's up to root. --VrrxKvqRb8yTIBka Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="davfs.scm" Content-Transfer-Encoding: quoted-printable (use-modules (guix packages) (guix utils) (gnu packages file-systems)) (package (inherit davfs2) (name (package-name davfs2)) (version (package-version davfs2)) (arguments (substitute-keyword-arguments (package-arguments davfs2) ((#:configure-flags cf) `(list "--sysconfdir=3D/etc" ; so man pages & binaries contain= /etc (string-append "--docdir=3D" (assoc-ref %outputs "out") "/share/doc/" ,name "-" ,version) "ssbindir=3D/run/setuid-programs" ;; The default =E2=80=98davfs2=E2=80=99 user and group don't e= xist on most systems. "dav_user=3Dnobody" "dav_group=3Dnogroup")) ((#:phases phases) `(modify-phases ,phases (add-after 'unpack 'dont-install-to-/run/setuid-programs (lambda _ (substitute* "src/Makefile.in" (("ssbindir") "sbindir")) #t))))))) --VrrxKvqRb8yTIBka-- --hUyGuv++fqjiadDS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmB+gMoACgkQQarn3Mo9 g1EUpw//Xv+V3nDVXJabcyDO71WTFzYiaHIf8mIb0ZdL65SkZwoqjKYbHiMRTRTY MTCwE9vbNdGA8+f3ZRvsg1uH3onLAUWcMQ1Y4kHG5JAw82qKc6aNCZU07nfztqDb ygftEJjGB3KafSK1AkfO2YWLh+eLqeH9ypIKnmb1GLAswaghDHI/L4Sd9K8b5ENf DlBohGch4lO/QICDCv8FImJlTCEHhfAyUAzYlpaQh0x/R574l/Txmif5PXBrHLLr uiVpUrEbznZU2/3tjWo067o0Ugjp/Kngi2JkQngzKidlO1+d61sfeHw3yae9kTmS HDEq5fydp1Z09nB6f3OFjs8dCVhljSfQXx2C71Twl4LlCoJQ798eBgq2fwr8cSCV yTHsVY0YT0zxDFzk4JFABBMEF3KvxJ94zUKcQzTu6fjs02D/F1qXFtqyk2BP4EhJ 96+JpXiy5OjXzqp2d4eDc+H7RxgP30/eNnRlYeJ1/rfEUNHLXuh7Qm3mRJXYlCV3 RorG44cq7oE7XrJ7ZePaNvZQpJq6uKk9OzwfE5XY6XGratiHf9OinEVbkU/2BH4V j9SHlhDFNwGetR+dyB4mc8c+h9WXaAtFx43DEq0kF86tzCcZUa7GbvILIg0BL5sf +2yTi7Gl/BYNmBv9NCQ5CXE24ieb2bXq7RnI26ncXwBJ4szuR4c= =FUcs -----END PGP SIGNATURE----- --hUyGuv++fqjiadDS--