[Fedora-directory-commits] console/src/com/netscape/management/client/topology TopTopologyNode.java, 1.2, 1.3
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/console/src/com/netscape/management/client/topology
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16740/console/src/com/netscape/management/client/topology
Modified Files:
TopTopologyNode.java
Log Message:
Resolves: bug 312381
Description: ambiguity in imported classes
Fix Description: clean up imports - import specific class names only instead of .*
Index: TopTopologyNode.java
===================================================================
RCS file: /cvs/dirsec/console/src/com/netscape/management/client/topology/TopTopologyNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TopTopologyNode.java 10 Jan 2008 18:35:36 -0000 1.2
+++ TopTopologyNode.java 22 Dec 2008 18:08:56 -0000 1.3
@@ -19,14 +19,16 @@
* END COPYRIGHT BLOCK **/
package com.netscape.management.client.topology;
-import java.util.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.tree.*;
-import com.netscape.management.client.*;
-import com.netscape.management.client.console.*;
-import com.netscape.management.client.util.*;
-import netscape.ldap.*;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.swing.tree.MutableTreeNode;
+
+import com.netscape.management.client.IResourceObject;
+import com.netscape.management.client.console.Console;
+import com.netscape.management.client.console.SplashScreen;
+import com.netscape.management.client.util.Debug;
/**
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd util.c, 1.22, 1.23
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31545/ldapserver/ldap/servers/slapd
Modified Files:
util.c
Log Message:
Resolves: bug 476891
Bug Description: Replication: Server to Server Connection Error: SASL(-1): generic failure: All-whitespace username.
Reviewed by: nkinder (Thanks!)
Fix Description: My earlier fix for this bug broke GSSAPI - it would cause the username and authid to only be freed under certain conditions e.g. if the krb creds were still valid, the code would not free the username and authid, so they would be passed via SASL instead of the principal name. This fix just makes sure username and authid are always freed, under all circumstances.
Platforms tested: RHEL5, Fedora 9
Flag Day: no
Doc impact: no
Index: util.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/util.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- util.c 17 Dec 2008 20:47:36 -0000 1.22
+++ util.c 19 Dec 2008 19:26:01 -0000 1.23
@@ -1946,11 +1946,11 @@
cc_env_name);
}
+cleanup:
/* use NULL as username and authid */
slapi_ch_free_string(&vals->username);
slapi_ch_free_string(&vals->authid);
-cleanup:
krb5_free_unparsed_name(ctx, princ_name);
if (kt) { /* NULL not allowed */
krb5_kt_close(ctx, kt);
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldbm_modify.c, 1.7, 1.8
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27229/ldap/servers/slapd/back-ldbm
Modified Files:
ldbm_modify.c
Log Message:
Resolves: 437049
Summary: Add missing parent objectclasses for all operations (replicated or not).
Index: ldbm_modify.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modify.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ldbm_modify.c 8 Oct 2008 17:29:04 -0000 1.7
+++ ldbm_modify.c 19 Dec 2008 17:07:26 -0000 1.8
@@ -206,7 +206,7 @@
int is_fixup_operation= 0;
int is_ruv = 0; /* True if the current entry is RUV */
CSN *opcsn = NULL;
- int repl_op;
+ int i = 0;
slapi_pblock_get( pb, SLAPI_BACKEND, &be);
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
@@ -214,7 +214,6 @@
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
slapi_pblock_get( pb, SLAPI_PARENT_TXN, (void**)&parent_txn );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation );
- slapi_pblock_get (pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op);
is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP);
is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV);
inst = (ldbm_instance *) be->be_instance_info;
@@ -310,20 +309,13 @@
}
/*
- * If we are not handling a replicated operation, AND if the
- * objectClass attribute type was modified in any way, expand
+ * If the objectClass attribute type was modified in any way, expand
* the objectClass values to reflect the inheritance hierarchy.
- * [blackflag 624152]: repl_op covers both regular and legacy replication
*/
- if(!repl_op)
- {
- int i;
-
- for ( i = 0; mods[i] != NULL; ++i ) {
- if ( 0 == strcasecmp( SLAPI_ATTR_OBJECTCLASS, mods[i]->mod_type )) {
- slapi_schema_expand_objectclasses( ec->ep_entry );
- break;
- }
+ for ( i = 0; mods[i] != NULL; ++i ) {
+ if ( 0 == strcasecmp( SLAPI_ATTR_OBJECTCLASS, mods[i]->mod_type )) {
+ slapi_schema_expand_objectclasses( ec->ep_entry );
+ break;
}
}
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd add.c, 1.16, 1.17
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27229/ldap/servers/slapd
Modified Files:
add.c
Log Message:
Resolves: 437049
Summary: Add missing parent objectclasses for all operations (replicated or not).
Index: add.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/add.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- add.c 5 Dec 2008 22:41:52 -0000 1.16
+++ add.c 19 Dec 2008 17:07:26 -0000 1.17
@@ -572,9 +572,7 @@
}
/* expand objectClass values to reflect the inheritance hierarchy */
- if (!repl_op) {
- slapi_schema_expand_objectclasses( e );
- }
+ slapi_schema_expand_objectclasses( e );
/* uniqueid needs to be generated for entries added during legacy replication */
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd util.c, 1.21, 1.22
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19542/ldapserver/ldap/servers/slapd
Modified Files:
util.c
Log Message:
Resolves: bug 476891
Bug Description: Replication: Server to Server Connection Error: SASL(-1): generic failure: All-whitespace username.
Reviewed by: nkinder (Thanks!)
Fix Description: 1) SASL/DIGEST-MD5 needs both username and authid
2) The username and authid in this context are always a bind DN - they must have the "dn:" prefix in order for the SASL mapping to work
3) gssapi (kerberos) sets both username and authid to NULL
Platforms tested: RHEL5
Flag Day: no
Doc impact: no
Index: util.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/util.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- util.c 5 Dec 2008 22:41:53 -0000 1.21
+++ util.c 17 Dec 2008 20:47:36 -0000 1.22
@@ -1247,6 +1247,7 @@
const char *realm)
{
ldapSaslInteractVals *vals = NULL;
+ char *idprefix = "";
vals = (ldapSaslInteractVals *)
slapi_ch_calloc(1, sizeof(ldapSaslInteractVals));
@@ -1261,8 +1262,12 @@
ldap_get_option(ld, LDAP_OPT_X_SASL_MECH, &vals->mech);
}
+ if (vals->mech && !strcasecmp(vals->mech, "DIGEST-MD5")) {
+ idprefix = "dn:"; /* prefix name and id with this string */
+ }
+
if (authid) { /* use explicit passed in value */
- vals->authid = slapi_ch_strdup(authid);
+ vals->authid = slapi_ch_smprintf("%s%s", idprefix, authid);
} else { /* use option value if any */
ldap_get_option(ld, LDAP_OPT_X_SASL_AUTHCID, &vals->authid);
if (!vals->authid) {
@@ -1272,7 +1277,7 @@
}
if (username) { /* use explicit passed in value */
- vals->username = slapi_ch_strdup(username);
+ vals->username = slapi_ch_smprintf("%s%s", idprefix, username);
} else { /* use option value if any */
ldap_get_option(ld, LDAP_OPT_X_SASL_AUTHZID, &vals->username);
if (!vals->username) { /* use default sasl value */
@@ -1413,7 +1418,7 @@
int tries = 0;
while (tries < 2) {
- void *defaults = ldap_sasl_set_interact_vals(ld, mech, NULL, bindid,
+ void *defaults = ldap_sasl_set_interact_vals(ld, mech, bindid, bindid,
creds, NULL);
/* have to first set the defaults used by the callback function */
/* call the bind function */
@@ -1941,8 +1946,9 @@
cc_env_name);
}
- /* use NULL as username */
+ /* use NULL as username and authid */
slapi_ch_free_string(&vals->username);
+ slapi_ch_free_string(&vals->authid);
cleanup:
krb5_free_unparsed_name(ctx, princ_name);
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DialogManager.pm, 1.5, 1.6 setup-ds.res.in, 1.13, 1.14
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8393/ldap/admin/src/scripts
Modified Files:
DialogManager.pm setup-ds.res.in
Log Message:
Resolves: 463776
Summary: Make "back" reponse in setup code work correctly.
Index: DialogManager.pm
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DialogManager.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DialogManager.pm 27 Jul 2007 01:46:10 -0000 1.5
+++ DialogManager.pm 17 Dec 2008 18:58:21 -0000 1.6
@@ -104,7 +104,7 @@
}
# the word "back"
- if ($ans =~ /back/i) {
+ if ($ans =~ /^\s*back\s*$/i) {
return 1;
}
# a Ctrl-B sequence
Index: setup-ds.res.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/setup-ds.res.in,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- setup-ds.res.in 14 Jul 2008 23:20:23 -0000 1.13
+++ setup-ds.res.in 17 Dec 2008 18:58:21 -0000 1.14
@@ -7,7 +7,7 @@
dialog_use_different_type = When using Silent or Express mode, some of the\ndialogs are skipped, but validation is still performed\non the default or given answers. You should run this program again and\nchoose Typical or Custom mode in order to provide a valid input\nfor the problem dialog.\n\n
# ------------ Welcome Dialog Resource ------------
-dialog_welcome_text = This program will set up the %s Directory Server.\n\nIt is recommended that you have "root" privilege to set up the software.\nTips for using this program:\n - Press "Enter" to choose the default and go to the next screen\n - Type "Control-B" then "Enter" to go back to the previous screen\n - Type "Control-C" to cancel the setup program\n\n
+dialog_welcome_text = This program will set up the %s Directory Server.\n\nIt is recommended that you have "root" privilege to set up the software.\nTips for using this program:\n - Press "Enter" to choose the default and go to the next screen\n - Type "Control-B" or the word "back" then "Enter" to go back to the previous screen\n - Type "Control-C" to cancel the setup program\n\n
# %s -> brand
dialog_welcome_prompt = Would you like to continue with set up?
@@ -68,7 +68,7 @@
dialog_dssuffix_error = The suffix '%s' is not a valid DN. Please choose another one.\n\n
# ----------- DS Root DN and password Dialog Resource ----------------
-dialog_dsrootdn_text = Certain directory server operations require an administrative user.\nThis user is referred to as the Directory Manager and typically has a\nbind Distinguished Name (DN) of cn=Directory Manager.\nYou will also be prompted for the password for this user. The password must\nbe at least 8 characters long, and contain no spaces.\nPress Control-B then Enter to back up and start over.\n\n
+dialog_dsrootdn_text = Certain directory server operations require an administrative user.\nThis user is referred to as the Directory Manager and typically has a\nbind Distinguished Name (DN) of cn=Directory Manager.\nYou will also be prompted for the password for this user. The password must\nbe at least 8 characters long, and contain no spaces.\nPress Control-B or type the word "back", then Enter to back up and start over.\n\n
dialog_dsrootdn_prompt = Directory Manager DN
dialog_dsrootdn_error = The input '%s' is not a valid DN. Please choose another one.\n\n
dialog_dsrootpw_prompt1 = Password
@@ -126,4 +126,4 @@
Please remove it first if you really want to recreate it,\
or use a different ServerIdentifier to create another instance.\n
error_opening_init_ldif = Could not open the initial LDIF file '%s'.\
-The file was not found or could not be read.\n
\ No newline at end of file
+The file was not found or could not be read.\n
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Setup.pm.in, 1.11, 1.12
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31963/ldap/admin/src/scripts
Modified Files:
Setup.pm.in
Log Message:
Resolves: 467233
Summary: Fix undefined subroutine error when trying to display usage message in setup scripts.
Index: Setup.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Setup.pm.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Setup.pm.in 14 Jul 2008 18:43:21 -0000 1.11
+++ Setup.pm.in 17 Dec 2008 18:28:04 -0000 1.12
@@ -182,7 +182,7 @@
}
} else { # error
print STDERR "Error: unknown command line option $_\n";
- usage();
+ HelpMessage();
exit 1;
}
}
15 years, 5 months
[Fedora-directory-commits] adminserver/admserv/newinst/src setup-ds-admin.pl.in, 1.12, 1.13
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17768/admserv/newinst/src
Modified Files:
setup-ds-admin.pl.in
Log Message:
Resolves: 445305
Summary: Don't override settings from inf file with default values during a silent install.
Index: setup-ds-admin.pl.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.pl.in,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- setup-ds-admin.pl.in 14 Jul 2008 18:43:02 -0000 1.12
+++ setup-ds-admin.pl.in 17 Dec 2008 17:26:11 -0000 1.13
@@ -39,32 +39,59 @@
# see if there is already a configds
my $admConf = AdminUtil::getAdmConf("$setup->{configdir}/admin-serv");
-# set defaults
+# Set defaults, but don't override settings that were
+# defined in a passed in inf file.
if ($admConf && %{$admConf}) {
- $setup->{inf}->{General}->{ConfigDirectoryLdapURL} = $admConf->{ldapurl};
- $setup->{inf}->{General}->{ConfigDirectoryAdminID} = $admConf->{userdn};
- $setup->{inf}->{General}->{AdminDomain} = $admConf->{AdminDomain};
- $setup->{inf}->{General}->{SuiteSpotUserID} = $admConf->{SuiteSpotUserID};
- $setup->{inf}->{General}->{SuiteSpotGroup} = $admConf->{SuiteSpotGroup};
+ unless (defined($setup->{inf}->{General}->{ConfigDirectoryLdapURL})) {
+ $setup->{inf}->{General}->{ConfigDirectoryLdapURL} = $admConf->{ldapurl};
+ }
+ unless (defined($setup->{inf}->{General}->{ConfigDirectoryAdminID})) {
+ $setup->{inf}->{General}->{ConfigDirectoryAdminID} = $admConf->{userdn};
+ }
+ unless (defined($setup->{inf}->{General}->{AdminDomain})) {
+ $setup->{inf}->{General}->{AdminDomain} = $admConf->{AdminDomain};
+ }
+ unless (defined($setup->{inf}->{General}->{SuiteSpotUserID})) {
+ $setup->{inf}->{General}->{SuiteSpotUserID} = $admConf->{SuiteSpotUserID};
+ }
+ unless (defined($setup->{inf}->{General}->{SuiteSpotGroup})) {
+ $setup->{inf}->{General}->{SuiteSpotGroup} = $admConf->{SuiteSpotGroup};
+ }
+ unless (defined($setup->{inf}->{slapd}->{admin}->{SysUser})) {
+ $setup->{inf}->{admin}->{SysUser} = $admConf->{sysuser};
+ }
- $setup->{inf}->{admin}->{SysUser} = $admConf->{sysuser};
# read additional config from config DS
my $pset = AdminUtil::getPset($admConf);
if ($pset && %{$pset}) {
- $setup->{inf}->{admin}->{Port} = $pset->{"configuration.nsserverport"};
+ unless (defined($setup->{inf}->{admin}->{Port})) {
+ $setup->{inf}->{admin}->{Port} = $pset->{"configuration.nsserverport"};
+ }
$setup->{asorigport} = $pset->{"configuration.nsserverport"}; # save orig. port
- $setup->{inf}->{admin}->{ServerIpAddress} = $pset->{"configuration.nsserveraddress"};
- $setup->{inf}->{General}->{FullMachineName} = $pset->{"serverhostname"};
+ unless (defined($setup->{inf}->{admin}->{ServerIpAddress})) {
+ $setup->{inf}->{admin}->{ServerIpAddress} = $pset->{"configuration.nsserveraddress"};
+ }
+ unless (defined($setup->{inf}->{General}->{FullMachineName})) {
+ $setup->{inf}->{General}->{FullMachineName} = $pset->{"serverhostname"};
+ }
}
my $admpw = AdminUtil::getAdmpw($admConf);
if ($admpw && %{$admpw}) {
- $setup->{inf}->{admin}->{ServerAdminID} = $admpw->{ServerAdminID};
- $setup->{inf}->{admin}->{ServerAdminPwd} = $admpw->{ServerAdminPwd};
+ unless (defined($setup->{inf}->{admin}->{ServerAdminID})) {
+ $setup->{inf}->{admin}->{ServerAdminID} = $admpw->{ServerAdminID};
+ }
+ unless (defined($setup->{inf}->{admin}->{ServerAdminPwd})) {
+ $setup->{inf}->{admin}->{ServerAdminPwd} = $admpw->{ServerAdminPwd};
+ }
}
# default to using the existing config DS
- $setup->{inf}->{slapd}->{UseExistingMC} = 1;
- $setup->{inf}->{slapd}->{SlapdConfigForMC} = 0;
+ unless (defined($setup->{inf}->{slapd}->{UseExistingMC})) {
+ $setup->{inf}->{slapd}->{UseExistingMC} = 1;
+ }
+ unless (defined($setup->{inf}->{slapd}->{SlapdConfigForMC})) {
+ $setup->{inf}->{slapd}->{SlapdConfigForMC} = 0;
+ }
$setup->{reconfigas} = 1; # allow AS reconfig
}
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd snmp_collator.c, 1.19, 1.20
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17143/ldap/servers/slapd
Modified Files:
snmp_collator.c
Log Message:
Resolves: 445305
Summary: Ensure directories created by installer get the requested mode applied.
Index: snmp_collator.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- snmp_collator.c 12 Dec 2008 23:38:54 -0000 1.19
+++ snmp_collator.c 17 Dec 2008 17:22:22 -0000 1.20
@@ -528,17 +528,22 @@
if (errno == EEXIST) {
/* It appears that we didn't exit cleanly last time and left the semaphore
* around. Recreate it since we don't know what state it is in. */
- sem_unlink(stats_sem_name);
+ if (sem_unlink(stats_sem_name) != 0) {
+ LDAPDebug( LDAP_DEBUG_ANY, "Failed to delete old semaphore for stats file (%s). "
+ "Error %d (%s).\n", szStatsFile, errno, slapd_system_strerror(errno) );
+ exit(1);
+ }
+
if ((stats_sem = sem_open(stats_sem_name, O_CREAT | O_EXCL, SLAPD_DEFAULT_FILE_MODE, 1)) == SEM_FAILED) {
/* No dice */
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d.\n",
- szStatsFile, errno, 0 );
+ LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d (%s).\n",
+ szStatsFile, errno, slapd_system_strerror(errno) );
exit(1);
}
} else {
/* Some other problem occurred creating the semaphore. */
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d.\n",
- szStatsFile, errno, 0 );
+ LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d.(%s)\n",
+ szStatsFile, errno, slapd_system_strerror(errno) );
exit(1);
}
}
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSCreate.pm.in, 1.14, 1.15 Util.pm.in, 1.17, 1.18
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17143/ldap/admin/src/scripts
Modified Files:
DSCreate.pm.in Util.pm.in
Log Message:
Resolves: 445305
Summary: Ensure directories created by installer get the requested mode applied.
Index: DSCreate.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSCreate.pm.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- DSCreate.pm.in 23 Oct 2008 22:42:54 -0000 1.14
+++ DSCreate.pm.in 17 Dec 2008 17:22:22 -0000 1.15
@@ -160,6 +160,7 @@
my $uid = getpwnam $inf->{General}->{SuiteSpotUserID};
my $gid = -1; # default to leave it alone
+ my $mode_string = "";
if (defined($inf->{General}->{SuiteSpotGroup})) {
$gid = getgrnam $inf->{General}->{SuiteSpotGroup};
@@ -171,6 +172,10 @@
if ($!) {
return ('error_chmoding_file', $it, $!);
}
+
+ $mode_string = sprintf "%lo", $mode;
+ debug(1, "changeOwnerMode: changed mode of $it to $mode_string\n");
+
$! = 0; # clear errno
if ( $gidonly ) {
chown -1, $gid, $it;
@@ -181,6 +186,12 @@
return ('error_chowning_file', $it, $inf->{General}->{SuiteSpotUserID}, $!);
}
+ if ( $gidonly ) {
+ debug(1, "changeOwnerMode: changed group ownership of $it to group $gid\n");
+ } else {
+ debug(1, "changeOwnerMode: changed ownership of $it to user $uid group $gid\n");
+ }
+
return ();
}
Index: Util.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Util.pm.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Util.pm.in 14 Jul 2008 23:25:41 -0000 1.17
+++ Util.pm.in 17 Dec 2008 17:22:22 -0000 1.18
@@ -860,6 +860,7 @@
my ($path, $mode, $user, $group) = @_;
my $uid = getpwnam $user;
my $gid = -1; # default to leave it alone
+ my $mode_string = "";
if ($group) {
$gid = getgrnam $group;
@@ -882,7 +883,10 @@
if ($!) {
return ('error_chowning_directory', $_, $!);
}
- debug(1, "makePaths: created directory $_ mode $mode user $user group $group\n");
+ chmod $mode, $_;
+ $mode_string = sprintf "%lo", $mode;
+ debug(1, "makePaths: created directory $_ mode $mode_string user $user group $group\n");
+ debug(2, "\t" . `ls -ld $_`);
}
return ();
15 years, 5 months