Re: [PATCH] ksmbd-tools: set a minimum character limit for password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2021-10-10 0:12 GMT+09:00, Steve French <smfrench@xxxxxxxxx>:
> 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@xxxxxxxxxx> wrote:
>
>> Set minimum password length with 8 characters by default to protect
>> passwords vulnerable.
>>
>> Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxxx>
>> ---
>>  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
>>
>>
>



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux