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