# incremented the version number to 0.2.0
# switched PHP short open tags to the full open tags. # included pecl-svn into the project # fixed various RPM packaging problems for PHP 5.3 and SELinux
This commit is contained in:
@ -140,6 +140,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PHPEXTDIR = @PHPEXTDIR@
|
||||
PHPEXTINIDIR = @PHPEXTINIDIR@
|
||||
PREFIX = @PREFIX@
|
||||
RM = @RM@
|
||||
RMDIR = @RMDIR@
|
||||
@ -183,6 +185,8 @@ mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
phpextdir = @phpextdir@
|
||||
phpextinidir = @phpextinidir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
|
@ -28,7 +28,9 @@ sub get_config
|
||||
database_password => $cfg->param ("database_password"),
|
||||
database_name => $cfg->param ("database_name"),
|
||||
database_driver => $cfg->param ("database_driver"),
|
||||
database_prefix => $cfg->param ("database_prefix")
|
||||
database_prefix => $cfg->param ("database_prefix"),
|
||||
|
||||
codepot_user_executor => $cfg->param("codepot_user_executor")
|
||||
};
|
||||
|
||||
return $config;
|
||||
@ -241,6 +243,31 @@ if (!defined($cfg))
|
||||
exit (1);
|
||||
}
|
||||
|
||||
my $allowed_to_execute = 1;
|
||||
my @executors = split (/\s*,\s*/, $cfg->{codepot_user_executor});
|
||||
if (scalar(@executors) > 0)
|
||||
{
|
||||
for my $executor (@executors)
|
||||
{
|
||||
my $uid = getpwnam ($executor);
|
||||
if (defined($uid) && $> == $uid)
|
||||
{
|
||||
$allowed_to_execute = 1;
|
||||
last;
|
||||
}
|
||||
else
|
||||
{
|
||||
$allowed_to_execute = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($allowed_to_execute == 0)
|
||||
{
|
||||
print (STDERR "Not allowed to run this program\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
my $dbh = open_database ($cfg);
|
||||
if (!defined($dbh))
|
||||
{
|
||||
|
Reference in New Issue
Block a user