From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id +MQyJJYKfGYTKgAAe85BDQ:P1 (envelope-from ) for ; Wed, 26 Jun 2024 12:33:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id +MQyJJYKfGYTKgAAe85BDQ (envelope-from ) for ; Wed, 26 Jun 2024 14:33:26 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0002 header.b=oOpPePAq; dkim=fail ("headers eddsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0003 header.b=U8+gkQ2z; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:strato.com:reject}") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719405206; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tG7hVpElqw2u0sDNWhlHnnhJPcxS60HtendWCc+HzVk=; b=K9IcjRU3e/vU+rKH++C50jgFrLhzwrEtr8qTPBy4rr7usvFdGic3a0DQYisHKz+gN2gQ0o iJZUdbGW0N8iJ5Nfiki8hs5Uc4ZcicDXCzMx3sU8GqT0XoZYMK+TpPYOKJNxtVXBi8sOAd zKypzbZMmVe4u3gvppymOKeTGljHsBSwzzfWojUwfpSgaJL783ts4iuw1TKG7M/ed9l+lV zgqVOoP/uKD0i3FxMSKHHipCITf1eIm47+kGJB7ULDm2De0iTIWIZ0LzyJixyiOHEZ2mpL /4h82/4JBK6GbKaWXCTWZIpnExT4+zHHyR8B1Yp5HIvSjygunEJEkbcuIs+E1A== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0002 header.b=oOpPePAq; dkim=fail ("headers eddsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0003 header.b=U8+gkQ2z; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:strato.com:reject}") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1719405206; a=rsa-sha256; cv=fail; b=FlS5pJvZussR8Cm16/O+lArZuhBc+l4qTLJ58uj/3jHYof82bCqazd714IoMpEU/DHVgHy tGuV7NlxuOyzZhdCemtImJejoZ1jVTdpKsxpopNFZ3PHYfm7Pgs944RVGV1bQGC6/TuSe7 j39nm3GQiw0pa0elbKPM+J95ewBD3relMdjqJg/dQq6rWTAT8P7CfIh7pagDT+r9wbR5Fb l1Bq/Jg2oZB+0wch4syH+4XqUKHa8XwhzhGnTVRQSnxVkC2K6fg6+QwdgIJx5JwyBogsm0 Qn/W36sc0YSwU6oZ+jOuN4osNA9p12yUtDk0+m4vskQ30fsEev1ZYFXIT6V/QQ== 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 4250A57F59 for ; Wed, 26 Jun 2024 14:33:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMRph-00005l-35; Wed, 26 Jun 2024 08:33:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMRpc-00005E-Ks for guix-patches@gnu.org; Wed, 26 Jun 2024 08:33:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMRpc-00073M-C5 for guix-patches@gnu.org; Wed, 26 Jun 2024 08:33:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sMRpe-0007BK-Hn for guix-patches@gnu.org; Wed, 26 Jun 2024 08:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71594] [PATCH] file-systems: Allow specifying CIFS credentials in a file. Resent-From: guix@ikherbers.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 26 Jun 2024 12:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71594 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Richard Sent Cc: 71594@debbugs.gnu.org Received: via spool by 71594-submit@debbugs.gnu.org id=B71594.171940518027595 (code B ref 71594); Wed, 26 Jun 2024 12:33:02 +0000 Received: (at 71594) by debbugs.gnu.org; 26 Jun 2024 12:33:00 +0000 Received: from localhost ([127.0.0.1]:38735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMRpb-0007B0-GV for submit@debbugs.gnu.org; Wed, 26 Jun 2024 08:32:59 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.22]:38327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMRpZ-0007Aq-Dv for 71594@debbugs.gnu.org; Wed, 26 Jun 2024 08:32:58 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1719405171; cv=none; d=strato.com; s=strato-dkim-0002; b=K17oxvPPGL2IniRBvVwFFfABmzFm/oaHROjs+4btDoZfU4YFpX923WPmJAKo2LSPRW x7YqybD8rYYqYpxh583EvkmkqhIlcQzMsHq0ZCjAxyETD3cH7/mXOScFPfdLfrrFqy6u VtK0evzj9QBE2hqIPNfU0aFBsR3EcUJV6VNOMWRnxLCopOhT197ud/r7LOXRpfby5KP/ kd/5Fhvak+EzntKpds+/9YYgWlaEUgh4o41z4shuJgKzR3E9/R2IvGYDniTMMAs/+Yc/ TXlr6uL/VD4hGp34zWI92Znk2Z6EBPL+2HQFMOq7PrWT/4Gwylq1+92J0IOiHcCXvfJ5 soqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1719405171; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=tG7hVpElqw2u0sDNWhlHnnhJPcxS60HtendWCc+HzVk=; b=n45vkLbk8Yi7SAEksltp63Rr8b8t0UGA/szhhjbRTGoWjrFSaX2XpmMzEwXUeXnhXP oumeLLsmIKseHk2XKUIXUXbiKQ9k2Li0HFkHitZskuSQafjzlg1EV5VN2wvzD2Ti+a6H Xkg/txlUCfIPr2rN8FObZRroQPQrSQj2A++gyE1bc/tbna+6KFpPQDz6AXbP3SepJImL JOcU7awhHPySf/C7oYPEbSifQ/++H+C0z+itCbtFZ+eUy9mCp0bEENLatcU8a3d82dcr LLGMZ0ztQ4x5OPsV2MCYCFYwGhM6LDLlW/10muzFbedr2DYLaBiJF1CNG2iDm2E+Zy3M aGKw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1719405171; s=strato-dkim-0002; d=ikherbers.com; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=tG7hVpElqw2u0sDNWhlHnnhJPcxS60HtendWCc+HzVk=; b=oOpPePAqL+pLSpWc5/W3uvfD22ETnnGyQ8pFcRFZHIGS16ywTNH+qLHi/KUFJ/pBcX 7HYPWtyggOB+M5ukrot9iY1wghxA82Cr2rx0IsyKZJf9M+ArINedPj062Qhjd0OIPkCe NEtRHVmFAqTumRMuhn/Bi7EMZt0Xkwb5KP/SZyJdE3a6lXowuAWgNbVGYZRpPUrBmono oANCERgGZinynsTBnWc+QwSgksJZwo+t07kC7ds2NyuXR6GeA3YcNXKuYMWClUjBOZ/K NR7eugv4Tb6SztMUePXTnb0u2R3hdE3Cuso3pmHzWzGaLVZiDxh7HzWUizEHvzCSAF8q a50w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1719405171; s=strato-dkim-0003; d=ikherbers.com; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=tG7hVpElqw2u0sDNWhlHnnhJPcxS60HtendWCc+HzVk=; b=U8+gkQ2z6ZXJjg2MB0AT2tmZv8esJfQdFvWlFjv3lovyF8mPkvmCGLOBzzPWZcug0E im/W/y1xNdZWMaa42LCA== X-RZG-AUTH: ":IUwNfkitaf3qOWm2b/jA5tveVwUUcwH3PkiYp6DPxTDDEo4xO9SmHnazdiAbr2/cSH21Hw==" Received: from lambda.localdomain by smtp.strato.de (RZmta 50.5.0 DYNA|AUTH) with ESMTPSA id 507f1505QCWo1bI (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 26 Jun 2024 14:32:50 +0200 (CEST) Date: Wed, 26 Jun 2024 14:32:50 +0200 From: guix@ikherbers.com Message-ID: References: <434a45cea2afc5e4de5af5b15bc732b7587a979a.1718550930.git.guix@ikherbers.com> <877cem1hk1.fsf@freakingpenguin.com> <87v823r654.fsf@freakingpenguin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <87v823r654.fsf@freakingpenguin.com> Content-Transfer-Encoding: 7bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 4250A57F59 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -3.87 X-Spam-Score: -3.87 X-TUID: zl9b1TLXeO+r Hi! On 2024-06-20T11:22:15-0400, Richard Sent wrote: >Hi vicvbcun! > >vicvbcun writes: > >> Hi, >> >> thanks for the review! > >>> I believe CIFS will add a password2 mount option in 6.9.4 [1]. We should >>> check if mount.cifs supports putting that option in the credentials file >>> and match their behavior. If that's too much an ask (Guix's mount.cifs >>> may not be new enough), I think a comment or proactive bug report is >>> appropriate. >> >> Looking at the latest version of mount.cifs[0], it doesn't seem to >> handle `password2' intentionally: Passing `password2' on the command >> line should work, but only because the return value of `parse_opt_token' >> is not checked for `OPT_ERROR'; in a credentials file it is accepted (as >> `parse_cred_line' only checks for a "pass" prefix) but passed as >> `password' instead. >> >> I think that being able to specify `password2' in a credentials file >> makes sense and my patch doesn't forbid it. >> >> If exposing an interface identical to that of `mount.cifs' and >> preserving the exact semantics (e.g `mount.cifs' complains when multiple >> passwords are specified and takes the first one) is the ultimate goal, >> I'd just shell out to `mount.cifs'. I certainly won't implement all the >> idiosyncrasies :). >> >> 0: https://git.samba.org/?p=cifs-utils.git;a=blob;f=mount.cifs.c;h=3b7a6b3c22e8c3b563c7ea92ecb9891fdfac01a6;hb=refs/heads/for-next > >Agreed, emulating mount.cifs in totality is too much. My concern with >divergences in functionality is most users will read mount.cifs >documentation for CIFS mount-options and whatnot, then potentially get >bit when Guix does something different. >In this case the divergence is small and shouldn't cause issues. As long as what Guix offers is a superset, feature requests won't be sent our way :). With the patch, I think there is should be a reasonable match between the behaviour as documented in mount.cifs(8) and that of Guix. >I think a XXX: style comment is appropriate. > >--8<---------------cut here---------------start------------->8--- >;; Read password, user and domain options from file >;; >;; XXX: Unlike mount.cifs this function reads password2 in the >;; credential file and returns it separately from password. >--8<---------------cut here---------------end--------------->8--- done, I have elaborated a bit more though >I wouldn't be surprised if mount.cifs eventually adopts the same >behavior. I can't think of a reason why putting password2 in the >credentials file shouldn't be supported. The `password2' options is seems mainly useful for remounting when a new password is available. Creating a temporary credential file might be considered overcomplicated. I suspect that when developing the feature it just worked when specified on the command line and was forgotten about subsequently. > >-- >Take it easy, >Richard Sent >Making my computer weirder one commit at a time. vicvbcun