From f0f7861fb877e12b37ed16131db21ea68f436d3e Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 19 Feb 2008 18:29:24 +0000 Subject: Rename the -4 option to -k and fix a few bugs. --- contrib/used-principals | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/contrib/used-principals b/contrib/used-principals index d1522d1..f5abaf0 100755 --- a/contrib/used-principals +++ b/contrib/used-principals @@ -23,10 +23,10 @@ our %HOST_BASED = map { $_ => 1 } # Parse command-line options. my ($count, $help, $k4, $principals); Getopt::Long::config ('no_ignore_case', 'bundling'); -GetOptions ('4|k4|kerberos4=s' => \$k4, - 'c|count' => $count, +GetOptions ('c|count' => \$count, 'h|help' => \$help, - 'p|principals' => \$principals) or exit 1; + 'k|k4|kerberos4=s' => \$k4, + 'p|principals=s' => \$principals) or exit 1; if ($help) { print "Feeding myself to perldoc, please wait....\n"; exec ('perldoc', '-t', $0); @@ -113,7 +113,7 @@ used-principals - Report which Kerberos v5 principals are in use =head1 SYNOPSIS -B [B<-ch>] [B<-p> I [B<-4> I]] [I ...] +B [B<-ch>] [B<-p> I [B<-k> I]] [I ...] =head1 DESCRIPTION @@ -137,16 +137,6 @@ given set are active. =over 4 -=item B<-4> I, B<--k4>=I, B<--kerberos4>=I - -Meaningful only when used with the B<-p> option, this option says to -interpret the principals listed in that file as Kerberos v4 principal -names instead of Kerberos v5 principal names. They will be converted to -the corresponding Kerberos v5 principals before scanning the logs. -I is the local domain to append to host-based Kerberos v4 -principals (such as C, which becomes -C>). - =item B<-c>, B<--count> Instead of printing only an active principal, print the principal, a @@ -158,6 +148,16 @@ either obtaining a ticket or having a ticket obtained for it). Print out this documentation (which is done simply by feeding the script to C). +=item B<-k> I, B<--k4>=I, B<--kerberos4>=I + +Meaningful only when used with the B<-p> option, this option says to +interpret the principals listed in that file as Kerberos v4 principal +names instead of Kerberos v5 principal names. They will be converted to +the corresponding Kerberos v5 principals before scanning the logs. +I is the local domain to append to host-based Kerberos v4 +principals (such as C, which becomes +C>). + =item B<-p> I, B<--principals>=I Scan only for the principals listed in the file I and only report on -- cgit v1.2.3