diff options
author | glebius <glebius@FreeBSD.org> | 2015-10-26 11:37:31 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-10-26 11:37:31 +0000 |
commit | 81511473d32294dc562d10f7b3e97630ccf0b64f (patch) | |
tree | 83f2b5fa5bca87e28ea638c9459aebb211698059 /contrib/ntp/scripts/ntptrace/ntptrace-opts | |
parent | a5a01b895b5c5a5a2f92fb611161c7c0f840a76a (diff) | |
download | FreeBSD-src-81511473d32294dc562d10f7b3e97630ccf0b64f.zip FreeBSD-src-81511473d32294dc562d10f7b3e97630ccf0b64f.tar.gz |
Upgrade NTP to 4.2.8p4.
Security: FreeBSD-SA-15:25.ntp
Security: CVE-2015-7871
Security: CVE-2015-7855
Security: CVE-2015-7854
Security: CVE-2015-7853
Security: CVE-2015-7852
Security: CVE-2015-7851
Security: CVE-2015-7850
Security: CVE-2015-7849
Security: CVE-2015-7848
Security: CVE-2015-7701
Security: CVE-2015-7703
Security: CVE-2015-7704, CVE-2015-7705
Security: CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
Approved by: so
Diffstat (limited to 'contrib/ntp/scripts/ntptrace/ntptrace-opts')
-rw-r--r-- | contrib/ntp/scripts/ntptrace/ntptrace-opts | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace-opts b/contrib/ntp/scripts/ntptrace/ntptrace-opts new file mode 100644 index 0000000..d6dbc53 --- /dev/null +++ b/contrib/ntp/scripts/ntptrace/ntptrace-opts @@ -0,0 +1,62 @@ +# EDIT THIS FILE WITH CAUTION (ntptrace-opts) +# +# It has been AutoGen-ed October 21, 2015 at 12:34:25 PM by AutoGen 5.18.5 +# From the definitions ntptrace-opts.def +# and the template file perlopt + +use Getopt::Long qw(GetOptionsFromArray); +Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always)); + +my $usage; + +sub usage { + my ($ret) = @_; + print STDERR $usage; + exit $ret; +} + +sub paged_usage { + my ($ret) = @_; + my $pager = $ENV{PAGER} || '(less || more)'; + + open STDOUT, "| $pager" or die "Can't fork a pager: $!"; + print $usage; + + exit $ret; +} + +sub processOptions { + my $args = shift; + + my $opts = { + 'numeric' => '', + 'max-hosts' => '99', + 'host' => '127.0.0.1', + 'help' => '', 'more-help' => '' + }; + my $argument = '[host]'; + my $ret = GetOptionsFromArray($args, $opts, ( + 'numeric|n', 'max-hosts|m=i', 'host|r=s', + 'help|?', 'more-help')); + + $usage = <<'USAGE'; +ntptrace - Trace peers of an NTP server - Ver. 4.2.8p4 +USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host] + + -n, --numeric Print IP addresses instead of hostnames + -m, --max-hosts=num Maximum number of peers to trace + -r, --host=str Single remote host + -?, --help Display usage information and exit + --more-help Pass the extended usage text through a pager + +Options are specified by doubled hyphens and their name or by a single +hyphen and the flag character. +USAGE + + usage(0) if $opts->{'help'}; + paged_usage(0) if $opts->{'more-help'}; + $_[0] = $opts; + return $ret; +} + +END { close STDOUT }; |