This file is indexed.

/usr/bin/msandbox is in mysql-sandbox 3.2.05-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/perl
# sandbox
#    The MySQL Sandbox
#    Copyright (C) 2006-2016 Giuseppe Maxia
#
#    Licensed under the Apache License, Version 2.0 (the "License");
#    you may not use this file except in compliance with the License.
#    You may obtain a copy of the License at
#
#        http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.

use strict;
use warnings;

use English qw( -no_match_vars ); 
use Data::Dumper;
use MySQL::Sandbox qw(runs_as_root);

my $DEBUG = $MySQL::Sandbox::DEBUG;

runs_as_root();

#my $install_dir;
#$install_dir = $PROGRAM_NAME;
#$install_dir =~ s{/\w+(\.pl)?$}{};

my $msb = MySQL::Sandbox->new();

my @apps = (
        { 
            name => 'make_sandbox',
            description  => 'the easiest way of creating a sandbox',
        },
        {
            name => 'low_level_make_sandbox', 
            description => q{create a single sandbox, with fine tuning options (don't use directly)},
        },
        {
            name    => 'make_replication_sandbox',
            description  => 'creates a sandbox with replicated master and slaves or circular',
        },
        {
            name    => 'make_multiple_sandbox',
            description => 'creates a group of sandboxes with the same version',
        },
        {
            name => 'make_multiple_custom_sandbox',
            description  => 'create a group of sandboxes with different versions',
        },
        {
            name => 'make_sandbox_from_source',
            description  => 'create a sandbox from a build directory',
        },
        {
            name => 'make_sandbox_from_installed',
            description  => 'create a sandbox from already installed binaries',
        },
        {
            name => 'sbtool',
            description  => 'performs auxiliary actions with existing sandboxes',
        },
);

my $choice = shift
    or help();
if (grep {$choice eq $_->{name} } @apps ) { 
    my $application = "$choice";
    if ( -x $application) {    
        exec $application, @ARGV;
    }
    else {
        die "application $application not found\n";
    }
}
else {
    exec "man MySQL::Sandbox";
    #die "'$choice' is not an application in MySQL Sandbox\n";
}

sub help {
    print $msb->credits(); 
    print "available applications:\n";
    for my $app (@apps) {
        printf " %-30s: %s\n", $app->{'name'}, $app->{'description'};
    }
    exit(1);
}

__END__