Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.com>
To: Steve French <smfrench@gmail.com>,
	Meetakshi Setiya <meetakshisetiyaoss@gmail.com>
Cc: Adam Williamson <awilliam@redhat.com>, linux-cifs@vger.kernel.org
Subject: Re: [PATCH] smb: client: fix regression with guest option
Date: Wed, 12 Mar 2025 13:23:19 -0300	[thread overview]
Message-ID: <9ef1d7140c93877011e7ca5fdcd13ec4@manguebit.com> (raw)
In-Reply-To: <CAH2r5mu5=nnBwibmARGoLepbQfU6qkXnez8whaWaSM7G7MEVXw@mail.gmail.com>

Steve French <smfrench@gmail.com> writes:

> Meetakshi sent a patch idea to try (to also fix this in cifs-utils) -
> will take a look

Where is the patch?

Something like below would work

diff --git a/mount.cifs.c b/mount.cifs.c
index 7605130..16730c6 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -200,6 +200,7 @@ struct parsed_mount_info {
        unsigned int got_domain:1;
        unsigned int is_krb5:1;
        unsigned int is_noauth:1;
+       unsigned int is_guest:1;
        uid_t sudo_uid;
 };
 
@@ -1161,6 +1162,7 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
                        parsed_info->got_user = 1;
                        parsed_info->got_password = 1;
                        parsed_info->got_password2 = 1;
+                       parsed_info->is_guest = 1;
                        goto nocopy;
                case OPT_RO:
                        *filesys_flags |= MS_RDONLY;
@@ -2334,7 +2336,9 @@ mount_retry:
                fprintf(stderr, "%s kernel mount options: %s",
                        thisprogram, options);
 
-       if (parsed_info->got_password && !(parsed_info->is_krb5 || parsed_info->is_noauth)) {
+       if (parsed_info->got_password &&
+           !(parsed_info->is_krb5 || parsed_info->is_noauth ||
+             parsed_info->is_guest)) {
                /*
                 * Commas have to be doubled, or else they will
                 * look like the parameter separator
@@ -2345,7 +2349,9 @@ mount_retry:
                        fprintf(stderr, ",pass=********");
        }
 
-       if (parsed_info->got_password2 && !(parsed_info->is_krb5 || parsed_info->is_noauth)) {
+       if (parsed_info->got_password2 &&
+           !(parsed_info->is_krb5 || parsed_info->is_noauth ||
+             parsed_info->is_guest)) {
                strlcat(options, ",password2=", options_size);
                strlcat(options, parsed_info->password2, options_size);
                if (parsed_info->verboseflag)

  reply	other threads:[~2025-03-12 16:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12 13:51 [PATCH] smb: client: fix regression with guest option Paulo Alcantara
2025-03-12 15:32 ` Steve French
2025-03-12 15:51   ` Adam Williamson
2025-03-12 16:02     ` Paulo Alcantara
2025-03-12 16:06       ` Steve French
2025-03-12 16:23         ` Paulo Alcantara [this message]
2025-03-15  7:09           ` Meetakshi Setiya
2025-03-17 12:46             ` Paulo Alcantara
2025-03-17 21:29             ` Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ef1d7140c93877011e7ca5fdcd13ec4@manguebit.com \
    --to=pc@manguebit.com \
    --cc=awilliam@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=meetakshisetiyaoss@gmail.com \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox