/usr/share/doc/libauthen-libwrap-perl/examples/example.pl is in libauthen-libwrap-perl 0.23-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 | use Authen::Libwrap qw( hosts_ctl STRING_UNKNOWN );
$rc = hosts_ctl( "james", "localhost", "127.0.0.1", STRING_UNKNOWN );
print "Access is ", $rc ? "granted" : "refused", "\n";
$rc = hosts_ctl( "james", "expn.ehlo.com", "10.1.1.2", STRING_UNKNOWN );
print "Access is ", $rc ? "granted" : "refused", "\n";
$Authen::Libwrap::DEBUG = 1;
$rc = hosts_ctl( "james", "vrfy.ehlo.com", "10.1.1.1", "STRING_UNKNOWN" );
print "Access is ", $rc ? "granted" : "refused", "\n";
|