File: myproxy-passphrase-policy

package info (click to toggle)
myproxy 6.1.22-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,628 kB
  • ctags: 1,812
  • sloc: ansic: 25,183; sh: 11,726; perl: 3,673; makefile: 361
file content (19 lines) | stat: -rwxr-xr-x 440 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl -T

($username, $dn, $credname, $retriever_policy, $renewer_policy) = @ARGV;
chomp($passphrase = <STDIN>);

use Crypt::Cracklib; # if missing, install with:
                     #   perl -MCPAN -e 'install Crypt::Cracklib'

if ($passphrase eq "") {
    exit(0);	# allow empty passphrase for other auth methods
}

$reason = fascist_check($passphrase);
if ($reason ne "ok") {
    print $reason, "\n";
    exit(1);
}

exit(0);