Debian Codegraph @

myproxy-passphrase-policy

raw
1 #!/usr/bin/perl -T
2
3 ($username, $dn, $credname, $retriever_policy, $renewer_policy) = @ARGV;
4 chomp($passphrase = <STDIN>);
5
6 use Crypt::Cracklib; # if missing, install with:
7 # perl -MCPAN -e 'install Crypt::Cracklib'
8
9 if ($passphrase eq "") {
10 exit(0); # allow empty passphrase for other auth methods
11 }
12
13 $reason = fascist_check($passphrase);
14 if ($reason ne "ok") {
15 print $reason, "\n";
16 exit(1);
17 }
18
19 exit(0);