#!%PERL%


use strict;

use Data::Dumper;
use lib '%VHFFS_LIB_DIR%';
use Vhffs::Main;
use Vhffs::Acl;
use Vhffs::Services::Mysql;

my $princ = init Vhffs::Main;

die("Usage: $0 dbname\n\tShows ACL for MySQL service dbname\n") unless(@ARGV == 1);

my ($dbname) = @ARGV;

my $sql = Vhffs::Services::Mysql::get_by_dbname($princ, $dbname);

die("MySQL service $dbname not found\n") unless(defined $sql);

my $acl = Vhffs::Acl::get_object_acl( $princ, $sql );
print Dumper $acl;
