richard: server/perl-kolab/Kolab Kolab.pm.in,1.2,1.3
cvs at intevation.de
cvs at intevation.de
Sat Jan 14 22:21:17 CET 2006
Author: richard
Update of /kolabrepository/server/perl-kolab/Kolab
In directory doto:/tmp/cvs-serv11556/Kolab
Modified Files:
Kolab.pm.in
Log Message:
* Kolab/Kolab.pm.in: check for valid uid/gid values with perl define
instead of the value. The current check failed for root, as that
returns '0' (zero) that was interpreted as false...
* Changed the real login names, kolab, kolab-n and kolab-r to resp.
@kolab_mgrp@, @kolab_usr@ and @kolab_rusr at . The same thing
was done for the groups
Index: Kolab.pm.in
===================================================================
RCS file: /kolabrepository/server/perl-kolab/Kolab/Kolab.pm.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Kolab.pm.in 30 Dec 2005 10:32:05 -0000 1.2
+++ Kolab.pm.in 14 Jan 2006 21:21:15 -0000 1.3
@@ -81,9 +81,10 @@
# so we don't use $tempval for anything other than storing it in
# $config{'prefix'}. Once prefix is not in use anywhere, we can remove
# this code. /steffen
- if (!($tempval = (getpwnam('kolab'))[7])) {
+ $tempval = (getpwnam('@kolab_musr@'))[7];
+ if (! defined $tempval) {
$config{'log_level'} = KOLAB_WARN;
- &log('C', 'Unable to determine the kolab root directory', KOLAB_ERROR);
+ &log('C', 'Unable to determine the kolab user main directory', KOLAB_ERROR);
$error = 1;
} else {
%config = readConfig(%config, "@sysconfdir@/kolab/kolab.globals");
@@ -96,29 +97,40 @@
# $config{'log_level'} = KOLAB_WARN if (!exists $config{'log_level'});
&log('C', 'Reloading configuration');
- # Get the UID/GID of the `kolab' user
- if (!($config{'kolab_uid'} = (getpwnam('kolab'))[2])) {
- &log('C', "Unable to determine the uid of user `kolab'", KOLAB_ERROR);
+ # Get the UID/GID of the 'kolab' users
+ $config{'kolab_uid'} = (getpwnam('@kolab_musr@'))[2];
+ if (!defined $config{'kolab_uid'}) {
+ &log('C', "Unable to determine the uid of user '@kolab_musr@'", KOLAB_ERROR);
$error = 1;
}
- if (!($config{'kolab_gid'} = (getgrnam('kolab'))[2])) {
- &log('C', "Unable to determine the gid of user `kolab'", KOLAB_ERROR);
+
+ $config{'kolab_gid'} = (getgrnam('@kolab_mgrp@'))[2];
+ if (!defined $config{'kolab_gid'}) {
+ &log('C', "Unable to determine the gid of user '@kolab_mgrp@'", KOLAB_ERROR);
$error = 1;
}
- if (!($config{'kolab_n_uid'} = (getpwnam('kolab-n'))[2])) {
- &log('C', "Unable to determine the uid of user `kolab-n'", KOLAB_ERROR);
+
+ $config{'kolab_n_uid'} = (getpwnam('@kolab_usr@'))[2];
+ if (!defined $config{'kolab_n_uid'}) {
+ &log('C', "Unable to determine the uid of user '@kolab_usr@'", KOLAB_ERROR);
$error = 1;
}
- if (!($config{'kolab_n_gid'} = (getgrnam('kolab-n'))[2])) {
- &log('C', "Unable to determine the gid of user `kolab-n'", KOLAB_ERROR);
+
+ $config{'kolab_n_gid'} = (getgrnam('@kolab_grp@'))[2];
+ if (!defined $config{'kolab_n_gid'}) {
+ &log('C', "Unable to determine the gid of user @kolab_grp@'", KOLAB_ERROR);
$error = 1;
}
- if (!($config{'kolab_r_uid'} = (getpwnam('kolab-r'))[2])) {
- &log('C', "Unable to determine the uid of user `kolab-r'", KOLAB_ERROR);
+
+ $config{'kolab_r_uid'} = (getpwnam('@kolab_rusr@'))[2];
+ if (!defined $config{'kolab_r_uid'}) {
+ &log('C', "Unable to determine the uid of user '@kolab_rusr@'", KOLAB_ERROR);
$error = 1;
}
- if (!($config{'kolab_r_gid'} = (getgrnam('kolab-r'))[2])) {
- &log('C', "Unable to determine the gid of user `kolab-r'", KOLAB_ERROR);
+
+ $config{'kolab_r_gid'} = (getgrnam('@kolab_rgrp@'))[2];
+ if (!defined $config{'kolab_r_gid'}) {
+ &log('C', "Unable to determine the gid of user '@kolab_rgrp@'", KOLAB_ERROR);
$error = 1;
}
More information about the commits
mailing list