diff options
Diffstat (limited to 'ldap/servers/slapd')
33 files changed, 65 insertions, 474 deletions
diff --git a/ldap/servers/slapd/agtmmap.c b/ldap/servers/slapd/agtmmap.c index 9be091b2..8211b7ba 100644 --- a/ldap/servers/slapd/agtmmap.c +++ b/ldap/servers/slapd/agtmmap.c @@ -43,7 +43,7 @@ /******************************************************************** * * agtmmap.c: Memory Map interface for SNMP sub-agent for - * Fedora Directory Server stats (for UNIX environment). + * Directory Server stats (for UNIX environment). * * Revision History: * 07/22/97 Created Steve Ross diff --git a/ldap/servers/slapd/agtmmap.h b/ldap/servers/slapd/agtmmap.h index 14f622a3..08b7a271 100644 --- a/ldap/servers/slapd/agtmmap.h +++ b/ldap/servers/slapd/agtmmap.h @@ -44,7 +44,7 @@ /******************************************************************** * * agtmmap.h: Memory Map interface for SNMP sub-agent for - * Fedora Directory Server stats (for UNIX environment). + * Directory Server stats (for UNIX environment). * * Revision History: * 07/22/97 Created Steve Ross diff --git a/ldap/servers/slapd/back-ldbm/init.c b/ldap/servers/slapd/back-ldbm/init.c index 76e6d192..e52d8eac 100644 --- a/ldap/servers/slapd/back-ldbm/init.c +++ b/ldap/servers/slapd/back-ldbm/init.c @@ -48,8 +48,8 @@ static void *IDL_api[3]; -static Slapi_PluginDesc pdesc = { "ldbm-backend", PLUGIN_MAGIC_VENDOR_STR, - PRODUCTTEXT, "high-performance LDAP backend database plugin" }; +static Slapi_PluginDesc pdesc = { "ldbm-backend", VENDOR, + PACKAGE_VERSION, "high-performance LDAP backend database plugin" }; static int add_ldbm_internal_attr_syntax( const char *name, const char *oid, const char *syntax, const char *mr_equality, unsigned long extraflags ); @@ -295,7 +295,7 @@ add_ldbm_internal_attr_syntax( const char *name, const char *oid, origins[1] = NULL; rc = attr_syntax_create( oid, names, 1, - "Fedora defined attribute type", + "internal server defined attribute type", NULL, /* superior */ mr_equality, NULL, NULL, /* matching rules */ origins, syntax, diff --git a/ldap/servers/slapd/back-ldbm/upgrade.c b/ldap/servers/slapd/back-ldbm/upgrade.c index a9c0cf94..94cbdcbe 100644 --- a/ldap/servers/slapd/back-ldbm/upgrade.c +++ b/ldap/servers/slapd/back-ldbm/upgrade.c @@ -338,7 +338,7 @@ int ldbm_upgrade(ldbm_instance *inst, int action) { LDAPDebug(LDAP_DEBUG_ANY, "ldbm_upgrade: Upgrading instance %s to %s%s is successfully done.\n", - inst->inst_name, LDBM_VERSION_BASE, PRODUCTTEXT); + inst->inst_name, LDBM_VERSION_BASE, PACKAGE_VERSION); } else { diff --git a/ldap/servers/slapd/back-ldif/back-ldif.h b/ldap/servers/slapd/back-ldif/back-ldif.h index 56bbcfd6..964c58ae 100644 --- a/ldap/servers/slapd/back-ldif/back-ldif.h +++ b/ldap/servers/slapd/back-ldif/back-ldif.h @@ -58,7 +58,6 @@ #include "ldaplog.h" #include "portable.h" -#include "dirver.h" #include "slap.h" #ifdef _WIN32 diff --git a/ldap/servers/slapd/back-ldif/init.c b/ldap/servers/slapd/back-ldif/init.c index a3259b26..ab74f2f4 100644 --- a/ldap/servers/slapd/back-ldif/init.c +++ b/ldap/servers/slapd/back-ldif/init.c @@ -51,7 +51,7 @@ #include "back-ldif.h" -static Slapi_PluginDesc pdesc = { "ldif-backend", "Netscape", PRODUCTTEXT, +static Slapi_PluginDesc pdesc = { "ldif-backend", "Netscape", PACKAGE_VERSION, "LDIF backend database plugin" }; #ifdef _WIN32 diff --git a/ldap/servers/slapd/extendop.c b/ldap/servers/slapd/extendop.c index ced66c34..d3e6d5a2 100644 --- a/ldap/servers/slapd/extendop.c +++ b/ldap/servers/slapd/extendop.c @@ -353,9 +353,9 @@ extended_op_oid2string( const char *oid ) const char *rval = NULL; if ( 0 == strcmp(oid, EXTOP_BULK_IMPORT_START_OID)) { - rval = "Fedora Bulk Import Start"; + rval = "Bulk Import Start"; } else if ( 0 == strcmp(oid, EXTOP_BULK_IMPORT_DONE_OID)) { - rval = "Fedora Bulk Import End"; + rval = "Bulk Import End"; } else { rval = plugin_extended_op_oid2string( oid ); } diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c index d806809e..3d203534 100644 --- a/ldap/servers/slapd/libglobs.c +++ b/ldap/servers/slapd/libglobs.c @@ -4560,13 +4560,6 @@ config_get_require_secure_binds(void) return retVal; } - -int -config_is_slapd_lite () -{ - return ( SLAPD_FULL ); -} - int config_set_maxbersize( const char *attrname, char *value, char *errorbuf, int apply ) { diff --git a/ldap/servers/slapd/libslapd.def b/ldap/servers/slapd/libslapd.def index d48719f1..c2bdfbef 100644 --- a/ldap/servers/slapd/libslapd.def +++ b/ldap/servers/slapd/libslapd.def @@ -36,7 +36,7 @@ ; All rights reserved. ; END COPYRIGHT BLOCK ; -DESCRIPTION 'Fedora Directory Server 1 Utility Library' +DESCRIPTION 'Dirsrv 1.0 Plug-in Utility Library' EXPORTS slapd_log_error_proc @2 slapd_log_audit_proc @3 @@ -567,7 +567,7 @@ EXPORTS config_check_referral_mode @533 attr_set_deletion_csn @534 slapi_mod_dump @535 - config_is_slapd_lite @536 +; config_is_slapd_lite @536 ; config_set_slapd_type @537 config_get_versionstring @538 slapi_is_rootdse @539 diff --git a/ldap/servers/slapd/lite_entries.c b/ldap/servers/slapd/lite_entries.c deleted file mode 100644 index afa08db5..00000000 --- a/ldap/servers/slapd/lite_entries.c +++ /dev/null @@ -1,143 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * This Program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation; version 2 of the License. - * - * This Program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -/* lite_entries.c - - * - * These entries are added under cn=options,cn=features,cn=config for - * Directory Lite. These entries tell the console which modules ( ds features ) - * are disabled, and which attributes in cn=config are disabled. - */ - - - - -#include "slap.h" - -static void del_dslite_entries(); -static void add_dslite_entries(); -static const char *lite_entries[] = -{ - "dn:" LITE_DISABLED_ATTRS_DN "\n" - "cn:attributes\n" - "objectclass:top\n" - "objectclass:extensibleObject\n" - "objectclass:directoryServerFeature\n" - "cn=config|nsslapd-referral:off\n" - "cn=config|nsslapd-maxdescriptors:off\n", - - "dn:" LITE_DISABLED_MODULES_DN "\n" - "objectclass:top\n" - "objectclass:directoryServerFeature\n" - "objectclass:extensibleObject\n" - "cn:modules\n" - "replication:off\n" - "passwordpolicy:off\n" - "accountlockout:off\n" - "snmpsettings:off\n" - "backup:off\n", - - NULL -}; - -/* add_dslite_entries: - * - * Add the DirLite specific entries. - * First we try to delete them in case they were already loaded from dse.ldif - * but are in some sort of invalid state. - * Then we add them back. - * It would have been better to make sure that these entries never get written - * to dse.ldif, but it doesn't look like we're able to add a dse_callback function - * on the DN's of these entries but they get added at the wrong time. - */ - - - -static void -add_dslite_entries() { - int i; - - del_dslite_entries(); - LDAPDebug( LDAP_DEBUG_TRACE, "Adding lite entries.\n",0,0,0); - for( i = 0; lite_entries[i]; i++ ) { - Slapi_PBlock *resultpb; - char *estr = slapi_ch_strdup ( lite_entries[i] ); - Slapi_Entry *e = slapi_str2entry( estr, 0 ); - if ( NULL != e ) { - resultpb = slapi_add_entry_internal( e, NULL, 0 ); - slapi_ch_free ( (void **) &resultpb ); - slapi_ch_free ( (void **) &estr ); - } - } -} - - -/* del_dslite_entries: delete the DirLite specific entries */ -static void -del_dslite_entries() { - Slapi_PBlock *resultpb; - LDAPDebug( LDAP_DEBUG_TRACE, "Deleting lite entries if they exist\n",0,0,0); - resultpb = slapi_delete_internal ( LITE_DISABLED_ATTRS_DN, NULL, 0 ); - slapi_pblock_destroy ( resultpb ); - resultpb = slapi_delete_internal ( LITE_DISABLED_MODULES_DN, NULL, 0 ); - slapi_pblock_destroy ( resultpb ); -} - -/* lite_entries_init() - * Add the appropriate entries under cn=options,cn=features,cn=config if the - * server is running as Directory Lite. - * - * Otherwise, if the server is the Full Directory, try to delete the entries if - * they're already there. - */ - -void -lite_entries_init() { - if ( config_is_slapd_lite() ) { - add_dslite_entries(); - } - else { - del_dslite_entries(); - } -} - - - diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c index 7241129f..33c57f46 100644 --- a/ldap/servers/slapd/log.c +++ b/ldap/servers/slapd/log.c @@ -1611,7 +1611,7 @@ log_write_title (LOGFD fp) int err = 0; PR_snprintf(buff, bufflen, "\t%s B%s\n", - fe_cfg->versionstring ? fe_cfg->versionstring : "Fedora-Directory", + fe_cfg->versionstring ? fe_cfg->versionstring : CAPBRAND "-Directory/" PACKAGE_VERSION, buildnum ? buildnum : ""); LOG_WRITE_NOW(fp, buff, strlen(buff), 0, err); @@ -2722,7 +2722,7 @@ log__access_rotationinfof(char *pathname) /* * log__check_prevlogs * -* check if a given prev log file (e.g., /opt/fedora-ds/slapd-fe/logs/errors.20051201-101347) +* check if a given prev log file (e.g., /var/log/dirsrv/slapd-fe/logs/errors.20051201-101347) * is found in the rotationinfo file. */ static int diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c index ed51825e..33e6e11e 100644 --- a/ldap/servers/slapd/main.c +++ b/ldap/servers/slapd/main.c @@ -1190,8 +1190,6 @@ main( int argc, char **argv) if (slapd_exemode != SLAPD_EXEMODE_REFERRAL) { /* else do this after seteuid() */ - lite_entries_init(); - /* setup cn=tasks tree */ task_init(); @@ -2284,11 +2282,6 @@ slapd_exemode_db2ldif(int argc, char** argv) 0, 0, 0 ); return 1; } - if ( config_is_slapd_lite () && - !slapi_config_get_readonly () && is_slapd_running() ) { - LDAPDebug( LDAP_DEBUG_ANY, "%s\n", LITE_BACKUP_ERR, 0, 0); - return 1; - } if (! (SLAPI_PLUGIN_IS_V2(plugin))) { LDAPDebug(LDAP_DEBUG_ANY, "ERROR: %s is too old to do exports.\n", @@ -2525,11 +2518,6 @@ slapd_exemode_db2archive() return 1; } - if ( config_is_slapd_lite () && !slapi_config_get_readonly () && is_slapd_running ()) { - LDAPDebug( LDAP_DEBUG_ANY, "%s\n", LITE_BACKUP_ERR, 0, 0); - return 1; - } - /* Make sure we aren't going to run slapd in * a mode that is going to conflict with other * slapd processes that are currently running diff --git a/ldap/servers/slapd/ntmsgdll/ntslapdmessages.mc b/ldap/servers/slapd/ntmsgdll/ntslapdmessages.mc index 77fe4762..7f5c2d6f 100644 --- a/ldap/servers/slapd/ntmsgdll/ntslapdmessages.mc +++ b/ldap/servers/slapd/ntmsgdll/ntslapdmessages.mc @@ -180,7 +180,7 @@ Severity=Success Facility=Startup SymbolicName=MSG_SERVER_STARTED Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server has successfully started. . MessageId=0x2 @@ -188,7 +188,7 @@ Severity=Success Facility=Slapd SymbolicName=MSG_SERVER_SHUTDOWN Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server has shutdown. . MessageId=0x3 @@ -196,7 +196,7 @@ Severity=Success Facility=Slapd SymbolicName=MSG_SERVER_STOPPED Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server has stopped. . MessageId=0x4 @@ -204,7 +204,7 @@ Severity=Success Facility=Startup SymbolicName=MSG_SERVER_STARTING Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server is starting. . MessageId=0x5 @@ -212,7 +212,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_SERVER_START_FAILED Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server has failed on startup. %2 . MessageId=0x6 @@ -220,7 +220,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_SERVER_START_FAILED_CTRL_HANDLER Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server has failed on startup. Failed to Register with Service Control handler. . MessageId=0x7 @@ -228,7 +228,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_SERVER_PASSWORD_DIALOG_FAILED Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server failed to create the Key Database Passphrase dialog. . MessageId=0x8 @@ -236,7 +236,7 @@ Severity=Error Facility=Registry SymbolicName=MSG_WD_REGISTRY Language=English -Fedora Directory Server: %1. +Directory Server: %1. Could not open registry key: %2 . MessageId=0x9 @@ -244,7 +244,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_WD_BADCMDLINE Language=English -Fedora Directory Server: %1 +Directory Server: %1 Invalid command line specified: %2 . MessageId=0xA @@ -252,7 +252,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_WD_BADPASSWORD Language=English -Fedora Directory Server: %1. +Directory Server: %1. Incorrect SSL password entered. . MessageId=0xB @@ -260,7 +260,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_WD_STRING Language=English -Fedora Directory Server: %1. +Directory Server: %1. %2 . MessageId=0xC @@ -268,7 +268,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_WD_STARTFAILED Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server could not be started. Command line used: %2 . @@ -277,7 +277,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_WD_RESTART Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server terminated abnormally with error code %2. An attempt will be made to restart it. . @@ -286,7 +286,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_CRON_STARTFAILED Language=English -Fedora Directory Server: %1. +Directory Server: %1. The scheduled job (%2) could not be started. . MessageId=0xF @@ -294,7 +294,7 @@ Severity=Error Facility=Slapd SymbolicName=MSG_SERVER_SHUTDOWN_STARTING Language=English -Fedora Directory Server: %1. +Directory Server: %1. The directory server is shutting down. . MessageId=0x10 @@ -302,7 +302,7 @@ Severity=Error Facility=Startup SymbolicName=MSG_SERVER_KEYDB_PASSPHRASE_WRONG Language=English -Fedora Directory Server: %1. +Directory Server: %1. The specified key database passphrase is incorrect. . MessageId=0x11 @@ -310,6 +310,6 @@ Severity=Error Facility=Slapd SymbolicName=MSG_SERVER_FAILED_TO_WRITE_LOG Language=English -Fedora Directory Server: %1. +Directory Server: %1. Failed to write log: %2. . diff --git a/ldap/servers/slapd/ntperfdll/nsldapctrs.ini b/ldap/servers/slapd/ntperfdll/nsldapctrs.ini index 99009713..587b6719 100644 --- a/ldap/servers/slapd/ntperfdll/nsldapctrs.ini +++ b/ldap/servers/slapd/ntperfdll/nsldapctrs.ini @@ -45,8 +45,8 @@ symbolfile=nsldapctrdef.h 009=English [text] -NS_OBJ_009_NAME=Fedora Directory Server 1.0 -NS_OBJ_009_HELP=Fedora Directory Server +NS_OBJ_009_NAME=Directory Server 1.0 +NS_OBJ_009_HELP=Directory Server CONN_RATE_009_NAME=Client Connections/sec CONN_RATE_009_HELP=Rate of incoming client connections THROUGHPUT_009_NAME=Server Network Throughput (bytes/sec) diff --git a/ldap/servers/slapd/ntuserpin.c b/ldap/servers/slapd/ntuserpin.c index 8a9eb718..fa9320d5 100644 --- a/ldap/servers/slapd/ntuserpin.c +++ b/ldap/servers/slapd/ntuserpin.c @@ -142,7 +142,7 @@ static char *getPin(SVRCOREPinObj *obj, const char *tokenName, PRBool retry) if (retry) { MessageBox(GetDesktopWindow(), nt_retryWarning, - "Fedora Server", MB_ICONEXCLAMATION | MB_OK); + CAPBRAND " Server", MB_ICONEXCLAMATION | MB_OK); } else { if((cbRemotePassword != 0) && (szRemotePassword != 0)) { diff --git a/ldap/servers/slapd/passwd_extop.c b/ldap/servers/slapd/passwd_extop.c index 5c87303a..bba6d418 100644 --- a/ldap/servers/slapd/passwd_extop.c +++ b/ldap/servers/slapd/passwd_extop.c @@ -85,7 +85,7 @@ #define LDAP_EXTOP_PASSMOD_RANDOM_BYTES 6 -Slapi_PluginDesc passwdopdesc = { "passwd_modify_plugin", "Fedora", "0.1", +Slapi_PluginDesc passwdopdesc = { "passwd_modify_plugin", VENDOR, PACKAGE_VERSION, "Password Modify extended operation plugin" }; /* Check SLAPI_USERPWD_ATTR attribute of the directory entry diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c index 17730d59..e5e016d3 100644 --- a/ldap/servers/slapd/plugin.c +++ b/ldap/servers/slapd/plugin.c @@ -62,7 +62,6 @@ static int plugin_call_func (struct slapdplugin *list, int operation, Slapi_PBlo static PRBool plugin_invoke_plugin_pb (struct slapdplugin *plugin, int operation, Slapi_PBlock *pb); static PRBool plugin_matches_operation (Slapi_DN *target_spec, PluginTargetData *ptd, PRBool bindop, PRBool isroot, PRBool islocal, int method); -static int isApprovedPlugin( struct slapdplugin *plugin ); static void plugin_config_init (struct pluginconfig *config); static void plugin_config_cleanup (struct pluginconfig *config); @@ -1545,48 +1544,6 @@ slapi_get_supported_extended_ops_copy( void ) } -/* isApprovedPlugin: - * returns 1 if the plugin is approved to be loaded, 0 otherwise. - * - * If the server is running as the Full version, all plugins are approved, - * otherwise, if the server is running as DirectoryLite, only plugins from - * Red Hat are approved. - * - * We have a special case for the NT Synch plugin, which is disabled for DLite. - */ -static int -isApprovedPlugin( struct slapdplugin *plugin ) -{ - if ( config_is_slapd_lite() == 0 ) { - /* All the plugins are approved for Directory Full */ - return 1; - } - - if ( plugin == NULL ) { - LDAPDebug( LDAP_DEBUG_ANY, "isApprovedPlugin: plugin is NULL\n", 0,0,0 ); - return 0; - } - if (plugin->plg_desc.spd_vendor == NULL ) { - LDAPDebug( LDAP_DEBUG_ANY, "isApprovedPlugin: plugin vendor is NULL\n",0,0,0 ); - return 0; - } - - LDAPDebug ( LDAP_DEBUG_TRACE, "isApprovedPlugin() looking at plugin \"%s\" from vendor %s\n", - plugin->plg_name, plugin->plg_desc.spd_vendor, 0 ); - - /* - * approved plugins must have their vendor string set to PLUGIN_MAGIC VENDOR_STR. External - * plugins are not allowed for Lite. - */ - if ( strcmp( plugin->plg_desc.spd_vendor, PLUGIN_MAGIC_VENDOR_STR ) == 0) - return 1; - - LDAPDebug ( LDAP_DEBUG_ANY, "isApprovedPlugin() plugin \"%s\" is not approved for Directory Lite\n", - plugin->plg_name, 0,0 ); - return 0; -} - - /* looks up the given string type to convert to the internal integral type; also returns the plugin list associated with the plugin type @@ -1997,7 +1954,6 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group, slapi_plugin_init_fnptr initfunc = p_initfunc; Slapi_PBlock pb; int status = 0; - int approved = 1; int enabled = 1; char *configdir = 0; @@ -2194,47 +2150,25 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group, status = plugin_add_descriptive_attributes( plugin_entry, plugin ); } - /* see if the plugin is approved or not */ - if ((approved = isApprovedPlugin(plugin)) != 0) - { - if ((!plugin->plg_version) || - (!SLAPI_PLUGIN_IS_COMPAT(plugin->plg_version))) { - LDAPDebug( LDAP_DEBUG_ANY, "Plugin \"%s\" from library \"%s\"" - " has wrong version (supported versions: %s)\n", - plugin->plg_name, plugin->plg_libpath, - SLAPI_PLUGIN_SUPPORTED_VERSIONS); - approved = 0; - } - } - if (value) slapi_ch_free((void**)&value); - if (!approved) { - enabled = 0; - LDAPDebug(LDAP_DEBUG_ANY, "Plugin \"%s\" is disabled.\n", - plugin->plg_name,0,0); + if(enabled) + { + /* don't use raw pointer from plugin_entry because it + will be freed later by the caller */ + Slapi_DN *dn_copy = slapi_sdn_dup(slapi_entry_get_sdn_const(plugin_entry)); + add_plugin_to_list(plugin_list, plugin); + add_plugin_entry_dn(dn_copy); } - if (approved) + if (add_entry) { - if(enabled) - { - /* don't use raw pointer from plugin_entry because it - will be freed later by the caller */ - Slapi_DN *dn_copy = slapi_sdn_dup(slapi_entry_get_sdn_const(plugin_entry)); - add_plugin_to_list(plugin_list, plugin); - add_plugin_entry_dn(dn_copy); - } - - if (add_entry) - { - /* make a copy of the plugin entry for our own use because it will - be freed later by the caller */ - Slapi_Entry *e_copy = slapi_entry_dup(plugin_entry); - /* new_plugin_entry(&plugin_entries, plugin_entry, plugin); */ - new_plugin_entry(&dep_plugin_entries, e_copy, plugin); - } + /* make a copy of the plugin entry for our own use because it will + be freed later by the caller */ + Slapi_Entry *e_copy = slapi_entry_dup(plugin_entry); + /* new_plugin_entry(&plugin_entries, plugin_entry, plugin); */ + new_plugin_entry(&dep_plugin_entries, e_copy, plugin); } diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h index 5c6eed4d..9c6c16ef 100644 --- a/ldap/servers/slapd/proto-slap.h +++ b/ldap/servers/slapd/proto-slap.h @@ -1107,11 +1107,6 @@ struct matchingRuleList *g_get_global_mrl(); void g_set_global_mrl(struct matchingRuleList *newglobalmrl); /* - * lite_entries.c - */ -void lite_entries_init(); - -/* * generation.c */ diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c index 3eb3ab82..98224df6 100644 --- a/ldap/servers/slapd/schema.c +++ b/ldap/servers/slapd/schema.c @@ -117,7 +117,6 @@ static int schema_check_name(char *name, PRBool isAttribute, char *errorbuf, size_t errorbufsize ); static int schema_check_oid(const char *name, const char *oid, PRBool isAttribute, char *errorbuf, size_t errorbufsize); -static int has_smart_referral( Slapi_Entry *e ); static int isExtensibleObjectclass(const char *objectclass); static int strip_oc_options ( struct objclass *poc ); static char *stripOption (char *attr); @@ -458,13 +457,6 @@ slapi_entry_schema_check( Slapi_PBlock *pb, Slapi_Entry *e ) char errtext[ BUFSIZ ]; PRUint32 schema_flags = 0; - /* smart referrals are not allowed in Directory Lite */ - if ( config_is_slapd_lite() ) { - if ( has_smart_referral(e) ) { - return 1; - } - } - /* * say the schema checked out ok if we're not checking schema at * all, or if this is a replication update. @@ -3841,44 +3833,6 @@ static void sizedbuffer_allocate(struct sizedbuffer *p, size_t sizeneeded) } /* - * has_smart_referral: returns 1 if the entry contains a ref attribute, - * or a referral objectclass. - * - * Returns 0 If not. - */ - - -static int -has_smart_referral( Slapi_Entry *e ) { - - Slapi_Attr *aoc; - char ebuf[BUFSIZ]; - - /* Look for the ref attribute */ - if ( (aoc = attrlist_find( e->e_attrs, "ref" )) != NULL ) { - LDAPDebug ( LDAP_DEBUG_ANY, "Entry \"%s\" contains a ref attrbute. Smart referrals are disabled in Directory Lite.\n", escape_string(slapi_entry_get_dn_const(e), ebuf),0,0 ); - return 1; - } - - /* Look for the referral objectclass */ - if ( (aoc = attrlist_find( e->e_attrs, "objectclass" )) != NULL ) { - Slapi_Value target, *found; - slapi_value_init(&target); - slapi_value_set_string(&target,"referral"); - found= slapi_valueset_find(aoc, &aoc->a_present_values, &target); - value_done(&target); - if(found!=NULL) - { - LDAPDebug ( LDAP_DEBUG_ANY, "Entry \"%s\" is a referral object class. Smart referrals are disabled in Directory Lite.\n", escape_string(slapi_entry_get_dn_const(e), ebuf),0,0 ); - return 1; - } - } - - /* No smart referral here */ - return 0; -} - -/* * Check if the object class is extensible */ static int isExtensibleObjectclass(const char *objectclass) diff --git a/ldap/servers/slapd/slap.h b/ldap/servers/slapd/slap.h index 03658354..55184a32 100644 --- a/ldap/servers/slapd/slap.h +++ b/ldap/servers/slapd/slap.h @@ -162,10 +162,8 @@ typedef struct symbol_t { #include "ldaplog.h" #include "portable.h" #include "rwlock.h" -#include "litekey.h" #include "disconnect_errors.h" -#include "dirver.h" #include "csngen.h" #include "uuid.h" @@ -206,9 +204,9 @@ typedef struct symbol_t { #define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319" #endif -#define SLAPD_VENDOR_NAME "Fedora Project" -#define SLAPD_VERSION_STR "Fedora-Directory/" PRODUCTTEXT -#define SLAPD_SHORT_VERSION_STR PRODUCTTEXT +#define SLAPD_VENDOR_NAME VENDOR +#define SLAPD_VERSION_STR CAPBRAND "-Directory/" PACKAGE_VERSION +#define SLAPD_SHORT_VERSION_STR PACKAGE_VERSION typedef void (*VFP)(void *); typedef void (*VFPP)(void **); @@ -2033,9 +2031,6 @@ typedef struct _slapdFrontendConfig { #endif /* MEMPOOL_EXPERIMENTAL */ } slapdFrontendConfig_t; -#define SLAPD_FULL 0 -#define SLAPD_LITE 1 - /* possible values for slapdFrontendConfig_t.schemareplace */ #define CONFIG_SCHEMAREPLACE_STR_OFF "off" #define CONFIG_SCHEMAREPLACE_STR_ON "on" diff --git a/ldap/servers/slapd/slapi-private.h b/ldap/servers/slapd/slapi-private.h index b29dcb74..c09e9759 100644 --- a/ldap/servers/slapd/slapi-private.h +++ b/ldap/servers/slapd/slapi-private.h @@ -1072,7 +1072,6 @@ int slapi_uniqueIDGenerateFromNameString(char **uId, * JCMREPL - Added for the replication plugin. */ -int config_is_slapd_lite( void ); void schema_expand_objectclasses_nolock( Slapi_Entry *e ); #define DSE_SCHEMA_NO_LOAD 0x0001 /* schema won't get loaded */ diff --git a/ldap/servers/slapd/start_tls_extop.c b/ldap/servers/slapd/start_tls_extop.c index 32a3c10b..bb65e5f0 100644 --- a/ldap/servers/slapd/start_tls_extop.c +++ b/ldap/servers/slapd/start_tls_extop.c @@ -69,7 +69,7 @@ /* #define START_TLS_OID "1.3.6.1.4.1.1466.20037" */ -Slapi_PluginDesc exopdesc = { "start_tls_plugin", "Fedora", "0.1", +Slapi_PluginDesc exopdesc = { "start_tls_plugin", VENDOR, PACKAGE_VERSION, "Start TLS extended operation plugin" }; diff --git a/ldap/servers/slapd/test-plugins/README b/ldap/servers/slapd/test-plugins/README index 8edf5e60..ca64ac54 100644 --- a/ldap/servers/slapd/test-plugins/README +++ b/ldap/servers/slapd/test-plugins/README @@ -39,11 +39,10 @@ ---------------------------- Sample Server Plug-Ins - for Directory Server 1 + for Directory Server ---------------------------- -This directory contains code for some sample server plug-ins intended for -use with the Fedora Directory Server 1. +This directory contains code for some sample server plug-ins. NOTE: Before you compile and run these examples, make sure to change any server-specific data in the examples to @@ -178,7 +177,7 @@ Server plug-ins are built as libraries available to the server. $ autogen.sh # make sure there is no errors / warnings $ mkdir testbuild $ cd testbuild - $ ../configure --with-fhs [ --prefix=/opt/fedora-ds ... ] + $ ../configure --with-fhs [ --prefix=/opt/dirsrv ... ] $ make install Plugging the Library Into the Server diff --git a/ldap/servers/slapd/test-plugins/testbind.c b/ldap/servers/slapd/test-plugins/testbind.c index c3922029..c9c49df9 100644 --- a/ldap/servers/slapd/test-plugins/testbind.c +++ b/ldap/servers/slapd/test-plugins/testbind.c @@ -74,7 +74,7 @@ #include <string.h> #include "slapi-plugin.h" -Slapi_PluginDesc bindpdesc = { "test-bind", "Fedora Project", "1.0.4", +Slapi_PluginDesc bindpdesc = { "test-bind", VENDOR, PACKAGE_VERSION, "sample bind pre-operation plugin" }; static Slapi_ComponentId *plugin_id = NULL; diff --git a/ldap/servers/slapd/test-plugins/testdatainterop.c b/ldap/servers/slapd/test-plugins/testdatainterop.c index 1915e6ed..cc0e2fe4 100644 --- a/ldap/servers/slapd/test-plugins/testdatainterop.c +++ b/ldap/servers/slapd/test-plugins/testdatainterop.c @@ -94,7 +94,7 @@ nsslapd-pluginEnabled: on nsslapd-pluginId: nullsuffix-preop nsslapd-pluginVersion: 7.1 - nsslapd-pluginVendor: Fedora Project + nsslapd-pluginVendor: My Project nsslapd-pluginDescription: sample pre-operation null suffix plugin ******************************************/ @@ -118,7 +118,7 @@ /* * Static variables. */ -static Slapi_PluginDesc plugindesc = { PLUGIN_NAME, "Fedora Project", "1.0.4", +static Slapi_PluginDesc plugindesc = { PLUGIN_NAME, VENDOR, PACKAGE_VERSION, "sample pre-operation null suffix plugin" }; static Slapi_ComponentId *plugin_id = NULL; diff --git a/ldap/servers/slapd/test-plugins/testentry.c b/ldap/servers/slapd/test-plugins/testentry.c index 4909246f..9c1f32a1 100644 --- a/ldap/servers/slapd/test-plugins/testentry.c +++ b/ldap/servers/slapd/test-plugins/testentry.c @@ -95,7 +95,7 @@ nsslapd-pluginId: test-entry #include <string.h> #include "slapi-plugin.h" -Slapi_PluginDesc entrypdesc = { "test-entry", "Fedora Project", "1.0.4", +Slapi_PluginDesc entrypdesc = { "test-entry", VENDOR, PACKAGE_VERSION, "sample entry modification plugin" }; /* Entry store plug-in function */ diff --git a/ldap/servers/slapd/test-plugins/testextendedop.c b/ldap/servers/slapd/test-plugins/testextendedop.c index 42fcbc54..2655d55a 100644 --- a/ldap/servers/slapd/test-plugins/testextendedop.c +++ b/ldap/servers/slapd/test-plugins/testextendedop.c @@ -88,7 +88,7 @@ /* OID of the extended operation handled by this plug-in */ #define MY_OID "1.2.3.4" -Slapi_PluginDesc expdesc = { "test-extendedop", "Fedora Project", "1.0.4", +Slapi_PluginDesc expdesc = { "test-extendedop", VENDOR, PACKAGE_vERSION, "sample extended operation plugin" }; diff --git a/ldap/servers/slapd/test-plugins/testgetip.c b/ldap/servers/slapd/test-plugins/testgetip.c index 5cb990c9..2a360b44 100644 --- a/ldap/servers/slapd/test-plugins/testgetip.c +++ b/ldap/servers/slapd/test-plugins/testgetip.c @@ -79,7 +79,7 @@ #include "slapi-plugin.h" #include "nspr.h" -Slapi_PluginDesc getippdesc = { "test-getip", "Fedora Project", "1.0.4", +Slapi_PluginDesc getippdesc = { "test-getip", VENDOR, PACKAGE_VERSION, "sample pre-operation plugin" }; static char *netaddr2str( PRNetAddr *addrp, char *buf, size_t buflen ); diff --git a/ldap/servers/slapd/test-plugins/testplugin.def b/ldap/servers/slapd/test-plugins/testplugin.def index f7909f1c..f7dfb775 100644 --- a/ldap/servers/slapd/test-plugins/testplugin.def +++ b/ldap/servers/slapd/test-plugins/testplugin.def @@ -36,7 +36,7 @@ ; All rights reserved. ; END COPYRIGHT BLOCK ; -DESCRIPTION 'Fedora Directory Server 1 test plugin' +DESCRIPTION 'Dirsrv 1 test plugin' EXPORTS testentry_scramble @2 testentry_unscramble @3 diff --git a/ldap/servers/slapd/test-plugins/testpostop.c b/ldap/servers/slapd/test-plugins/testpostop.c index 41720c55..d5291f3f 100644 --- a/ldap/servers/slapd/test-plugins/testpostop.c +++ b/ldap/servers/slapd/test-plugins/testpostop.c @@ -98,7 +98,7 @@ static char changelogfile[MAX_PATH+1]; static char *changelogfile = "/tmp/changelog"; #endif -Slapi_PluginDesc postoppdesc = { "test-postop", "Fedora Project", "1.0.4", +Slapi_PluginDesc postoppdesc = { "test-postop", VENDOR, PACKAGE_VERSION, "sample post-operation plugin" }; static void write_changelog( int optype, char *dn, void *change, int flag ); diff --git a/ldap/servers/slapd/test-plugins/testpreop.c b/ldap/servers/slapd/test-plugins/testpreop.c index da354b50..c44d741e 100644 --- a/ldap/servers/slapd/test-plugins/testpreop.c +++ b/ldap/servers/slapd/test-plugins/testpreop.c @@ -84,7 +84,7 @@ #include <string.h> #include "slapi-plugin.h" -Slapi_PluginDesc preoppdesc = { "test-preop", "Fedora Project", "1.0.4", +Slapi_PluginDesc preoppdesc = { "test-preop", VENDOR, PACKAGE_VERSION, "sample pre-operation plugin" }; /* Pre-operation plug-in function */ diff --git a/ldap/servers/slapd/test-plugins/testsaslbind.c b/ldap/servers/slapd/test-plugins/testsaslbind.c index 2b43c358..e395950d 100644 --- a/ldap/servers/slapd/test-plugins/testsaslbind.c +++ b/ldap/servers/slapd/test-plugins/testsaslbind.c @@ -76,7 +76,7 @@ nsslapd-plugintype: preoperation nsslapd-pluginenabled: on nsslapd-pluginid: test-saslbind nsslapd-pluginversion: 5.0 -nsslapd-pluginvendor: Fedora Project +nsslapd-pluginvendor: My Project nsslapd-plugindescription: sample SASL bind pre-operation plugin @@ -85,7 +85,7 @@ nsslapd-plugindescription: sample SASL bind pre-operation plugin #include <string.h> #include "slapi-plugin.h" -Slapi_PluginDesc saslpdesc = { "test-saslbind", "Fedora Project", "1.0.4", +Slapi_PluginDesc saslpdesc = { "test-saslbind", VENDOR, PACKAGE_VERSION, "sample SASL bind pre-operation plugin" }; diff --git a/ldap/servers/slapd/tools/keyupg.c b/ldap/servers/slapd/tools/keyupg.c deleted file mode 100644 index 3fb0a2f7..00000000 --- a/ldap/servers/slapd/tools/keyupg.c +++ /dev/null @@ -1,122 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * This Program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation; version 2 of the License. - * - * This Program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -/* - * - * keyupg.c - * - * Upgrade the Key from Lite to normal ( only one way ) - * - */ - - -#include <stdio.h> -#include <string.h> -#ifdef hpux -#include <strings.h> -#endif /* hpux */ -#ifdef LINUX -#include <unistd.h> /* needed for getopt */ -#endif -#if defined( _WIN32 ) -#include <windows.h> -#include "proto-ntutil.h" -#endif -#include <stdlib.h> -#include "litekey.h" - - -#define BUFSIZE 800 -#define FILE_PATHSEP '/' - -int -main (int argc, char **argv ) -{ - - - char *keyfile = NULL; - int i, ikey, nkey; - FILE *fp = NULL; - int debug =0; - - - while ( (i = getopt( argc, argv, "k:f:dh" )) != EOF ) { - switch (i){ - case 'f': - keyfile = strdup( optarg ); - break; - case 'k': - ikey = atoi ( optarg ); - break; - case 'd': - debug = 1; - break; - } - } - - if ( (NULL == keyfile ) || (!ikey)) { - fprintf (stderr, "usage:%s -k key -f key_file_path\n", argv[0]); - exit(1); - - } - - if (debug) printf ( "Key is :%d and file is in :%s\n", ikey, keyfile); - - if ( ! is_key_validNormalKey ( ikey )) { - printf ( "Sorry. The input key is invalid\n" ); - exit (1); - } - - - nkey = generate_directory_key ( DS_NORMAL_TYPE ); - - if ( (fp = fopen ( keyfile, "r+b")) == NULL ) { - printf ("KEYUPG Error: Could not open the the key file:%s\n", keyfile ); - exit ( 1 ); - } - fprintf (fp, "key: %d\n", nkey ); - fclose ( fp ); - - printf ("Success: Your Directory Servers have been upgraded to the full version.\n"); - - return 0; -} |