diff --git a/examples/passwd-wrapper.scm b/examples/passwd-wrapper.scm index 8cd5342..d885821 100755 --- a/examples/passwd-wrapper.scm +++ b/examples/passwd-wrapper.scm @@ -1,5 +1,5 @@ #!/bin/sh -exec scsh -lm ../scheme/packages.scm -o threads -o chat -o expect -o let-opt -e main -s "$0" "$@" +exec scsh -lel expect/load.scm -o threads -o expect -o let-opt -e main -s "$0" "$@" !# ;; TODO: @@ -208,9 +208,13 @@ Please choose a password with at least 2 character classes.") "kpasswd: Password incorrect" "Verify failure" "Success")) + ((solaris) (define-passwd "/afs/wsi/sun4x_58/krb5-1.3.1/bin/kpasswd" + ;; TODO + )) +;; ((linux) (define-passwd "/afs/wsi/i386_rh90/heimdal-0.6/bin/kpasswd" +;; ;; TODO +;; )) )) - ;;((solaris) (define-passwd "/afs/wsi/sun4x_58/krb5-1.3.1/bin/kpasswd" - ;; TODO)) (define (verify-kerbv-password password) (verify-password kerberos-v password)) @@ -218,6 +222,19 @@ Please choose a password with at least 2 character classes.") (define (change-kerbv-password old-pw new-pw) (change-password kerberos-v old-pw new-pw)) +(define (valid-kerbv-ticket?) + ;; neither "No ticket file" nor ">>>Expired<<<" in klist output + #f ;; TODO + ) + +(define (get-kerbv-ticket password) + ;; TODO look at status result + (run (kinit))) + +(define (ensure-kerbv-ticket password) + (or (valid-kerbv-ticket?) + (get-kerbv-ticket password))) + ;; *** AFS (Kerberos IV) interface *********************************** (define afs @@ -231,9 +248,17 @@ Please choose a password with at least 2 character classes.") "kpasswd: Incorrect old password." "Mismatch" "Password changed.")) + ((solaris) (define-passwd "/afs/wsi/sun4x_58/openafs-1.2.11/bin/kpasswd" + "Old password: " + "New password (RETURN to abort): " + "Retype new password: " + "kpasswd: Incorrect old password." + "Mismatch" + "Password changed.")) +;; ((linux) (define-passwd "/usr/bin/kpasswd" +;; ;; TODO +;; )) )) - ;;((solaris) (define-passwd "/afs/wsi/sun4x_58/openafs-1.2.11/bin/kpasswd" - ;; TODO)) (define (change-afs-password old-pw new-pw) (change-password afs old-pw new-pw))