| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- /** 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
-
- #include "nspr.h"
- #include "repl.h"
- char *repl_plugin_name = REPL_PLUGIN_NAME;
- char *windows_repl_plugin_name = REPL_PLUGIN_NAME " - windows sync";
- char *repl_plugin_name_cl = REPL_PLUGIN_NAME " - changelog program";
- /* String constants (no need to change these for I18N) */
- #define CHANGETYPE_ADD "add"
- #define CHANGETYPE_DELETE "delete"
- #define CHANGETYPE_MODIFY "modify"
- #define CHANGETYPE_MODRDN "modrdn"
- #define CHANGETYPE_MODDN "moddn"
- #define ATTR_CHANGENUMBER "changenumber"
- #define ATTR_TARGETDN "targetdn"
- #define ATTR_CHANGETYPE "changetype"
- #define ATTR_NEWRDN "newrdn"
- #define ATTR_DELETEOLDRDN "deleteoldrdn"
- #define ATTR_CHANGES "changes"
- #define ATTR_NEWSUPERIOR "newsuperior"
- #define ATTR_CHANGETIME "changetime"
- #define ATTR_DATAVERSION "dataVersion"
- #define ATTR_CSN "csn"
- #define TYPE_COPYINGFROM "copyingFrom"
- #define TYPE_COPIEDFROM "copiedFrom"
- #define FILTER_COPYINGFROM "copyingFrom=*"
- #define FILTER_COPIEDFROM "copiedFrom=*"
- #define FILTER_OBJECTCLASS "objectclass=*"
- char *changetype_add = CHANGETYPE_ADD;
- char *changetype_delete = CHANGETYPE_DELETE;
- char *changetype_modify = CHANGETYPE_MODIFY;
- char *changetype_modrdn = CHANGETYPE_MODRDN;
- char *changetype_moddn = CHANGETYPE_MODDN;
- char *attr_changenumber = ATTR_CHANGENUMBER;
- char *attr_targetdn = ATTR_TARGETDN;
- char *attr_changetype = ATTR_CHANGETYPE;
- char *attr_newrdn = ATTR_NEWRDN;
- char *attr_deleteoldrdn = ATTR_DELETEOLDRDN;
- char *attr_changes = ATTR_CHANGES;
- char *attr_newsuperior = ATTR_NEWSUPERIOR;
- char *attr_changetime = ATTR_CHANGETIME;
- char *attr_dataversion = ATTR_DATAVERSION;
- char *attr_csn = ATTR_CSN;
- char *type_copyingFrom = TYPE_COPYINGFROM;
- char *type_copiedFrom = TYPE_COPIEDFROM;
- char *filter_copyingFrom = FILTER_COPYINGFROM;
- char *filter_copiedFrom = FILTER_COPIEDFROM;
- char *filter_objectclass = FILTER_OBJECTCLASS;
- char *type_cn = "cn";
- char *type_objectclass = "objectclass";
- /* Names for replica attributes */
- const char *attr_replicaId = "nsDS5ReplicaId";
- const char *attr_replicaRoot = "nsDS5ReplicaRoot";
- const char *attr_replicaType = "nsDS5ReplicaType";
- const char *attr_replicaBindDn = "nsDS5ReplicaBindDn";
- const char *attr_state = "nsState";
- const char *attr_flags = "nsds5Flags";
- const char *attr_replicaName = "nsds5ReplicaName";
- const char *attr_replicaReferral = "nsds5ReplicaReferral";
- const char *type_ruvElement = "nsds50ruv";
- const char *type_replicaPurgeDelay = "nsds5ReplicaPurgeDelay";
- const char *type_replicaChangeCount = "nsds5ReplicaChangeCount";
- const char *type_replicaTombstonePurgeInterval = "nsds5ReplicaTombstonePurgeInterval";
- const char *type_replicaLegacyConsumer = "nsds5ReplicaLegacyConsumer";
- const char *type_ruvElementUpdatetime = "nsruvReplicaLastModified";
- const char *type_replicaCleanRUV = "nsds5ReplicaCleanRUV";
- const char *type_replicaAbortCleanRUV = "nsds5ReplicaAbortCleanRUV";
- const char *type_replicaProtocolTimeout = "nsds5ReplicaProtocolTimeout";
- const char *type_replicaBackoffMin = "nsds5ReplicaBackoffMin";
- const char *type_replicaBackoffMax = "nsds5ReplicaBackoffMax";
- /* Attribute names for replication agreement attributes */
- const char *type_nsds5ReplicaHost = "nsds5ReplicaHost";
- const char *type_nsds5ReplicaPort = "nsds5ReplicaPort";
- const char *type_nsds5TransportInfo = "nsds5ReplicaTransportInfo";
- const char *type_nsds5ReplicaBindDN = "nsds5ReplicaBindDN";
- const char *type_nsds5ReplicaCredentials = "nsds5ReplicaCredentials";
- const char *type_nsds5ReplicaBindMethod = "nsds5ReplicaBindMethod";
- const char *type_nsds5ReplicaRoot = "nsds5ReplicaRoot";
- const char *type_nsds5ReplicatedAttributeList = "nsds5ReplicatedAttributeList";
- const char *type_nsds5ReplicatedAttributeListTotal = "nsds5ReplicatedAttributeListTotal";
- const char *type_nsds5ReplicaUpdateSchedule = "nsds5ReplicaUpdateSchedule";
- const char *type_nsds5ReplicaInitialize = "nsds5BeginReplicaRefresh";
- const char *type_nsds5ReplicaTimeout = "nsds5ReplicaTimeout";
- const char *type_nsds5ReplicaBusyWaitTime = "nsds5ReplicaBusyWaitTime";
- const char *type_nsds5ReplicaSessionPauseTime = "nsds5ReplicaSessionPauseTime";
- const char *type_nsds5ReplicaEnabled = "nsds5ReplicaEnabled";
- const char *type_nsds5ReplicaStripAttrs = "nsds5ReplicaStripAttrs";
- const char *type_nsds5ReplicaCleanRUVnotified = "nsds5ReplicaCleanRUVNotified";
- /* windows sync specific attributes */
- const char *type_nsds7WindowsReplicaArea = "nsds7WindowsReplicaSubtree";
- const char *type_nsds7DirectoryReplicaArea = "nsds7DirectoryReplicaSubtree";
- const char *type_nsds7CreateNewUsers = "nsds7NewWinUserSyncEnabled";
- const char *type_nsds7CreateNewGroups = "nsds7NewWinGroupSyncEnabled";
- const char *type_nsds7WindowsDomain = "nsds7WindowsDomain";
- const char *type_nsds7DirsyncCookie = "nsds7DirsyncCookie";
- const char *type_winSyncInterval = "winSyncInterval";
- const char *type_oneWaySync = "oneWaySync";
- const char *type_winsyncMoveAction = "winSyncMoveAction";
- const char *type_winSyncWindowsFilter = "winSyncWindowsFilter";
- const char *type_winSyncDirectoryFilter = "winSyncDirectoryFilter";
- const char *type_winSyncSubtreePair = "winSyncSubtreePair";
- /* To Allow Consumer Initialization when adding an agreement - */
- const char *type_nsds5BeginReplicaRefresh = "nsds5BeginReplicaRefresh";
- static int repl_active_threads;
- int
- decrement_repl_active_threads()
- {
- PR_AtomicIncrement(&repl_active_threads);
- return repl_active_threads;
- }
- int
- increment_repl_active_threads()
- {
- PR_AtomicDecrement(&repl_active_threads);
- return repl_active_threads;
- }
|