Commit 366a303b authored by Marco Mariani's avatar Marco Mariani

zmclientcertmgr, zmconfigure, zmdkimkeyutil, zmdomaincertmgr,

zmhspreport, zmldapanon, zmldapenable-mmr, zmldapenablereplica,
zmldappromote-replica-mmr, zmldapquery-mmr, zmldapreplicatool,
zmproxyconfig, zmsetservername, zmqstat: removed hardcoded checks for zimbra user

zmconfigure: changed permission +x
parent ba204c6d
......@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK *****
#
if [ x`whoami` != "xroot" ]; then
echo "$0 must be run as user root"
exit 1
fi
# XXX SLAPOS must run as current user
#if [ x`whoami` != "xroot" ]; then
# echo "$0 must be run as user root"
# exit 1
#fi
umask 027
platform=$(/opt/zimbra/libexec/get_plat_tag.sh 2> /dev/null := UNKNOWN)
......
......@@ -19,12 +19,13 @@ use strict;
my $sfilename=$ARGV[0];
my $dfilename=$ARGV[1];
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
if ( $dfilename eq "" ) {
print STDERR "Usage: $0 <source> <dest>\n\n";
......
......@@ -26,12 +26,13 @@ if ( ! -d "/opt/zimbra/opendkim" ) {
exit(1);
}
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
my ($add, $bits, $help, $query, $update, $domain, $delete, $selector);
......
......@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK *****
#
if [ x`whoami` != "xroot" ]; then
echo "$0 must be run as user root"
exit 1
fi
# XXX SLAPOS must run as current user
#if [ x`whoami` != "xroot" ]; then
# echo "$0 must be run as user root"
# exit 1
#fi
umask 027
platform=$(/opt/zimbra/libexec/get_plat_tag.sh 2> /dev/null := UNKNOWN)
......
......@@ -47,12 +47,13 @@ if ((! getopts('dvh', \%options)) || ($options{h})) {
usage();
};
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
$FORMAT_LINES_PER_PAGE = 100;
$FORMAT_FORMFEED = "\n";
......
......@@ -28,13 +28,14 @@ if ( ! -d "/opt/zimbra/openldap/etc" ) {
exit(1);
}
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
usage();
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# usage();
# exit (1);
#}
if ( $options{d} + $options{e} > 1) {
print "Only one of enable or disable may be specified.\n";
......
......@@ -26,12 +26,13 @@ if ( ! -d "/opt/zimbra/openldap/etc" ) {
exit(1);
}
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
my ($help,$sid,$mmrURI,$rid);
$sid=0;
$rid=100;
......
......@@ -27,12 +27,13 @@ if ( ! -d "/opt/zimbra/openldap/etc" ) {
exit(1);
}
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
my ($help);
......
......@@ -26,12 +26,13 @@ if ( ! -d "/opt/zimbra/openldap/etc" ) {
exit(1);
}
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
my ($help,$sid);
$sid=0;
......
......@@ -24,12 +24,13 @@ if ( ! -d "/opt/zimbra/openldap/etc" ) {
exit(1);
}
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
my ($help);
my $opts_good = GetOptions(
......
......@@ -26,12 +26,13 @@ if ( ! -d "/opt/zimbra/openldap/etc" ) {
exit(1);
}
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
my ($help,$masterURI,$rid,$tls,$replEntry,$entryURI,$entryRID);
$rid=0;
$masterURI=0;
......
......@@ -53,12 +53,13 @@ our $ZMPROV = "/opt/zimbra/bin/zmprov -l 1>/dev/null";
our $platform = `/opt/zimbra/libexec/get_plat_tag.sh`;
chomp ($platform);
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
# XXX SLAPOS must run as current user
#my $id = getpwuid($<);
#chomp $id;
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
if ($options{h}) {
usage();
......
......@@ -19,10 +19,11 @@ use strict;
use IO::File;
use File::Find;
if ($> ne 0) {
print "$0 must be executed as root.\n";
exit 1;
}
# XXX SLAPOS must run as current user
#if ($> ne 0) {
# print "$0 must be executed as root.\n";
# exit 1;
#}
my $readfiles = 0;
......
......@@ -26,11 +26,12 @@ use File::Basename;
my (%c,%loaded,%saved,$rc);
my ($oldServerName, $newServerName, $help, $verbose, $force, $delete, $skipusers, $usersonly);
my (undef, undef,$uid,$gid) = getpwnam('zimbra');
if ($> ne $uid) {
print "Must be run as user zimbra.\n";
&usage
}
# XXX SLAPOS must run as current user
#my (undef, undef,$uid,$gid) = getpwnam('zimbra');
#if ($> ne $uid) {
# print "Must be run as user zimbra.\n";
# &usage
#}
GetOptions("help" => \$help,
"oldservername=s" => \$oldServerName,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment