diff options
| author | Paulo Alcantara <pc@manguebit.org> | 2026-10-12 00:06:53 -0300 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-10-13 00:52:24 -0300 |
| commit | ea0261b23fa5baedbfef1c8d45aeeb2627c0330a (patch) | |
| tree | 78bb8eadfbd6b6d3b663132d87fb144a3408bebd | |
| parent | 34e037c98a5de07559ec2693a1e4998762f0c00d (diff) | |
| download | linux-ea0261b23fa5baedbfef1c8d45aeeb2627c0330a.tar.gz linux-ea0261b23fa5baedbfef1c8d45aeeb2627c0330a.zip | |
smb: client: drop redundant nls_table arg from decode_unicode_ssetup()
The nls codepage passed to decode_unicode_ssetup() is always
ses->local_nls, so derive it from @ses and drop the parameter.
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Cc: Shyam Prasad N <sprasad@microsoft.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Bharath SM <bharathsm@microsoft.com>
| -rw-r--r-- | fs/smb/client/smb1session.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/smb/client/smb1session.c b/fs/smb/client/smb1session.c index df2d3eea898d..d1ea7e0b2d58 100644 --- a/fs/smb/client/smb1session.c +++ b/fs/smb/client/smb1session.c @@ -215,9 +215,8 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses) *pbcc_area = bcc_ptr; } -static void -decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses, - const struct nls_table *nls_cp) +static void decode_unicode_ssetup(char **pbcc_area, int bleft, + struct cifs_ses *ses) { int len; char *data = *pbcc_area; @@ -225,7 +224,8 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses, cifs_dbg(FYI, "bleft %d\n", bleft); kfree(ses->serverOS); - ses->serverOS = cifs_strndup_from_utf16(data, bleft, true, nls_cp); + ses->serverOS = cifs_strndup_from_utf16(data, bleft, true, + ses->local_nls); cifs_dbg(FYI, "serverOS=%s\n", ses->serverOS); len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; data += len; @@ -234,7 +234,8 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses, return; kfree(ses->serverNOS); - ses->serverNOS = cifs_strndup_from_utf16(data, bleft, true, nls_cp); + ses->serverNOS = cifs_strndup_from_utf16(data, bleft, true, + ses->local_nls); cifs_dbg(FYI, "serverNOS=%s\n", ses->serverNOS); len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; data += len; @@ -243,7 +244,8 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses, return; kfree(ses->serverDomain); - ses->serverDomain = cifs_strndup_from_utf16(data, bleft, true, nls_cp); + ses->serverDomain = cifs_strndup_from_utf16(data, bleft, true, + ses->local_nls); cifs_dbg(FYI, "serverDomain=%s\n", ses->serverDomain); return; @@ -504,8 +506,7 @@ sess_auth_ntlmv2(struct sess_data *sess_data) ++bcc_ptr; --bytes_remaining; } - decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, - sess_data->nls_cp); + decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses); } else { decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, sess_data->nls_cp); @@ -640,8 +641,7 @@ sess_auth_kerberos(struct sess_data *sess_data) ++bcc_ptr; --bytes_remaining; } - decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, - sess_data->nls_cp); + decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses); } else { decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, sess_data->nls_cp); @@ -891,8 +891,7 @@ sess_auth_rawntlmssp_authenticate(struct sess_data *sess_data) ++bcc_ptr; --bytes_remaining; } - decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, - sess_data->nls_cp); + decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses); } else { decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, sess_data->nls_cp); |
