support for linux

This commit is contained in:
eknauel 2004-11-12 13:13:58 +00:00
parent d016ba79d9
commit 08b2fa0f6f
1 changed files with 24 additions and 12 deletions

View File

@ -96,7 +96,7 @@ Please choose a password with at least 2 character classes.")
(cond
((string=? systype "sun4x_59") 'solaris)
((string=? systype "i386_fbsd52") 'freebsd)
((string=? systype "i386_linux24") 'linux)
((string=? systype "i386_rh90") 'linux)
(else (raise-unsupported-machine)))))
;; *** general password interface ************************************
@ -226,17 +226,22 @@ Please choose a password with at least 2 character classes.")
"Password incorrect while getting initial ticket"
"Password mismatch while reading password"
"Password changed."))
;; ((linux) (define-passwd "/afs/wsi/i386_rh90/heimdal-0.6/bin/kpasswd"
;; ;; TODO
;; ))
))
((linux) (define-passwd "/afs/wsi/i386_rh90/heimdal-0.6/bin/kpasswd"
"Password: "
"New password: "
"Verifying - New password: "
"kpasswd: Password incorrect"
"Verify failure"
"Success"))))
(define kerbv-programs
(case system-type
((freebsd) (cons "/afs/wsi/i386_fbsd52/heimdal-1.6/bin/klist"
"/afs/wsi/i386_fbsd52/heimdal-1.6/bin/kinit"))
((solaris) (cons "/afs/wsi/sun4x_58/heimdal-0.6/bin/klist"
"/afs/wsi/sun4x_58/heimdal-0.6/bin/kinit"))))
"/afs/wsi/sun4x_58/heimdal-0.6/bin/kinit"))
((linux) (cons "/afs/wsi/i386_rh90/heimdal-0.6/bin/klist"
"/afs/wsi/i386_rh90/heimdal-0.6/bin/kinit"))))
(define (verify-kerbv-password password)
(verify-password kerberos-v password))
@ -284,6 +289,7 @@ Please choose a password with at least 2 character classes.")
"Retype new password: "
;; Attention: the old password is checked AFTER the
;; new password is entered! So verify will not work!
;; However: changing old-pw to old-pw works fine
"kpasswd: Incorrect old password."
"Mismatch"
"Password changed."))
@ -294,10 +300,16 @@ Please choose a password with at least 2 character classes.")
"kpasswd: Incorrect old password."
"Mismatch"
"Password changed."))
;; ((linux) (define-passwd "/usr/bin/kpasswd"
;; ;; TODO
;; ))
))
((linux) (define-passwd "/afs/wsi/i386_rh90/openafs-1.2.11/bin/kpasswd"
"Old password: "
(rx "New password (RETURN to abort): ")
"Retype new password: "
;; Attention: the old password is checked AFTER the
;; new password is entered! So verify will not work!
;; However: changing old-pw to old-pw works fine
"kpasswd: Incorrect old password."
"Mismatch"
"Password changed."))))
(define (change-afs-password old-pw new-pw)
(change-password afs old-pw new-pw))
@ -389,7 +401,7 @@ Please choose a password with at least 2 character classes.")
(define (display-usage)
(display "Usage: passwd-wrapper.scm\n")
(display "Change NIS, Kerberos IV and Kerberos V passwords at once.\n")
(display "Written by David Frese.\n"))
(display "Written by Eric Knauel and David Frese.\n"))
(define (main args)
(set-interrupt-handler interrupt/int (lambda a (values)))
@ -397,7 +409,7 @@ Please choose a password with at least 2 character classes.")
(set-interrupt-handler interrupt/quit (lambda a (values)))
(if (null? (cdr args))
(case system-type
((freebsd solaris)
((freebsd solaris linux)
(let ((old-pw (ask/check-old-password))
(new-pw (ask-new-password)))
(if (not (ensure-kerbv-ticket old-pw))