linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch for ksmbd-tools (issue #222)
@ 2021-12-30  8:15 김영훈
  2022-01-02  7:21 ` Namjae Jeon
  0 siblings, 1 reply; 2+ messages in thread
From: 김영훈 @ 2021-12-30  8:15 UTC (permalink / raw)
  To: linux-cifs

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

Hello, I wrote an issue #222 in ksmbd-tools repository.

The one of the maintainers commented that I can send the patch to the mailing list.
I attached the patch generated with `git diff`.
I’ll also leave the original link for the issue below.

Thank you.

Issue link: https://github.com/cifsd-team/ksmbd-tools/issues/222

[-- Attachment #2: issue222.patch --]
[-- Type: application/octet-stream, Size: 832 bytes --]

diff --git a/addshare/addshare.c b/addshare/addshare.c
index 7458b6c..3c997e1 100644
--- a/addshare/addshare.c
+++ b/addshare/addshare.c
@@ -91,10 +91,10 @@ static int sanity_check_share_name_simple(char *name)
 		return -EINVAL;
 
 	for (i = 0; i < sz; i++) {
-		if (isalnum(name[i]))
-			return 0;
+		if (!isalnum(name[i]))
+			return -EINVAL;
 	}
-	return -EINVAL;
+	return 0;
 }
 
 int main(int argc, char *argv[])
diff --git a/adduser/adduser.c b/adduser/adduser.c
index 5ffb296..7f7988b 100644
--- a/adduser/adduser.c
+++ b/adduser/adduser.c
@@ -88,10 +88,10 @@ static int sanity_check_user_name_simple(char *uname)
 		return -EINVAL;
 
 	for (i = 0; i < sz; i++) {
-		if (isalnum(uname[i]))
-			return 0;
+		if (!isalnum(uname[i]))
+			return -EINVAL;
 	}
-	return -EINVAL;
+	return 0;
 }
 
 int main(int argc, char *argv[])

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Patch for ksmbd-tools (issue #222)
  2021-12-30  8:15 Patch for ksmbd-tools (issue #222) 김영훈
@ 2022-01-02  7:21 ` Namjae Jeon
  0 siblings, 0 replies; 2+ messages in thread
From: Namjae Jeon @ 2022-01-02  7:21 UTC (permalink / raw)
  To: 김영훈; +Cc: linux-cifs

2021-12-30 17:15 GMT+09:00, 김영훈 <lanph3re@gmail.com>:
> Hello, I wrote an issue #222 in ksmbd-tools repository.
Hi Younghun,

>
> The one of the maintainers commented that I can send the patch to the
> mailing list.
> I attached the patch generated with `git diff`.
> I’ll also leave the original link for the issue below.
First, Thanks for your patch. You need to create the patch using git commit.
Please refer the format of the patches in ksmbd-tools.
https://github.com/cifsd-team/ksmbd-tools/commits/master

Thanks!
>
> Thank you.
>
> Issue link: https://github.com/cifsd-team/ksmbd-tools/issues/222

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-02  7:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30  8:15 Patch for ksmbd-tools (issue #222) 김영훈
2022-01-02  7:21 ` Namjae Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).