ldap/servers
by Noriko Hosoi
ldap/servers/slapd/daemon.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 354249c1255c6b616e7821bb7615bccea8b395bf
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Thu Jul 7 17:40:25 2011 -0700
Bug 712855 - Directory Server 8.2 logs "Netscape Portable
Runtime error -5961 (TCP connection reset by
peer.)" to error log whereas Directory Server
8.1 did not
https://bugzilla.redhat.com/show_bug.cgi?id=712855
Description: In write_function, all failures of PR_Write except
PR_WOULD_BLOCK_ERROR and PR_IO_TIMEOUT_ERROR were logged. This
patch changes it so that PR_CONNECT_RESET_ERROR (TCP connection
reset by peer) will not be logged since it is not an error.
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index 312db6a..a6ed94f 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -1716,9 +1716,12 @@ write_function( int ignore, const void *buffer, int count, struct lextiof_socket
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
fd, prerr, slapd_pr_strerror( prerr ));
if ( !SLAPD_PR_WOULD_BLOCK_ERROR(prerr)) {
- LDAPDebug(LDAP_DEBUG_ANY, "PR_Write(%d) "
- SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
- fd, prerr, slapd_pr_strerror( prerr ));
+ if (prerr != PR_CONNECT_RESET_ERROR) {
+ /* 'TCP connection reset by peer': no need to log */
+ LDAPDebug(LDAP_DEBUG_ANY, "PR_Write(%d) "
+ SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ fd, prerr, slapd_pr_strerror( prerr ));
+ }
if (sentbytes < count) {
LDAPDebug(LDAP_DEBUG_CONNS,
"PR_Write(%d) - wrote only %d bytes (expected %d bytes) - 0 (EOF)\n", /* disconnected */
12 years, 9 months
ldap/admin ldap/schema
by Nathan Kinder
ldap/admin/src/scripts/60upgradeschemafiles.pl | 2
ldap/schema/60sudo.ldif | 58 ++++++++++++++++++++++---
2 files changed, 54 insertions(+), 6 deletions(-)
New commits:
commit 65553cafddfdadba2fa55c92a06ad9a291bf612e
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Thu Jul 7 13:52:49 2011 -0700
Bug 713209 - Update sudo schema
Our sudo schema file is out of date. This patch updates the
sudo schema file to be more current. The new schema is fully
backwards compatible.
diff --git a/ldap/admin/src/scripts/60upgradeschemafiles.pl b/ldap/admin/src/scripts/60upgradeschemafiles.pl
index 99373dc..c308716 100644
--- a/ldap/admin/src/scripts/60upgradeschemafiles.pl
+++ b/ldap/admin/src/scripts/60upgradeschemafiles.pl
@@ -11,7 +11,7 @@ sub runinst {
# these schema files are obsolete, or we want to replace
# them with newer versions
- my @toremove = qw(00core.ldif 01core389.ldif 01common.ldif 02common.ldif 05rfc2247.ldif 05rfc4523.ldif 05rfc4524.ldif 06inetorgperson.ldif 10presence.ldif 28pilot.ldif 30ns-common.ldif 50ns-directory.ldif 60mozilla.ldif);
+ my @toremove = qw(00core.ldif 01core389.ldif 01common.ldif 02common.ldif 05rfc2247.ldif 05rfc4523.ldif 05rfc4524.ldif 06inetorgperson.ldif 10presence.ldif 28pilot.ldif 30ns-common.ldif 50ns-directory.ldif 60mozilla.ldif 60sudo.ldif);
# these hashes will be used to check for obsolete schema
# in 99user.ldif
diff --git a/ldap/schema/60sudo.ldif b/ldap/schema/60sudo.ldif
index cc94370..746c4be 100644
--- a/ldap/schema/60sudo.ldif
+++ b/ldap/schema/60sudo.ldif
@@ -12,8 +12,7 @@ attributeTypes: (
EQUALITY caseExactIA5Match
SUBSTR caseExactIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
- X-ORIGIN 'SUDO'
- )
+ X-ORIGIN 'SUDO' )
#
################################################################################
#
@@ -58,6 +57,54 @@ attributeTypes: (
#
################################################################################
#
+attributeTypes: ( 1.3.6.1.4.1.15953.9.1.6
+ NAME 'sudoRunAsUser'
+ DESC 'User(s) impersonated by sudo'
+ EQUALITY caseExactIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
+ X-ORIGIN 'SUDO' )
+#
+################################################################################
+#
+attributeTypes: ( 1.3.6.1.4.1.15953.9.1.7
+ NAME 'sudoRunAsGroup'
+ DESC 'Group(s) impersonated by sudo'
+ EQUALITY caseExactIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
+ X-ORIGIN 'SUDO' )
+#
+################################################################################
+#
+attributeTypes: ( 1.3.6.1.4.1.15953.9.1.8
+ NAME 'sudoNotBefore'
+ DESC 'Start of time interval for which the entry is valid'
+ EQUALITY generalizedTimeMatch
+ ORDERING generalizedTimeOrderingMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
+ X-ORIGIN 'SUDO' )
+#
+################################################################################
+#
+attributeTypes: ( 1.3.6.1.4.1.15953.9.1.9
+ NAME 'sudoNotAfter'
+ DESC 'End of time interval for which the entry is valid'
+ EQUALITY generalizedTimeMatch
+ ORDERING generalizedTimeOrderingMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
+ X-ORIGIN 'SUDO' )
+#
+################################################################################
+#
+attributeTypes: ( 1.3.6.1.4.1.15953.9.1.10
+ NAME 'sudoOrder'
+ DESC 'an integer to order the sudoRole entries'
+ EQUALITY integerMatch
+ ORDERING integerOrderingMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
+ X-ORIGIN 'SUDO' )
+#
+################################################################################
+#
objectClasses: (
1.3.6.1.4.1.15953.9.2.1
NAME 'sudoRole'
@@ -65,9 +112,10 @@ objectClasses: (
STRUCTURAL
DESC 'Sudoer Entries'
MUST ( cn )
- MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ sudoOption $ description )
- X-ORIGIN 'SUDO'
- )
+ MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ sudoRunAsUser $
+ sudoRunAsGroup $ sudoOption $ sudoNotBefore $ sudoNotAfter $
+ sudoOrder $ description )
+ X-ORIGIN 'SUDO' )
#
################################################################################
#
12 years, 9 months
ldap/servers
by Noriko Hosoi
ldap/servers/plugins/automember/automember.c | 14 +++++---
ldap/servers/plugins/mep/mep.c | 24 +++++++++------
ldap/servers/plugins/replication/windows_protocol_util.c | 2 -
ldap/servers/slapd/entry.c | 4 +-
ldap/servers/slapd/mapping_tree.c | 3 +
5 files changed, 30 insertions(+), 17 deletions(-)
New commits:
commit dfcc435a5678a0b3679f565e5364f5a32665b356
Author: Noriko Hosoi <nhosoi(a)jiji.usersys.redhat.com>
Date: Tue Jul 5 09:42:33 2011 -0700
Bug 719069 - clean up compiler warnings in 389-ds-base 1.2.9
https://bugzilla.redhat.com/show_bug.cgi?id=719069
Description:
slapd/entry.c
-- added const qualifier to the 2nd arg of _entry_set_tombstone_rdn.
slapd/mapping_tree.c
-- commented out mapping_tree_node_validate.
plugins/automember/automember.c
-- removed a unused variable smods.
-- modified to use label "bail".
-- replaced deprecated slapi_entry_attr_hasvalue with
slapi_entry_attr_has_syntax_value.
plugins/mep/mep.c
-- replaced deprecated slapi_entry_attr_hasvalue with
slapi_entry_attr_has_syntax_value.
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index af5dfba..7fd6dab 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -1689,15 +1689,15 @@ automember_mod_pre_op(Slapi_PBlock * pb)
static int
automember_mod_post_op(Slapi_PBlock *pb)
{
- Slapi_Mods *smods = NULL;
char *dn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_mod_post_op\n");
/* Just bail if we aren't ready to service requests yet. */
- if (!g_plugin_started)
- return 0;
+ if (!g_plugin_started) {
+ goto bail;
+ }
if (automember_oktodo(pb) && (dn = automember_get_dn(pb))) {
/* Check if the config is being modified and reload if so. */
@@ -1749,8 +1749,12 @@ automember_add_post_op(Slapi_PBlock *pb)
if (e) {
/* If the entry is a tombstone, just bail. */
- if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
- SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ Slapi_Value *tombstone =
+ slapi_value_new_string(SLAPI_ATTR_VALUE_TOMBSTONE);
+ int rc = slapi_entry_attr_has_syntax_value(e, SLAPI_ATTR_OBJECTCLASS,
+ tombstone);
+ slapi_value_free(&tombstone);
+ if (rc) {
return 0;
}
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index fad56ee..520a8c2 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -116,6 +116,7 @@ static int mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
char **type, char **value);
static int mep_is_managed_entry(Slapi_Entry *e);
static int mep_is_mapped_attr(Slapi_Entry *template, char *type);
+static int mep_has_tombstone_value(Slapi_Entry * e);
/*
* Config cache locking functions
@@ -2096,7 +2097,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
}
/* Fetch the modified entry. This will not be set for a chaining
- * backend, so don't treat the message as fatal. */
+ * backend, so don't treat the message as fatal. */
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &e);
if (e == NULL) {
slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
@@ -2105,8 +2106,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
}
/* If the entry is a tombstone, just bail. */
- if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
- SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ if (mep_has_tombstone_value(e)) {
goto bail;
}
@@ -2218,8 +2218,7 @@ mep_add_post_op(Slapi_PBlock *pb)
if (e) {
/* If the entry is a tombstone, just bail. */
- if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
- SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ if (mep_has_tombstone_value(e)) {
return 0;
}
@@ -2287,8 +2286,7 @@ mep_del_post_op(Slapi_PBlock *pb)
char *managed_dn = NULL;
/* If the entry is a tombstone, just bail. */
- if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
- SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ if (mep_has_tombstone_value(e)) {
return 0;
}
@@ -2365,8 +2363,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
}
/* If the entry is a tombstone, just bail. */
- if (slapi_entry_attr_hasvalue(post_e, SLAPI_ATTR_OBJECTCLASS,
- SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ if (mep_has_tombstone_value(post_e)) {
return 0;
}
@@ -2549,3 +2546,12 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
return 0;
}
+static int
+mep_has_tombstone_value(Slapi_Entry * e)
+{
+ Slapi_Value *tombstone = slapi_value_new_string(SLAPI_ATTR_VALUE_TOMBSTONE);
+ int rc = slapi_entry_attr_has_syntax_value(e, SLAPI_ATTR_OBJECTCLASS,
+ tombstone);
+ slapi_value_free(&tombstone);
+ return rc;
+}
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c b/ldap/servers/plugins/replication/windows_protocol_util.c
index 80a4640..54dd87b 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -2166,7 +2166,7 @@ mod_already_made(Private_Repl_Protocol *prp, Slapi_Mod *smod, Slapi_Entry *ad_en
* mods to take prior mods into account when
* determining what can be skipped. */
if (retval == 0) {
- slapi_entry_apply_mod(ad_entry, slapi_mod_get_ldapmod_byref(smod));
+ slapi_entry_apply_mod(ad_entry, (LDAPMod *)slapi_mod_get_ldapmod_byref(smod));
}
return retval;
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c
index 9e0ea2e..0977c78 100644
--- a/ldap/servers/slapd/entry.c
+++ b/ldap/servers/slapd/entry.c
@@ -62,7 +62,7 @@
#define DELETED_VALUE_STRSIZE 8 /* sizeof(";deleted") */
/* a helper function to set special rdn to a tombstone entry */
-static int _entry_set_tombstone_rdn(Slapi_Entry *e, char *normdn);
+static int _entry_set_tombstone_rdn(Slapi_Entry *e, const char *normdn);
/*
* An attribute name is of the form 'basename[;option]'.
@@ -3867,7 +3867,7 @@ out:
/* a helper function to set special rdn to a tombstone entry */
/* Since this a tombstone, it requires a special treatment for rdn*/
static int
-_entry_set_tombstone_rdn(Slapi_Entry *e, char *normdn)
+_entry_set_tombstone_rdn(Slapi_Entry *e, const char *normdn)
{
int rc = 0;
char *tombstone_rdn = slapi_ch_strdup(normdn);
diff --git a/ldap/servers/slapd/mapping_tree.c b/ldap/servers/slapd/mapping_tree.c
index a0f7a67..967b2d7 100644
--- a/ldap/servers/slapd/mapping_tree.c
+++ b/ldap/servers/slapd/mapping_tree.c
@@ -986,6 +986,8 @@ done:
return result;
}
+#if 0
+/* defined but not used */
/*
* Description:
* A first attempt at walking over the mapping tree and making sure things
@@ -1018,6 +1020,7 @@ mapping_tree_node_validate(mapping_tree_node *node)
}
}
}
+#endif
static void
mtn_free_referral_in_node (mapping_tree_node *node)
12 years, 9 months
Changes to 'refs/tags/389-admin-1.1.20'
by Richard Allen Megginson
Changes since 389-admin-1.1.11:
Endi S. Dewata (3):
Bug 573889 - Migration does not remove deprecated schema
Bug 644929 - FDS to 389 DS migration results in both Fedora and 389 entries
Bug 470576 - Migration could do addition checks before commiting actions
Nathan Kinder (40):
Bug 648949 - Merge selinux policy into base OS
Regenerated autoconf files
Bug 638511 - dirsrv-admin crashes at startup with SELinux enabled
Bug 668950 - Add posix group support to Console
Bug 672468 - Don't use empty path elements in LD_LIBRARY_PATH
Bug 618897 - Wrong permissions when creating instance from Console
Bug 493424 - remove unneeded modules for admin server apache config
Bug 614690 - Don't use exec to call genrb
Bug 699815 - (cov#10859) Add missing braces in mod_admserv code
Bug 699815 - (cov#10858) getenv() called twice in viewlog cgi
Bug 699815 - (cov#10849,10851) Remove unused variables
Bug 699907 - (cov#10844) Uninitialized time struct
Bug 699907 - (cov#10843) Use of uninitialized variable in logging code
Bug 699907 - (cov#10840) Use of uninitialized buffer in security cgi
Bug 699907 - (cov#10836) Use of uninitialized var in http conn code
Bug 699907 - (cov#10833) Use of uninitialized vars in SNMP code
Bug 700532 - (cov#10832) Incorrect if condition in dsalib
Bug 700875 - (cov#10778) Cleanup ds_bring_up_server_install() in dsalib
Bug 700890 - (cov#10812) Check return value of open() properly in libadmin
Bug 700948 - (cov#10846) - Use of uninitialized variable in mod_admserv
Bug 700948 - (cov#10845) Use of uninitialized variable in mod_admserv
Bug 700948 - (cov#10839) Use of uninitialized variable in security cgi
Bug 700948 - (cov#10837) Use of uninitialized variable in monreplication
Bug 700948 - (cov#10835) Use of unitialized pointer in config cgi
Bug 700948 - (cov#10813) dynamic overrun possibility in ds_listdb cgi
Bug 700948 - (cov#10842) Use of unintialized variable in statusping
Bug 700948 - (cov#10842) Use of unintialized variable in statusping
Bug 702150 - (cov#10823) File descriptors leaked in help cgi
Bug 702150 - (cov#10822,10821) file descriptor leaks in config cgi
Bug 702150 - (cov#10820,10819) file descriptor leaks in readlog cgi
Bug 702150 - leak of config array in dsalib
Bug 702150 - (cov#10816) file descriptor leak in dsalib
Bug 702150 - (cov#10817) Leak of string in libdsa
Bug 702150 - Resouce leaks in htmladmin.c
Bug 702705 - (cov#10830) NULL pointer dereference in htmladmin
Bug 702705 - NULL pointer dereferences in viewlog cgi
Bug 702705 - (cov#10803) NULL pointer dereference in security cgi
Bug 702705 - (cov#10785) NULL pointer dereference in ds_snmpctrl
Bug 702705 - (cov#10784,10783) NULL pointer dereferences in dsalib
Bug 719056 - migrate-ds-admin.pl needs to update SELinux policy
Noriko Hosoi (11):
Bug 151705 - Need to update Console Cipher Preferences with new ciphers
start-ds-admin.in -- replaced "return 1" with "exit 1"
Bug 616260 - libds-admin-serv linking fails due to unresolved link-time dependencies
Bug 618858 - move start-ds-admin env file into main admin server
Bug 387981 - plain files can be chosen on the Restore Directory dialog
Bug 604881 - admin server log files have incorrect permissions/ownerships
Bug 604881 - admin server log files have incorrect permissions/ownerships
Bug 245278 - Changing to a password with a single quote does not work
Bug 211296 - Clean up all HTML pages (Admin Express, Repl Monitor, etc)
Bug 158926 - Unable to install CA certificate when using
Bug 476925 - Admin Server: Do not allow 8-bit passwords for the admin user
Rich Megginson (34):
bump version to 1.1.12.a1
initial support for openldap
add selinux policy for dsgw
skip LD_PRELOAD if using openldap
add more log information if nss init fails
add even more nss debugging
Bug 618454 - mod_admserv should only clear NSS caches and shutdown if NSS is initialized
bump version to 1.1.12.a2
fix building with mozldap
bump version to 1.1.12.a3
fix autotool build issues with properties files
setup-ds-admin.pl -u exits with ServerAdminID and as_uid related error
Bug 656441 - Missing library path entry causes LD_PRELOAD error
bump version to 1.1.13
bump version to 1.1.14.a1
Bug 664671 - Admin server segfault when full SSL access (http+ldap+console) required
bump version to 1.1.14
bump version to 1.1.15
bump version to 1.1.16
Bug 703990 - Support upgrade from Red Hat Directory Server
bump version to 1.1.17
add support for different skins
skip rebranding current brand
bump version to 1.1.18
look for separate openldap ldif library
bump version to 1.1.19
Bug 710372 - Not able to open the Manage Certificate from DS-console
better NSS error handling - reduce memory leaks
fix typo in NSS_Shutdown warning message
added tests for the security cgi
Bug 713000 - Migration stops if old admin server cannot be stopped
Bug 718079 - Perl errors when running migrate-ds-admin.pl
Bug 718285 - AdminServer should use "service" command instead of start/stop/restart scripts
bump version to 1.1.20
---
Makefile.am | 76
Makefile.in | 1402
VERSION.sh | 4
aclocal.m4 | 6879 ---
admserv/cfgstuff/httpd-2.2.conf.in | 13
admserv/cfgstuff/httpd.conf.in | 2
admserv/cfgstuff/start-ds-admin.in | 83
admserv/cgi-ds/ds_listdb.c | 26
admserv/cgi-ds/ds_snmpctrl.c | 5
admserv/cgi-src40/ReadLog.c | 18
admserv/cgi-src40/admlib.mk | 119
admserv/cgi-src40/admpw.c | 70
admserv/cgi-src40/cgicommon.h | 1
admserv/cgi-src40/cgicommon.properties | 3
admserv/cgi-src40/config.c | 20
admserv/cgi-src40/dllglue.c | 42
admserv/cgi-src40/ds_create.in | 6
admserv/cgi-src40/dsconfig.c | 9
admserv/cgi-src40/head.html | 1
admserv/cgi-src40/help.c | 15
admserv/cgi-src40/htmladmin.c | 677
admserv/cgi-src40/htmladmin.properties | 42
admserv/cgi-src40/monreplication.c | 6
admserv/cgi-src40/repl-monitor-cgi.pl.in | 37
admserv/cgi-src40/restartsrv.c | 5
admserv/cgi-src40/sec-activate.c | 21
admserv/cgi-src40/security.c | 231
admserv/cgi-src40/statpingserv.c | 15
admserv/cgi-src40/stopsrv.c | 5
admserv/cgi-src40/ugdsconfig.c | 38
admserv/cgi-src40/viewdata.c | 152
admserv/cgi-src40/viewdata.properties | 2
admserv/cgi-src40/viewlog.c | 66
admserv/cgi-src40/viewlog.properties | 6
admserv/genrb_wrapper.sh | 2
admserv/html/admserv.html.in | 11
admserv/html/htmladmin.html.in | 13
admserv/html/monreplication.html | 20
admserv/html/viewdata.html | 6
admserv/html/viewlog.html | 14
admserv/makeUpgradeTar.sh | 25
admserv/newinst/src/25changefedorato389.pl | 250
admserv/newinst/src/25rebrand.pl.in | 413
admserv/newinst/src/30updateglobalpref.pl.in | 9
admserv/newinst/src/AdminMigration.pm.in | 79
admserv/newinst/src/AdminServer.pm.in | 83
admserv/newinst/src/AdminUtil.pm.in | 78
admserv/newinst/src/ConfigDSDialogs.pm | 32
admserv/newinst/src/dirserver.map.in | 1
admserv/newinst/src/setup-ds-admin.res.in | 3
admserv/schema/ldif/02globalpreferences.ldif.tmpl | 49
admserv/schema/ldif/10dsdata.ldif.tmpl | 39
compile | 21
config.guess | 302
config.h.in | 21
config.sub | 232
configure |40044 ++++++++++------------
configure.ac | 54
depcomp | 172
include/libadmin/libadmin.h | 64
include/libdsa/dsalib.h | 9
install-sh | 517
lib/libadmin/dllglue.c | 77
lib/libadmin/httpcon.c | 2
lib/libadmin/referer.c | 4
lib/libadmin/template.c | 29
lib/libadmin/util.c | 738
lib/libdsa/dsalib_conf.c | 32
lib/libdsa/dsalib_confs.c | 77
lib/libdsa/dsalib_location.c | 5
lib/libdsa/dsalib_tailf.c | 1
lib/libdsa/dsalib_updown.c | 47
lib/libdsa/dsalib_util.c | 13
ltmain.sh |13199 ++++---
m4/mozldap.m4 | 116
m4/openldap.m4 | 138
m4/selinux.m4 | 3
man/man8/restart-ds-admin.8 | 10
man/man8/start-ds-admin.8 | 10
man/man8/stop-ds-admin.8 | 10
missing | 104
mod_admserv/mod_admserv.c | 178
mod_admserv/mod_admserv.h | 15
mod_restartd/mod_restartd-2.2.c | 2
selinux/dirsrv-admin.fc.in | 5
selinux/dirsrv-admin.te | 2
tests/ds_create/testget.1 | 2
tests/htmladmin/testget.2 | 2
tests/htmladmin/testget.3 | 2
tests/htmladmin/testget.4 | 2
tests/htmladmin/testget.5 | 2
tests/htmladmin/testget.6 | 2
tests/htmladmin/testget.7 | 2
tests/htmladmin/testget.8 | 2
tests/security/testpost.1 | 1
tests/security/testpost.10 | 1
tests/security/testpost.11 | 1
tests/security/testpost.12 | 1
tests/security/testpost.13 | 1
tests/security/testpost.14 | 1
tests/security/testpost.15 | 1
tests/security/testpost.16 | 1
tests/security/testpost.17 | 1
tests/security/testpost.18 | 1
tests/security/testpost.19 | 1
tests/security/testpost.2 | 1
tests/security/testpost.20 | 1
tests/security/testpost.21 | 1
tests/security/testpost.3 | 1
tests/security/testpost.4 | 1
tests/security/testpost.5 | 1
tests/security/testpost.6 | 1
tests/security/testpost.7 | 1
tests/security/testpost.8 | 1
tests/security/testpost.9 | 1
tests/setup.sh | 250
tests/ugdsconfig/testget.10 | 2
tests/viewdata/testget.2 | 2
tests/viewdata/testget.3 | 2
tests/viewdata/testget.4 | 2
tests/viewlog/testget.3 | 2
tests/viewlog/testget.4 | 2
122 files changed, 32045 insertions(+), 35731 deletions(-)
---
12 years, 9 months
VERSION.sh
by Richard Allen Megginson
VERSION.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 6a0261f05e1aebf8023d8148216358a6937a06cb
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Jul 5 11:19:25 2011 -0600
bump version to 1.1.20
diff --git a/VERSION.sh b/VERSION.sh
index dc5e91f..86749b4 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -11,7 +11,7 @@ vendorurl=http://port389.org
# PACKAGE_VERSION is constructed from these
VERSION_MAJOR=1
VERSION_MINOR=1
-VERSION_MAINT=19
+VERSION_MAINT=20
# if this is a PRERELEASE, set VERSION_PREREL
# otherwise, comment it out
# be sure to include the dot prefix in the prerel
12 years, 9 months
admserv/newinst
by Nathan Kinder
admserv/newinst/src/AdminMigration.pm.in | 3 +++
admserv/newinst/src/AdminServer.pm.in | 6 ++++--
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit c3c73792a3ac0c2d72b9e893c2c7ea3c9886f571
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Tue Jul 5 08:52:19 2011 -0700
Bug 719056 - migrate-ds-admin.pl needs to update SELinux policy
The migrate-ds-admin.pl script currently doesn't update the SELinux
policy. This script needs to label the admin server port and paths
properly to ensure that the process will start correctly.
diff --git a/admserv/newinst/src/AdminMigration.pm.in b/admserv/newinst/src/AdminMigration.pm.in
index 78c8328..c14678f 100644
--- a/admserv/newinst/src/AdminMigration.pm.in
+++ b/admserv/newinst/src/AdminMigration.pm.in
@@ -547,6 +547,9 @@ sub migrateAdminServer {
return 0;
}
+ # Update selinux policy
+ updateSelinuxPolicy($mig, $configdir, $securitydir, $logdir, $rundir);
+
if (!startAdminServer($mig, $configdir, $logdir, $rundir)) {
return 0;
}
diff --git a/admserv/newinst/src/AdminServer.pm.in b/admserv/newinst/src/AdminServer.pm.in
index 9cff480..7da6cb7 100644
--- a/admserv/newinst/src/AdminServer.pm.in
+++ b/admserv/newinst/src/AdminServer.pm.in
@@ -21,10 +21,12 @@ require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(createAdminServer reconfigAdminServer
createASFilesAndDirs setFileOwnerPerms updateHttpConfFiles
- startAdminServer stopAdminServer removeAdminServer setDefaults);
+ startAdminServer stopAdminServer removeAdminServer setDefaults
+ updateSelinuxPolicy);
@EXPORT_OK = qw(createAdminServer reconfigAdminServer
createASFilesAndDirs setFileOwnerPerms updateHttpConfFiles
- startAdminServer stopAdminServer removeAdminServer setDefaults);
+ startAdminServer stopAdminServer removeAdminServer setDefaults
+ updateSelinuxPolicy);
use File::Path;
# tempfiles
12 years, 9 months
admserv/cgi-src40 admserv/newinst config.h.in configure configure.ac Makefile.am Makefile.in man/man8
by Richard Allen Megginson
Makefile.am | 2
Makefile.in | 3 +
admserv/cgi-src40/restartsrv.c | 5 ++
admserv/cgi-src40/stopsrv.c | 5 ++
admserv/newinst/src/AdminServer.pm.in | 37 +++++++++------
config.h.in | 3 +
configure | 82 +++++++++++++++++++++++++---------
configure.ac | 28 +++++++++++
man/man8/restart-ds-admin.8 | 10 +++-
man/man8/start-ds-admin.8 | 10 +++-
man/man8/stop-ds-admin.8 | 10 +++-
11 files changed, 158 insertions(+), 37 deletions(-)
New commits:
commit 83551c42e6f1465f2c3b9c385373c71f9aa0a3d0
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Jul 1 13:01:08 2011 -0600
Bug 718285 - AdminServer should use "service" command instead of start/stop/restart scripts
https://bugzilla.redhat.com/show_bug.cgi?id=718285
Resolves: bug 718285
Bug Description: AdminServer should use "service" command instead of start/stop/restart scripts
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Added a new configure switch --enable-service - if this is
set, admin server will use the service command instead of the scripts. The
default value is "yes" if the build system has the service command. The
man pages for the scripts have been changed to discourage the user from
using them, in favor of the service command.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: yes - need to document that the service command should be used
instead of the stop/start/restart scripts
diff --git a/Makefile.am b/Makefile.am
index 6618290..999adc9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -549,6 +549,7 @@ fixupcmd = sed \
-e 's,@initconfigdir\@,$(initconfigdir),g' \
-e 's,@updatedir\@,$(updatedir),g' \
-e 's,@with_selinux\@,@with_selinux@,g' \
+ -e 's,@enable_service\@,@enable_service@,g' \
-e 's,@dsgwcgibindir\@,$(dsgwcgibindir),g' \
-e 's,@dsgwconfigdir\@,$(dsgwconfigdir),g' \
-e 's,@dsgwcookiedir\@,$(dsgwcookiedir),g'
@@ -608,6 +609,7 @@ fixupcmd = sed \
-e 's,@initconfigdir\@,$(initconfigdir),g' \
-e 's,@updatedir\@,$(updatedir),g' \
-e 's,@with_selinux\@,@with_selinux@,g' \
+ -e 's,@enable_service\@,@enable_service@,g' \
-e 's,@dsgwcgibindir\@,$(dsgwcgibindir),g' \
-e 's,@dsgwconfigdir\@,$(dsgwconfigdir),g' \
-e 's,@dsgwcookiedir\@,$(dsgwcookiedir),g'
diff --git a/Makefile.in b/Makefile.in
index 8e79f25..3585ba0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -415,6 +415,7 @@ dsgwcgibindir = $(libdir)@dsgwcgibindir@
dsgwcookiedir = $(localstatedir)@dsgwcookiedir@
dslibdir = @dslibdir@
dvidir = @dvidir@
+enable_service = @enable_service@
exec_prefix = @exec_prefix@
extra_cppflags = @extra_cppflags@
host = @host@
@@ -913,6 +914,7 @@ property_DATA = admserv/newinst/src/setup-ds-admin.res \
@BUNDLE_FALSE@ -e 's,@initconfigdir\@,$(initconfigdir),g' \
@BUNDLE_FALSE@ -e 's,@updatedir\@,$(updatedir),g' \
@BUNDLE_FALSE@ -e 's,@with_selinux\@,@with_selinux@,g' \
+@BUNDLE_FALSE@ -e 's,@enable_service\@,@enable_service@,g' \
@BUNDLE_FALSE@ -e 's,@dsgwcgibindir\@,$(dsgwcgibindir),g' \
@BUNDLE_FALSE@ -e 's,@dsgwconfigdir\@,$(dsgwconfigdir),g' \
@BUNDLE_FALSE@ -e 's,@dsgwcookiedir\@,$(dsgwcookiedir),g'
@@ -981,6 +983,7 @@ property_DATA = admserv/newinst/src/setup-ds-admin.res \
@BUNDLE_TRUE@ -e 's,@initconfigdir\@,$(initconfigdir),g' \
@BUNDLE_TRUE@ -e 's,@updatedir\@,$(updatedir),g' \
@BUNDLE_TRUE@ -e 's,@with_selinux\@,@with_selinux@,g' \
+@BUNDLE_TRUE@ -e 's,@enable_service\@,@enable_service@,g' \
@BUNDLE_TRUE@ -e 's,@dsgwcgibindir\@,$(dsgwcgibindir),g' \
@BUNDLE_TRUE@ -e 's,@dsgwconfigdir\@,$(dsgwconfigdir),g' \
@BUNDLE_TRUE@ -e 's,@dsgwcookiedir\@,$(dsgwcookiedir),g'
diff --git a/admserv/cgi-src40/restartsrv.c b/admserv/cgi-src40/restartsrv.c
index 9759c07..f4501cc 100644
--- a/admserv/cgi-src40/restartsrv.c
+++ b/admserv/cgi-src40/restartsrv.c
@@ -183,9 +183,14 @@ int main(int argc, char *argv[])
NULL, NULL);
break;
case 0:
+#if defined(ENABLE_SERVICE)
+ PR_snprintf(line, sizeof(line), "service " PACKAGE_NAME " restart");
+ restart(line);
+#else
if (util_find_file_in_paths(line, sizeof(line), "restart-ds-admin", CMDBINDIR, "../..", "")) {
restart(line);
}
+#endif
exit(0);
break;
default:
diff --git a/admserv/cgi-src40/stopsrv.c b/admserv/cgi-src40/stopsrv.c
index 05461f8..780a6d0 100644
--- a/admserv/cgi-src40/stopsrv.c
+++ b/admserv/cgi-src40/stopsrv.c
@@ -143,9 +143,14 @@ int main(int argc, char *argv[])
#else
sleep(5);
#endif
+#if defined(ENABLE_SERVICE)
+ PR_snprintf(line, sizeof(line), "service " PACKAGE_NAME " stop");
+ system(line);
+#else
if (util_find_file_in_paths(line, sizeof(line), "stop-ds-admin", CMDBINDIR, "../..", "")) {
system(line);
}
+#endif
exit(0);
break;
default:
diff --git a/admserv/newinst/src/AdminServer.pm.in b/admserv/newinst/src/AdminServer.pm.in
index 72d8529..9cff480 100644
--- a/admserv/newinst/src/AdminServer.pm.in
+++ b/admserv/newinst/src/AdminServer.pm.in
@@ -447,10 +447,18 @@ sub startAdminServer {
if ($isrunning) {
$setup->msg('restarting_adminserver');
- $rc = system("$selinux_cmd @cmdbindir@/restart-ds-admin > $filename 2>&1");
+ if ("@enable_service@") {
+ $rc = system("service @package_name@ restart > $filename 2>&1");
+ } else {
+ $rc = system("$selinux_cmd @cmdbindir@/restart-ds-admin > $filename 2>&1");
+ }
} else {
$setup->msg('starting_adminserver');
- $rc = system("$selinux_cmd @cmdbindir@/start-ds-admin > $filename 2>&1");
+ if ("@enable_service@") {
+ $rc = system("service @package_name@ start > $filename 2>&1");
+ } else {
+ $rc = system("$selinux_cmd @cmdbindir@/start-ds-admin > $filename 2>&1");
+ }
}
open(STARTLOG, "$filename");
@@ -573,21 +581,22 @@ sub reconfigAdminServer {
sub stopAdminServer {
my $prog = "@sbindir@/stop-ds-admin";
- if (-x $prog) {
- $? = 0;
- # run the stop command
- my $output = `$prog 2>&1`;
- my $status = $?;
- debug(3, "stopping admin server returns status $status: output $output\n");
- if ($status) {
- # Ignore the stop failure
- debug(1,"Warning: Could not stop admin server: status $status: output $output\n");
- return 1;
- }
- } else {
+ if ("@enable_service@") {
+ $prog = "service @package_name@ stop";
+ } elsif (! -x $prog) {
debug(1, "stopping admin server: no such program $prog: cannot stop server\n");
return 0;
}
+ $? = 0;
+ # run the stop command
+ my $output = `$prog 2>&1`;
+ my $status = $?;
+ debug(3, "stopping admin server returns status $status: output $output\n");
+ if ($status) {
+ # Ignore the stop failure
+ debug(1,"Warning: Could not stop admin server: status $status: output $output\n");
+ return 1;
+ }
debug(1, "Successfully stopped admin server\n");
return 1;
diff --git a/config.h.in b/config.h.in
index 9d3196f..a5e78f8 100644
--- a/config.h.in
+++ b/config.h.in
@@ -24,6 +24,9 @@
/* cpu type sparc */
#undef CPU_sparc
+/* Use the service command instead of the stop|start|restart scripts */
+#undef ENABLE_SERVICE
+
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
diff --git a/configure b/configure
index f15ce44..27ea93d 100755
--- a/configure
+++ b/configure
@@ -857,6 +857,7 @@ nss_inc
nspr_libdir
nspr_lib
nspr_inc
+enable_service
dslibdir
instconfigdir
SELINUX_FALSE
@@ -1050,6 +1051,7 @@ with_modnss_bin
with_selinux
with_instconfigdir
with_dslibdir
+enable_service
'
ac_precious_vars='build_alias
host_alias
@@ -1710,6 +1712,8 @@ Optional Features:
--enable-threading Admin Server works best if Apache has threading
support. Use --disable-threading to force the use of
an Apache without threading support.
+ --enable-service Use the service command instead of the
+ stop|start|restart scripts
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -5298,13 +5302,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5301: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:5305: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5304: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:5308: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5307: output\"" >&5)
+ (eval echo "\"\$as_me:5311: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6510,7 +6514,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6513 "configure"' > conftest.$ac_ext
+ echo '#line 6517 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9075,11 +9079,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9078: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9082: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9082: \$? = $ac_status" >&5
+ echo "$as_me:9086: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9414,11 +9418,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9417: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9421: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9421: \$? = $ac_status" >&5
+ echo "$as_me:9425: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9519,11 +9523,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9522: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9526: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9526: \$? = $ac_status" >&5
+ echo "$as_me:9530: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9574,11 +9578,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9577: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9581: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9581: \$? = $ac_status" >&5
+ echo "$as_me:9585: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12377,7 +12381,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12380 "configure"
+#line 12384 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12473,7 +12477,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12476 "configure"
+#line 12480 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14493,11 +14497,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14496: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14500: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14500: \$? = $ac_status" >&5
+ echo "$as_me:14504: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14592,11 +14596,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14595: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14599: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14599: \$? = $ac_status" >&5
+ echo "$as_me:14603: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14644,11 +14648,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14647: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14651: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14651: \$? = $ac_status" >&5
+ echo "$as_me:14655: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -22869,6 +22873,8 @@ else
fi
+{ $as_echo "$as_me:$LINENO: result: $instconfigdir" >&5
+$as_echo "$instconfigdir" >&6; }
# check for --with-dslibdir
{ $as_echo "$as_me:$LINENO: checking for --with-dslibdir" >&5
@@ -22891,6 +22897,42 @@ else
fi
+{ $as_echo "$as_me:$LINENO: result: $dslibdir" >&5
+$as_echo "$dslibdir" >&6; }
+
+# check for --enable-service
+# set default value based on availability of the service command
+if test -z "$enable_service" ; then
+ if test -f $sbindir/service ; then
+ enable_service=yes
+ elif test -f /sbin/service ; then
+ enable_service=yes
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: checking for --enable-service" >&5
+$as_echo_n "checking for --enable-service... " >&6; }
+# Check whether --enable-service was given.
+if test "${enable_service+set}" = set; then
+ enableval=$enable_service; if test x"$enableval" = xyes ; then
+ enable_service=yes
+else
+ enable_service=
+fi
+else
+ enable_service=
+
+fi
+
+
+if test -n "$enable_service" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_SERVICE 1
+_ACEOF
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $enable_service" >&5
+$as_echo "$enable_service" >&6; }
# installation paths - by default, configure will just
# use /usr as the prefix for everything, which means
diff --git a/configure.ac b/configure.ac
index 9fd1b3f..1a438e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -279,6 +279,7 @@ AC_ARG_WITH(instconfigdir,
instconfigdir='$(sysconfdir)/$(PACKAGE_BASE_NAME)'
])
AC_SUBST(instconfigdir)
+AC_MSG_RESULT([$instconfigdir])
# check for --with-dslibdir
AC_MSG_CHECKING(for --with-dslibdir)
@@ -296,6 +297,33 @@ AC_ARG_WITH(dslibdir,
dslibdir='$(libdir)/$(PACKAGE_BASE_NAME)'
])
AC_SUBST(dslibdir)
+AC_MSG_RESULT([$dslibdir])
+
+# check for --enable-service
+# set default value based on availability of the service command
+if test -z "$enable_service" ; then
+ if test -f $sbindir/service ; then
+ enable_service=yes
+ elif test -f /sbin/service ; then
+ enable_service=yes
+ fi
+fi
+AC_MSG_CHECKING(for --enable-service)
+AC_ARG_ENABLE(service,
+ AS_HELP_STRING([--enable-service],
+ [Use the service command instead of the stop|start|restart scripts]),
+[if test x"$enableval" = xyes ; then
+ enable_service=yes
+else
+ enable_service=
+fi],
+[enable_service=]
+)
+AC_SUBST(enable_service)
+if test -n "$enable_service" ; then
+ AC_DEFINE([ENABLE_SERVICE], [1], [Use the service command instead of the stop|start|restart scripts])
+fi
+AC_MSG_RESULT([$enable_service])
# installation paths - by default, configure will just
# use /usr as the prefix for everything, which means
diff --git a/man/man8/restart-ds-admin.8 b/man/man8/restart-ds-admin.8
index f6d3e56..c210103 100644
--- a/man/man8/restart-ds-admin.8
+++ b/man/man8/restart-ds-admin.8
@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
-.TH RESTART-DS-ADMIN 8 "Jun 8, 2010"
+.TH RESTART-DS-ADMIN 8 "Jul 1, 2011"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -21,6 +21,14 @@ restart-ds-admin \- restart script for Admin Server
.B restart-ds-admin
.SH DESCRIPTION
restart-ds-admin restarts the Admin Server instance
+.sp 2
+NOTE: On systems that provide the \fIservice\fP command
+or \fIsystemctl\fP or other
+similar command, that command should be used instead of this script.
+This script is only for those installations that do not support such
+mechanisms. e.g.
+.sp 2
+ service dirsrv-admin restart
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
diff --git a/man/man8/start-ds-admin.8 b/man/man8/start-ds-admin.8
index 420a5a0..70efd67 100644
--- a/man/man8/start-ds-admin.8
+++ b/man/man8/start-ds-admin.8
@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
-.TH START-DS-ADMIN 8 "Jun 8, 2010"
+.TH START-DS-ADMIN 8 "Jul 1, 2011"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -21,6 +21,14 @@ start-ds-admin \- start script for Admin Server
.B start-ds-admin
.SH DESCRIPTION
start-ds-admin starts the Admin Server instance
+.sp 2
+NOTE: On systems that provide the \fIservice\fP command
+or \fIsystemctl\fP or other
+similar command, that command should be used instead of this script.
+This script is only for those installations that do not support such
+mechanisms. e.g.
+.sp 2
+ service dirsrv-admin start
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
diff --git a/man/man8/stop-ds-admin.8 b/man/man8/stop-ds-admin.8
index 178bcf9..ccf9447 100644
--- a/man/man8/stop-ds-admin.8
+++ b/man/man8/stop-ds-admin.8
@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
-.TH STOP-DS-ADMIN 8 "Jun 8, 2010"
+.TH STOP-DS-ADMIN 8 "Jul 1 2011"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -21,6 +21,14 @@ stop-ds-admin \- stop script for Admin Server
.B stop-ds-admin
.SH DESCRIPTION
stop-ds-admin stops the Admin Server instance
+.sp 2
+NOTE: On systems that provide the \fIservice\fP command
+or \fIsystemctl\fP or other
+similar command, that command should be used instead of this script.
+This script is only for those installations that do not support such
+mechanisms. e.g.
+.sp 2
+ service dirsrv-admin stop
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
12 years, 9 months
admserv/newinst
by Richard Allen Megginson
admserv/newinst/src/30updateglobalpref.pl.in | 2 -
admserv/newinst/src/AdminMigration.pm.in | 5 ++--
admserv/newinst/src/AdminUtil.pm.in | 29 +++++++++++++++++++++++----
3 files changed, 29 insertions(+), 7 deletions(-)
New commits:
commit 26efc6d06796e1493763eab3e67e02034a44c432
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Jul 1 09:17:15 2011 -0600
Bug 718079 - Perl errors when running migrate-ds-admin.pl
https://bugzilla.redhat.com/show_bug.cgi?id=718079
Resolves: bug 718079
Bug Description: Perl errors when running migrate-ds-admin.pl
Reviewed by: nkinder, nhosoi (Thanks!)
Branch: master
Fix Description: We may not have a single $admininf object if there is a
skin package, so get the first value from the list of Inf objects. Added
a new function getInfsVal to get the value from a list of Inf objects
given a section and a parameter.
30updateglobalprefs was using the wrong map - we don't need the configds
map if we're just doing updates.
during migration ConfigDirectoryAdminID can be just a userid - do not
assume it will always be a DN
Had to amend my previous patch - ConfigDirectoryAdminID was not being set
Platforms tested: Fedora 15 x86_64
Flag Day: no
Doc impact: no
diff --git a/admserv/newinst/src/30updateglobalpref.pl.in b/admserv/newinst/src/30updateglobalpref.pl.in
index 14dc910..eb48517 100644
--- a/admserv/newinst/src/30updateglobalpref.pl.in
+++ b/admserv/newinst/src/30updateglobalpref.pl.in
@@ -38,7 +38,7 @@ sub post {
$setupinf->{General}->{Suffix} = 'notused';
my $upd = { path => '@ldifdir(a)/02globalpreferences.ldif.tmpl',
- mapper => "@infdir(a)/configdsroot.map",
+ mapper => "@infdir(a)/updateconsoleinfo.map",
infary => \@infs
};
diff --git a/admserv/newinst/src/AdminMigration.pm.in b/admserv/newinst/src/AdminMigration.pm.in
index 4ee9ab4..78c8328 100644
--- a/admserv/newinst/src/AdminMigration.pm.in
+++ b/admserv/newinst/src/AdminMigration.pm.in
@@ -295,9 +295,10 @@ sub updateConsoleInfo {
for (@oldents) {
my $olddn = $_->getDN();
- if (($olddn =~ /ou=(\d.\d)/) && ($1 ne $admininf->{admin}->{ConsoleVersion})) {
+ my $ver = getInfsVal('admin', 'ConsoleVersion', @infs);
+ if (($olddn =~ /ou=(\d.\d)/) && ($1 ne $ver)) {
my $newdn = $olddn;
- $newdn =~ s/ou=$1/ou=$admininf->{admin}->{ConsoleVersion}/;
+ $newdn =~ s/ou=$1/ou=$ver/;
my $newent = $_;
$newent->setDN($newdn);
$conn->add($newent);
diff --git a/admserv/newinst/src/AdminUtil.pm.in b/admserv/newinst/src/AdminUtil.pm.in
index 496e1ed..b33b601 100644
--- a/admserv/newinst/src/AdminUtil.pm.in
+++ b/admserv/newinst/src/AdminUtil.pm.in
@@ -23,13 +23,13 @@ require Exporter;
updateAdmConf updateAdmpw updateLocalConf importCACert
getLocalConfigDS getPset registerDSWithConfigDS
registerManyDSWithConfigDS createSubDSNoConn
- registerScatteredDSWithConfigDS getInfs
+ registerScatteredDSWithConfigDS getInfs getInfsVal
unregisterDSWithConfigDS isConfigDS addConfigACIsToSubDS);
@EXPORT_OK = qw(getAdmConf getConfigDSConn createConfigDS createSubDS
updateAdmConf updateAdmpw updateLocalConf importCACert
getLocalConfigDS getPset registerDSWithConfigDS
registerManyDSWithConfigDS createSubDSNoConn
- registerScatteredDSWithConfigDS getInfs
+ registerScatteredDSWithConfigDS getInfs getInfsVal
unregisterDSWithConfigDS isConfigDS addConfigACIsToSubDS);
# load perldap
@@ -705,6 +705,8 @@ sub registerManyDSWithConfigDS {
}
$instinf->{General}->{ConfigDirectoryLdapURL} =
$inf->{General}->{ConfigDirectoryLdapURL};
+ $instinf->{General}->{ConfigDirectoryAdminID} =
+ $inf->{General}->{ConfigDirectoryAdminID};
$instinf->{General}->{AdminDomain} = $inf->{General}->{AdminDomain};
$instinf->{admin}->{ServerAdminID} = $inf->{admin}->{ServerAdminID};
if (!registerDSWithConfigDS($inst, $errs, $instinf,
@@ -834,7 +836,11 @@ sub registerDSWithConfigDSExt {
# need to get the admin uid
if (!$inf->{admin}->{ServerAdminID}) {
my @rdns = ldap_explode_dn($inf->{General}->{ConfigDirectoryAdminID}, 1);
- $inf->{admin}->{ServerAdminID} = $rdns[0];
+ if (@rdns and $rdns[0]) {
+ $inf->{admin}->{ServerAdminID} = $rdns[0];
+ } else { # a userid not a dn
+ $inf->{admin}->{ServerAdminID} = $inf->{General}->{ConfigDirectoryAdminID};
+ }
}
my $instinf;
@@ -896,7 +902,7 @@ sub getInfs {
for my $inffile (@infs) {
if ($inffile =~ m,^@infdir(a)/.+-$name\.inf$,) {
# brand specific
- debug(2, "Found brand specific inf file", $inffile);
+ debug(2, "Found brand specific inf file", $inffile, "\n");
push @ary, new Inf($inffile);
}
}
@@ -909,6 +915,21 @@ sub getInfs {
return @ary;
}
+# get a value from a collection of Inf objects
+# given a section and a parameter, will return
+# the value from the first Inf that has the
+# section and value
+sub getInfsVal {
+ my ($sec, $parm, @infs) = @_;
+ for my $inf (@infs) {
+ if ($inf and exists($inf->{$sec}) and defined($inf->{$sec}) and
+ exists($inf->{$sec}->{$parm}) and defined($inf->{$sec}->{$parm})) {
+ return $inf->{$sec}->{$parm};
+ }
+ }
+ return undef;
+}
+
1;
# emacs settings
12 years, 9 months
2 commits - ldap/servers
by Noriko Hosoi
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit f069f4bc18607ceef5d01e57b4102a0317819f8b
Merge: b554264 20c4201
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Jul 1 14:12:35 2011 -0700
Merge branch '718303'
commit 20c42018a6cacde318c4213568ff4d31404af6e0
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Jul 1 12:25:44 2011 -0700
Bug 718303 - Intensive updates on masters could break the consumer's cache
https://bugzilla.redhat.com/show_bug.cgi?id=718303
Description: When adding a tombstone to the entry cache, the source
code assumed the original entry already existed in the cache and
cache_add failed. But under some high stress + narrow window to
receive the updates from multi-masters, the original entry could
have been already evicted and the tombstone could be successfully
added to the entry cache. When the rare case occurred, the entry
in the cache was freed instead of put into LRU and when the entry
was searched in the entry cache, the server died by segfault.
This patch checks the entry after attempting to put it into the
entry cache. If the entry's state is in-cache, sets the correct
flag (tombstone_in_cache = 1).
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index dc759b4..f2edf1e 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -495,6 +495,11 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
if (cache_add_tentative( &inst->inst_cache, tombstone, NULL) == 0) {
tombstone_in_cache = 1;
+ } else if (!(tombstone->ep_state & ENTRY_STATE_NOTINCACHE)) {
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE,
+ "id2entry_add tombstone (%s) is in cache\n",
+ slapi_entry_get_dn(tombstone->ep_entry));
+ tombstone_in_cache = 1;
}
}
else
12 years, 9 months
ldap/servers
by Noriko Hosoi
ldap/servers/slapd/back-ldbm/misc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit b554264e6b6056414d17044991c3b5ec839d0981
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Jul 1 12:16:09 2011 -0700
Bug 711679 - unresponsive LDAP service when deleting vlv on replica
https://bugzilla.redhat.com/show_bug.cgi?id=711679
Description: Normal operation acquires rlock on be_lock, then locks
inst_config_mutex. Function instance_set_busy_and_readonly used to
lock them in the opposite order, which caused the server deadlock.
This patch fixes it by releasing inst_config_mutex before acquiring
wlock on be_lock in slapi_mtn_be_set_readonly.
diff --git a/ldap/servers/slapd/back-ldbm/misc.c b/ldap/servers/slapd/back-ldbm/misc.c
index c8b3b7f..9255ddb 100644
--- a/ldap/servers/slapd/back-ldbm/misc.c
+++ b/ldap/servers/slapd/back-ldbm/misc.c
@@ -199,9 +199,14 @@ int instance_set_busy_and_readonly(ldbm_instance *inst)
} else {
inst->inst_flags &= ~INST_FLAG_READONLY;
}
+ /*
+ * Normally, acquire rlock on be_lock, then lock inst_config_mutex.
+ * instance_set_busy_and_readonly should release inst_config_mutex
+ * before acquiring wlock on be_lock in slapi_mtn_be_set_readonly.
+ */
+ PR_Unlock(inst->inst_config_mutex);
slapi_mtn_be_set_readonly(inst->inst_be, 1);
- PR_Unlock(inst->inst_config_mutex);
return 0;
}
12 years, 9 months