From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AMCuMdFJdGZhgwEA62LTzQ:P1 (envelope-from ) for ; Thu, 20 Jun 2024 15:25:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AMCuMdFJdGZhgwEA62LTzQ (envelope-from ) for ; Thu, 20 Jun 2024 17:25:05 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=K8nUuQUn; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718897105; 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: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=xYm/wHq3V6p5NS3II9hr5bEJqyKFvqtAs31VKp/z+NY=; b=LqMYS5vet2kaZqYboTyuZajMWnQVgrMJGVOrkB8TeELFdfBWv4JqHnO1bpJg/ScNgX1jfJ YMD85Qc6q+De0CRKXEcSErbZU962hScrLkopURxleO2Z2brft7ipb7qoR32pfYUu6l0t1m BzXhzk9bMR/zn2WSQZWukAa1DLig0qgXlUnrbcsWkm3mndVQoGml5YEs1Ytt/u1JVsK3ZA 87ZghExk5IUnnySMTg4FlSWyjMd9t8Z9rqek7MWl7D+E5ouyHcUytgGo4xt/F4HXcQJ7kS d0mFJJg4oJNE6t6Je2lR4lfmFlQm6jTc8GKPLB6ph4S2rOBlW4t4BUThAfJyog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=K8nUuQUn; 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-Seal: i=1; s=key1; d=yhetil.org; t=1718897105; a=rsa-sha256; cv=none; b=O2LPtyysnLm++e/5SPlqAJORPoW6IRrv4Rm1df3HqINjK37qdJw8EunCg6BV/7hNZ26f1O cUrGbFOioIzP7avIrOc7s2Gr5/rbvtA15zLyvvVI4XFVe8QfFjzvnCBKqUvkVK8SArHu1c hJbLt+oIN0UiTT6ZEdvszJtq4lNFqNA3OCrDOHrYbnhTPcqmCXf2jV2kq53O8s8rNz8T8m rzzYqv2BjxDNsuGC4qkt03mYSR2AK98g5U+GtCYZoZ4o1/9LRjp6ovPo3JQMJSAW0zpdPQ LNnjPHUNo8OTI0nj8EZ17cZuNxIjwTeOAMcaVHn484ApgjlgQnAPwqcysLZLDA== 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 84EA2693A4 for ; Thu, 20 Jun 2024 17:25:05 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKJcu-0006Ka-3z; Thu, 20 Jun 2024 11:23:04 -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 1sKJcr-0006CV-CE for guix-patches@gnu.org; Thu, 20 Jun 2024 11:23:02 -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 1sKJcp-00085B-CW for guix-patches@gnu.org; Thu, 20 Jun 2024 11:22:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sKJcs-0004Zx-6J for guix-patches@gnu.org; Thu, 20 Jun 2024 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71594] [PATCH] file-systems: Allow specifying CIFS credentials in a file. Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 20 Jun 2024 15:23: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: vicvbcun Cc: 71594@debbugs.gnu.org Received: via spool by 71594-submit@debbugs.gnu.org id=B71594.171889696017555 (code B ref 71594); Thu, 20 Jun 2024 15:23:02 +0000 Received: (at 71594) by debbugs.gnu.org; 20 Jun 2024 15:22:40 +0000 Received: from localhost ([127.0.0.1]:33270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKJcU-0004Z1-VV for submit@debbugs.gnu.org; Thu, 20 Jun 2024 11:22:39 -0400 Received: from mail-108-mta123.mxroute.com ([136.175.108.123]:41013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKJcS-0004Yq-3M for 71594@debbugs.gnu.org; Thu, 20 Jun 2024 11:22:37 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta123.mxroute.com (ZoneMTA) with ESMTPSA id 190363dfa5900017a3.001 for <71594@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 20 Jun 2024 15:22:29 +0000 X-Zone-Loop: 1c16b64483e5c5d50cddecfa2dc9414fd26dd2228356 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xYm/wHq3V6p5NS3II9hr5bEJqyKFvqtAs31VKp/z+NY=; b=K8nUuQUnb793jjYwFEIjc0TLcb N/QinPBcoBH+MUUk6LN1iMGjCYPYOPHMX8IYMWb1VjaUQECUQeaoUcIjRD0zRu+YH5QWErNMD0vym 4EtOGLuv+Fjnwj04HV8rrV+Z6BcNxG0LXAahTrXrwB7zrVlsW98oVQ7OOPVBtNKNb42iIwWRNRoGF abnAJeJ/Wmg9BD9PcU6AJEze5LxZEa7qub6il5wq1t27Kx+rDg8ugESs6u2x1B1iIqMVMIFAYkURy U1niBh0+AZuAYekbwTGYpsFfdJWEwfQPRCMN2boQba2CBYvmL+YLHXneCuZ9ttgEZDNgIbxPOMyQg dbRgOR5g==; From: Richard Sent In-Reply-To: (vicvbcun's message of "Thu, 20 Jun 2024 15:16:32 +0200") References: <434a45cea2afc5e4de5af5b15bc732b7587a979a.1718550930.git.guix@ikherbers.com> <877cem1hk1.fsf@freakingpenguin.com> Date: Thu, 20 Jun 2024 11:22:15 -0400 Message-ID: <87v823r654.fsf@freakingpenguin.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: richard@freakingpenguin.com 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-Spam-Score: -6.36 X-Migadu-Queue-Id: 84EA2693A4 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.36 X-TUID: 6ai3gyvKKYd2 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. 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--- 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. -- Take it easy, Richard Sent Making my computer weirder one commit at a time.