picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 76fb47105de8f4a8122c699662a67912fde581d3
parent 8163fa995759e1d1eeafdaed9240e3fb661392fb
Author: Alexander Burger <abu@software-lab.de>
Date:   Thu, 23 May 2013 17:48:27 +0200

Default '*Salt' off
Diffstat:
Mlib/adm.l | 23+++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/lib/adm.l b/lib/adm.l @@ -1,10 +1,15 @@ -# 18may13abu +# 23may13abu # (c) Software Lab. Alexander Burger # *Salt *Login *Users *Perms -# crypt(3) algorithm, e.g. (16 . "$6$@1$") -(default *Salt (2 . "@1")) +# crypt(3) algorithm, e.g. (de *Salt 16 . "$6$@1$") +(de passwd (Str Salt) + (if *Salt + `(if (== 64 64) + '(native "libcrypt.so" "crypt" 'S Str (or Salt (salt))) + '(ext:Crypt Str (or Salt (salt))) ) + Str ) ) (de salt () (text (cdr *Salt) (randpw (car *Salt))) ) @@ -22,19 +27,9 @@ (range 97 122) ) ) (inc (& 63 (rd 1))) ) ) ) ) ) ) -(de passwd (Str Salt) - (if *Salt - `(if (== 64 64) - '(native "libcrypt.so" "crypt" 'S Str (or Salt (salt))) - '(ext:Crypt Str (or Salt (salt))) ) - Str ) ) - (de auth (Nm Pw) (with (db 'nm '+User Nm) - (and - (or - (= (: pw) Pw) - (= (: pw) (passwd Pw (: pw))) ) + (when (= (: pw) (passwd Pw (: pw))) This ) ) ) ### Login ###