Skip to contentSkip to conversation

Patch for ksmbd-tools (issue #222)

PATCH 김영훈 2 participants 2 messages Dec 30, 2021 – Jan 2, 2022

Subsystems (2)
lore
Share & tools
lore

김영훈

author
#0 lore raw

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

addshare/addshare.c +3 -3
index 7458b6c..3c997e1 100644
@@ -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[])
adduser/adduser.c +3 -3
index 5ffb296..7f7988b 100644
@@ -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[])
maintainer
#1 lore raw

2021-12-30 17:15 GMT+09:00, 김영훈 <[email protected]>:

Quoted 1 line

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

Hi Younghun,

Quoted 5 lines

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!

Quoted 4 lines

Thank you.

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