unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] system: Make PAM use SHA-512 to encrypt passwords.
@ 2015-08-22 14:28 宋文武
  2015-08-22 15:01 ` 宋文武
  0 siblings, 1 reply; 5+ messages in thread
From: 宋文武 @ 2015-08-22 14:28 UTC (permalink / raw)
  To: guix-devel

Fixes <https://bugs.gnu.org/21318>.

* gnu/system/linux.scm (unix-pam-service)[password]: Add 'sha512'
  to arguments.
---
 gnu/system/linux.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm
index aaaa8c6..cc2eabe 100644
--- a/gnu/system/linux.scm
+++ b/gnu/system/linux.scm
@@ -148,7 +148,10 @@ should be the name of a file used as the message-of-the-day."
                           (module "pam_unix.so")
                           (arguments '("nullok")))
                          unix)))
-         (password (list unix))
+         (password (list (pam-entry
+                          (control "required")
+                          (module "pam_unix.so")
+                          (arguments '("sha512")))))
          (session (if motd
                       (list unix
                             (pam-entry
-- 
2.4.3

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

* Re: [PATCH] system: Make PAM use SHA-512 to encrypt passwords.
  2015-08-22 14:28 [PATCH] system: Make PAM use SHA-512 to encrypt passwords 宋文武
@ 2015-08-22 15:01 ` 宋文武
  2015-08-22 17:33   ` Mark H Weaver
  0 siblings, 1 reply; 5+ messages in thread
From: 宋文武 @ 2015-08-22 15:01 UTC (permalink / raw)
  To: guix-devel

宋文武 <iyzsong@gmail.com> writes:

> Fixes <https://bugs.gnu.org/21318>.
>
> * gnu/system/linux.scm (unix-pam-service)[password]: Add 'sha512'
>   to arguments.
> ---
>  gnu/system/linux.scm | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm
> index aaaa8c6..cc2eabe 100644
> --- a/gnu/system/linux.scm
> +++ b/gnu/system/linux.scm
> @@ -148,7 +148,10 @@ should be the name of a file used as the message-of-the-day."
>                            (module "pam_unix.so")
>                            (arguments '("nullok")))
>                           unix)))
> -         (password (list unix))
> +         (password (list (pam-entry
> +                          (control "required")
> +                          (module "pam_unix.so")
> +                          (arguments '("sha512")))))
To store the hashed passwords in '/etc/shadow' (0600) instead of
'/etc/passwd' (0644), we should add 'shadow' to arguments too.
>           (session (if motd
>                        (list unix
>                              (pam-entry
> -- 
> 2.4.3

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

* Re: [PATCH] system: Make PAM use SHA-512 to encrypt passwords.
  2015-08-22 15:01 ` 宋文武
@ 2015-08-22 17:33   ` Mark H Weaver
  2015-08-22 22:44     ` 宋文武
  0 siblings, 1 reply; 5+ messages in thread
From: Mark H Weaver @ 2015-08-22 17:33 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> writes:

> 宋文武 <iyzsong@gmail.com> writes:
>
>> Fixes <https://bugs.gnu.org/21318>.
>>
>> * gnu/system/linux.scm (unix-pam-service)[password]: Add 'sha512'
>>   to arguments.
>> ---
>>  gnu/system/linux.scm | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm
>> index aaaa8c6..cc2eabe 100644
>> --- a/gnu/system/linux.scm
>> +++ b/gnu/system/linux.scm
>> @@ -148,7 +148,10 @@ should be the name of a file used as the message-of-the-day."
>>                            (module "pam_unix.so")
>>                            (arguments '("nullok")))
>>                           unix)))
>> -         (password (list unix))
>> +         (password (list (pam-entry
>> +                          (control "required")
>> +                          (module "pam_unix.so")
>> +                          (arguments '("sha512")))))
> To store the hashed passwords in '/etc/shadow' (0600) instead of
> '/etc/passwd' (0644), we should add 'shadow' to arguments too.

Can you send an updated patch?

   Thank you!
      Mark

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

* Re: [PATCH] system: Make PAM use SHA-512 to encrypt passwords.
  2015-08-22 17:33   ` Mark H Weaver
@ 2015-08-22 22:44     ` 宋文武
  2015-08-23 21:36       ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: 宋文武 @ 2015-08-22 22:44 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

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

Mark H Weaver <mhw@netris.org> writes:

>> 宋文武 <iyzsong@gmail.com> writes:
>> [...]
>> To store the hashed passwords in '/etc/shadow' (0600) instead of
>> '/etc/passwd' (0644), we should add 'shadow' to arguments too.
>
> Can you send an updated patch?
Sure:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-system-Make-PAM-store-SHA-512-encrypted-passwords-in.patch --]
[-- Type: text/x-patch, Size: 1181 bytes --]

From 34a324e398c521954cc275211eabd44a92906aad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
Date: Sun, 23 Aug 2015 06:33:59 +0800
Subject: [PATCH] system: Make PAM store SHA-512 encrypted passwords in
 /etc/shadow.

Fixes <http://bugs.gnu.org/21318>.

* gnu/system/linux.scm (unix-pam-service)[password]: Add 'sha512' and
  'shadow' to arguments.
---
 gnu/system/linux.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm
index aaaa8c6..a06b18e 100644
--- a/gnu/system/linux.scm
+++ b/gnu/system/linux.scm
@@ -148,7 +148,10 @@ should be the name of a file used as the message-of-the-day."
                           (module "pam_unix.so")
                           (arguments '("nullok")))
                          unix)))
-         (password (list unix))
+         (password (list (pam-entry
+                          (control "required")
+                          (module "pam_unix.so")
+                          (arguments '("sha512" "shadow")))))
          (session (if motd
                       (list unix
                             (pam-entry
-- 
2.4.3


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

* Re: [PATCH] system: Make PAM use SHA-512 to encrypt passwords.
  2015-08-22 22:44     ` 宋文武
@ 2015-08-23 21:36       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2015-08-23 21:36 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> From 34a324e398c521954cc275211eabd44a92906aad Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
> Date: Sun, 23 Aug 2015 06:33:59 +0800
> Subject: [PATCH] system: Make PAM store SHA-512 encrypted passwords in
>  /etc/shadow.
>
> Fixes <http://bugs.gnu.org/21318>.
>
> * gnu/system/linux.scm (unix-pam-service)[password]: Add 'sha512' and
>   'shadow' to arguments.

[...]

> -         (password (list unix))
> +         (password (list (pam-entry
> +                          (control "required")
> +                          (module "pam_unix.so")
> +                          (arguments '("sha512" "shadow")))))

One last thing: a one-line comment explaining what these arguments do.
Then OK to push ASAP!

Thanks to both of you!

Ludo’.

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

end of thread, other threads:[~2015-08-23 21:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-22 14:28 [PATCH] system: Make PAM use SHA-512 to encrypt passwords 宋文武
2015-08-22 15:01 ` 宋文武
2015-08-22 17:33   ` Mark H Weaver
2015-08-22 22:44     ` 宋文武
2015-08-23 21:36       ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).