All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ksmbd-tools: set a minimum character limit for password
@ 2021-10-09  5:49 Namjae Jeon
       [not found] ` <CAH2r5mtcGY1Aomh1LHDs=gwL68TEEmD9Qzf17+4C34MpqHhuqw@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Namjae Jeon @ 2021-10-09  5:49 UTC (permalink / raw)
  To: linux-cifs; +Cc: Namjae Jeon

Set minimum password length with 8 characters by default to protect
passwords vulnerable.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
---
 adduser/user_admin.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/adduser/user_admin.c b/adduser/user_admin.c
index 4e85915..36b9ad2 100644
--- a/adduser/user_admin.c
+++ b/adduser/user_admin.c
@@ -119,6 +119,11 @@ again:
 		goto again;
 	}
 
+	if (len <= 7) {
+		pr_err("Minimum password length is 8 characters\n");
+		goto again;
+	}
+
 	*sz = len;
 	free(pswd2);
 	return pswd1;
-- 
2.25.1


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

* Re: [PATCH] ksmbd-tools: set a minimum character limit for password
       [not found] ` <CAH2r5mtcGY1Aomh1LHDs=gwL68TEEmD9Qzf17+4C34MpqHhuqw@mail.gmail.com>
@ 2021-10-10  1:12   ` Namjae Jeon
  0 siblings, 0 replies; 2+ messages in thread
From: Namjae Jeon @ 2021-10-10  1:12 UTC (permalink / raw)
  To: Steve French; +Cc: CIFS

2021-10-10 0:12 GMT+09:00, Steve French <smfrench@gmail.com>:
> Maybe make it configurable but default to 8 as minimum!
Okay. I will check it.

Thanks!
>
> On Sat, Oct 9, 2021, 00:49 Namjae Jeon <linkinjeon@kernel.org> wrote:
>
>> Set minimum password length with 8 characters by default to protect
>> passwords vulnerable.
>>
>> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
>> ---
>>  adduser/user_admin.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/adduser/user_admin.c b/adduser/user_admin.c
>> index 4e85915..36b9ad2 100644
>> --- a/adduser/user_admin.c
>> +++ b/adduser/user_admin.c
>> @@ -119,6 +119,11 @@ again:
>>                 goto again;
>>         }
>>
>> +       if (len <= 7) {
>> +               pr_err("Minimum password length is 8 characters\n");
>> +               goto again;
>> +       }
>> +
>>         *sz = len;
>>         free(pswd2);
>>         return pswd1;
>> --
>> 2.25.1
>>
>>
>

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

end of thread, other threads:[~2021-10-10  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-09  5:49 [PATCH] ksmbd-tools: set a minimum character limit for password Namjae Jeon
     [not found] ` <CAH2r5mtcGY1Aomh1LHDs=gwL68TEEmD9Qzf17+4C34MpqHhuqw@mail.gmail.com>
2021-10-10  1:12   ` Namjae Jeon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.