unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: 宋文武 <iyzsong@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] system: Make PAM use SHA-512 to encrypt passwords.
Date: Sun, 23 Aug 2015 06:44:18 +0800	[thread overview]
Message-ID: <87bndzymd9.fsf@gmail.com> (raw)
In-Reply-To: <87a8tjrzwi.fsf@netris.org>

[-- 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


  reply	other threads:[~2015-08-22 22:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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     ` 宋文武 [this message]
2015-08-23 21:36       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bndzymd9.fsf@gmail.com \
    --to=iyzsong@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).