[Fedora-directory-devel] Please review: distributed numeric assignment plugin
by Pete Rowley
New pre-operation plugin:
General numeric sequencer that allows generation of sequenced unique
numbers such as posix uidNumber, posix gidNumber, Samba SambaSID etc. in
an MMR environment. Rather than network locking or number pooling
schemes, the approach taken is to allow the configuration of an interval
that should be equal to or greater than the number of masters in the
deployment. Then each master is assigned starting numbers in sequence
e.g. server 1, 500; server 2, 501; server 3, 502 etc. When the interval
is configured as 3, the servers will generate sequences like so: server
1, 500, 503, 506...; server 2, 501, 504, 507; server 3, 502, 505, 508.
Of course, in single master environments the interval may be set to one
for a monotonically increasing sequence. Adding masters that exceed the
interval requires that the configuration be reset, starting from a value
higher than the highest currently assigned value.
Multiple types may be configured. An LDAP search filter must be added to
the configuration for each type, the filter may be as complex as desired
and determines to which entries the configuration applies - at minimum
this filter should restrict the configuration to objectclasses that
allow the type since no schema checking is done by the plugin.
Generated values may have a pre-fix configured to be pre-pended to the
value (useful for systems such as Samba when it needs a new SID). Each
configuration entry may be scoped with a configuration attribute
containing a DN, where conflicts arise due to scope the closest scope wins.
Configuration is dynamic. That is, once the plugin entry has been added
to cn=plugins, cn=config and the server restarted, any configuration
change will be observed. Configuration entries that do not contain an
attribute type, a starting value, an interval value, and a filter will
be ignored. Which configuration entries have been skipped can be
determined by config level logging.
Example configuration ldif and test ldaifs along with some scripts are
included. The main source is in dna.c.
--
Pete
#
# 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) 2007 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#
LDAP_SRC = ../../..
BUILD_ROOT = ../../../..
NOSTDCLEAN=true # don't let nsconfig.mk define target clean
NOSTDSTRIP=true # don't let nsconfig.mk define target strip
OBJDEST = $(OBJDIR)/lib/libdna
LIBDIR = $(LDAP_PLUGIN_RELDIR)
include $(BUILD_ROOT)/nsdefs.mk
include $(BUILD_ROOT)/nsconfig.mk
include $(LDAP_SRC)/nsldap.mk
ifeq ($(ARCH), WINNT)
DEF_FILE:=./dna.def
endif
DNA_OBJS = dna.o
OBJS = $(addprefix $(OBJDEST)/, $(DNA_OBJS))
DNA_DLL = libdna-plugin
INCLUDES += -I../http -I../../slapd -I../../../include
CFLAGS+=$(SLCFLAGS) -DSLAPD_LOGGING
ifeq ($(ARCH), WINNT)
EXTRA_LIBS_DEP += $(LIBSLAPD) $(NSPR_DEP) $(LDAPSDK_DEP)
EXTRA_LIBS_DEP += $(LDAP_COMMON_LIBS_DEP)
EXTRA_LIBS += $(NSPRLINK) $(LIBSLAPD) $(LDAP_SDK_LIBLDAP_DLL)
EXTRA_LIBS += $(LDAP_COMMON_LIBS)
DNA_DLL_OBJ = $(addprefix $(OBJDEST)/, dllmain.o)
endif
ifeq ($(ARCH), AIX)
EXTRA_LIBS_DEP += $(LIBSLAPD) $(NSPR_DEP) $(LDAPSDK_DEP)
EXTRA_LIBS_DEP += $(LDAP_COMMON_LIBS_DEP)
EXTRA_LIBS += $(LIBSLAPDLINK) $(NSPRLINK) $(LDAP_SDK_LIBLDAP_DLL)
EXTRA_LIBS += $(LDAP_COMMON_LIBS)
LD=ld
endif
ifeq ($(ARCH), HPUX)
EXTRA_LIBS_DEP += $(LIBSLAPD_DEP) $(LDAPSDK_DEP) $(NSPR_DEP) $(SECURITY_DEP)
EXTRA_LIBS_DEP += $(LDAP_COMMON_LIBS_DEP)
EXTRA_LIBS += $(LDAPLINK) $(SECURITYLINK) $(NSPRLINK) $(ICULINK)
EXTRA_LIBS += $(LDAP_COMMON_LIBS)
endif
DNA= $(addprefix $(LIBDIR)/, $(DNA_DLL).$(DLL_SUFFIX))
clientSDK:
all: $(OBJDEST) $(LIBDIR) $(DNA)
ifeq ($(ARCH), WINNT)
$(DNA): $(OBJS) $(DNA_DLL_OBJ) $(DEF_FILE)
$(LINK_DLL) $(DNA_DLL_OBJ) $(EXTRA_LIBS) /DEF:$(DEF_FILE)
else
$(DNA): $(OBJS) $(DNA_DLL_OBJ)
$(LINK_DLL) $(DNA_DLL_OBJ) $(EXTRA_LIBS)
endif
veryclean: clean
clean:
$(RM) $(OBJS)
ifeq ($(ARCH), WINNT)
$(RM) $(DNA_DLL_OBJ)
endif
$(RM) $(DNA)
$(OBJDEST):
$(MKDIR) $(OBJDEST)
$(LIBDIR):
$(MKDIR) $(LIBDIR)
uid=add_has_magic_number, dc=example, dc=com
uid=add_second_has_magic_number, dc=example, dc=com
uid=no_uid_number, dc=example, dc=com
uid=add_has_uid_number_550, dc=example, dc=com
uid=add_is_sub, ou=sub, dc=example, dc=com
ou=sub, dc=example, dc=com
# --- 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) 2007 Red Hat, Inc.
# All rights reserved.
# --- END COPYRIGHT BLOCK ---
# plugin configuration entry
dn: cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config
objectclass: top
objectclass: nsSlapdPlugin
objectclass: extensibleObject
objectclass: nsContainer
cn: Distributed Numeric Assignment Plugin
nsslapd-plugininitfunc: dna_init
nsslapd-plugintype: preoperation
nsslapd-pluginenabled: on
nsslapd-plugindescription: Distributed Numeric Assignment plugin
nsslapd-pluginvendor: Fedora Project
nsslapd-pluginVersion: 1.1
nsslapd-pluginId: distributed-numeric-assignment
nsslapd-pluginPath: /home/prowley/srv/lib/fedora-ds/plugins/libdna-plugin.so
# --- 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) 2007 Red Hat, Inc.
# All rights reserved.
# --- END COPYRIGHT BLOCK ---
# add plugin configuration for posix users
dn: cn=Posix,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config
objectclass: top
objectclass: nsContainer
objectclass: extensibleObject
cn: Posix
dn: cn=Accounts,cn=Posix,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config
objectclass: top
objectclass: extensibleObject
cn: Accounts
dnaType: uidNumber
dnaNextValue: 500
dnaInterval: 4
dnaMagicRegen: 499
dnaFilter: (objectclass=posixAccount)
# add plugin configuration for posix groups
dn: cn=Groups,cn=Posix,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config
objectclass: top
objectclass: extensibleObject
cn: Groups
dnaType: gidNumber
dnaNextValue: 500
dnaInterval: 4
dnaMagicRegen: 499
dnaFilter: (objectclass=posixGroup)
dn: uid=add_has_magic_number, dc=example, dc=com
objectclass: top
objectclass: organizationalperson
objectclass: posixaccount
cn: 1
sn: test
uid: add_has_uid_number
uidNumber: 499
gidNumber: 550
homeDirectory: /
dn: uid=add_has_magic_number, dc=example, dc=com
objectclass: top
objectclass: organizationalperson
objectclass: posixaccount
cn: 1
sn: test
uid: add_has_uid_number
uidNumber: 499
gidNumber: 550
homeDirectory: /
dn: uid=add_second_has_magic_number, dc=example, dc=com
objectclass: top
objectclass: organizationalperson
objectclass: posixaccount
cn: 2
sn: test
uid: add_second_has_magic_number
uidNumber: 499
gidNumber: 550
homeDirectory: /
dn: uid=no_uid_number, dc=example, dc=com
objectclass: top
objectclass: organizationalperson
objectclass: posixaccount
cn: 3
sn: test
uid: no_uid_number
gidNumber: 550
homeDirectory: /
dn: uid=add_has_uid_number_550, dc=example, dc=com
objectclass: top
objectclass: organizationalperson
objectclass: posixaccount
cn: 4
sn: test
uid: add_has_uid_number
uidNumber: 550
gidNumber: 550
homeDirectory: /
dn: ou=sub, dc=example, dc=com
objectclass: top
objectclass: organizationalunit
ou: sub
dn: uid=add_is_sub, ou=sub, dc=example, dc=com
objectclass: top
objectclass: organizationalperson
objectclass: posixaccount
cn: 4
sn: test
uidNumber: 499
gidNumber: 550
homeDirectory: /
# --- 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) 2007 Red Hat, Inc.
# All rights reserved.
# --- END COPYRIGHT BLOCK ---
# add Samba SIDs
dn: cn=Example top level,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config
objectclass: top
objectclass: extensibleObject
dnaType: title
dnaPrefix: example-
dnaNextValue: 600
dnaInterval: 4
dnaMagicRegen: assign
dnaFilter: (objectclass=organizationalperson)
dnaScope: dc=example, dc=com
dn: cn=Example sub level,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config
objectclass: top
objectclass: extensibleObject
dnaType: title
dnaPrefix: sub-example-
dnaNextValue: 600
dnaInterval: 4
dnaMagicRegen: assign
dnaFilter: (objectclass=organizationalperson)
dnaScope: ou=sub, dc=example, dc=com
16 years, 4 months
[Fedora-directory-devel] New blockers for Samba4/FDS testing
by Andrew Bartlett
While I'm past the installation-related blockers, I have a new
challenge:
In an attempt to make Samba4's test environment as reproducible as
possible, and to avoid issues with root privilages as low ports, Samba4
operates a virtual network known as 'socket_wrapper'.
This wrapper is a #define macro based system, which overloads all socket
calls, and redirects them to a series of unix domain sockets.
The challenge I have is that our testsuite relies on this, but Fedora DS
does not support it. As such, attempts to connect to localhost:3389
(for example) are redirected to a local unix domain socket, where of
course Fedora DS is not listening.
For OpenLDAP, we work around this by using ldapi://, which is unmolested
by socket_wrapper.
Has there been any progress on
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219573
I would rather not waste time constructing proxies in/out of
socket_wrapper if I don't need to.
Thanks,
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Red Hat Inc. http://redhat.com
16 years, 4 months
[Fedora-directory-devel] Help with silent installs
by Andrew Bartlett
I'm having trouble trying to setup Fedora DS for Samba4's 'make test'
environment. I'm using this as a reproducible development platform for
my LDAP backend testing with Fedora DS.
So far, I've been attempting to run
/opt/fedora-ds/setup/setup -s st/ldap/fedorads.inf
(where fedorads.inf is attached)
As non-root, it errors out all over the place with being unable to read
files. I'm a bit puzzled by this, because the basic distribution files
should be public knowledge, and it shouldn't be trying to touch any
other LDAP setup on the disk.
> grep: /opt/fedora-ds/admin-serv/config/adm.conf: Permission denied
> touch: cannot touch `dssecure.txt': Permission denied
> touch: cannot touch `assecure.txt': Permission denied
> grep: /opt/fedora-ds/slapd-localhost/config/dse.ldif: Permission
> denied
> grep: /opt/fedora-ds/slapd-localhost/config/dse.ldif: Permission
> denied
> grep: /opt/fedora-ds/admin-serv/config/adm.conf: Permission denied
> grep: /opt/fedora-ds/admin-serv/config/adm.conf: Permission denied
> Converting slapd-localhost to new format password file . . .
> Copying new schema ldiffiles . . .
> Can't create /opt/fedora-ds/slapd-localhost/config/schema-bak/old:
> Permission denied
> Starting slapd-localhost . . .
When run as root, it wants the password to the configuration directory.
How do I convince it that it will become the configuration directory,
for it's mini-instance?
> sudo /opt/fedora-ds/setup/setup -s st/ldap/fedorads.inf
> INFO Begin Setup . . .
> In order to reconfigure your installation, the Configuration Directory
> Administrator password is required. Here is your current information:
>
> Configuration Directory:
> ldap://localhost.localdomain:3389/o=NetscapeRoot
> Configuration Administrator ID: admin
>
> At the prompt, please enter the password for the Configuration
> Administrator.
>
> administrator ID: admin
> Password:
> Password:
I find it odd that we ever require passwords to convince the DS that we,
as a local root user, are a local root user. This should be handled
behind the covers (perhaps with the ldapi:// support I've asked for).
Anyway, can I have some hints as to how to setup a unprivileged, test
LDAP server from the binaries in the fedora-ds-1.0.4 RPM?
Are some of the files needlessly read protected, or am I just doing
something wrong?
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Red Hat Inc. http://redhat.com
16 years, 4 months
[Fedora-directory-devel] Please review: [Bug 223861] Nightly build uses autotools/yum (ds_newinst failure)
by Noriko Hosoi
Summary: Nightly build uses autotools/yum
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=223861 (Comment #8)
Instance creation utility ds_newinst.pl has started failing with the
"command not found" error. Weird thing is it was working till
yesterday. And the code related to the path hasn't been changed for a
while... *puzzled*
>------- Additional Comments From nhosoi(a)redhat.com 2007-01-26 20:23 EST -------
>Description of problem:
>Output from ds_newinst.pl (with some debug messages)
>====================================================
>CGI /usr/lib/fedora-ds/ds_newinst failed with 1: here is the output:
>Content-type: text/plain
>
>[slapd-laputa]: starting up server ...
>[slapd-laputa]: Fedora-Directory/1.1 B2007.026.2158
>[slapd-laputa]: laputa:25543 (/dev/shm/DS7.2-2049/server/slapd-laputa)
>[slapd-laputa]:
>[slapd-laputa]: [26/Jan/2007:15:46:40 -0800] - Fedora-Directory/1.1
>B2007.026.2158 starting up
>[slapd-laputa]: [26/Jan/2007:15:46:40 -0800] - slapd started. Listening on All
>Interfaces port 25543 for LDAP requests
>error:MY PATH IS ...
>
>error:/usr/lib/fedora-ds
>
>error:/dev/shm/DS7.2-2049/server/slapd-laputa/start-slapd: line 54: expr:
>command not found
>
>error:/dev/shm/DS7.2-2049/server/slapd-laputa/start-slapd: line 58: cat: command
>not found
>
>error:/dev/shm/DS7.2-2049/server/slapd-laputa/start-slapd: line 53: test: -le:
>unary operator expected
>
>error:/dev/shm/DS7.2-2049/server/slapd-laputa/start-slapd: line 69: expr:
>command not found
>
>error:Server failed to start !!! Please check errors log for problems
>
>error:server:The server could not be started.
>system_errno:2
>error:could not create server laputa - The server could not be started.
>NMC_Status: 1
>Error: could not run /usr/lib/fedora-ds/ds_newinst: 1
>Error: Could not create new directory server instance
>====================================================
>
>This "command not found" error is caused by ds_newinst wrapper, which calls the
>binary ds_newinst-bin.
>
>The wrapper ds_newinst sets BIN_DIR as follows:
>BIN_DIR=/usr/lib/fedora-ds
>PATH=${BIN_DIR}
>export PATH
>
>Next, ds_newinst-bin launches "start-slapd" via "system". The start script
>calls typical system commands such as cat and expr, but PATH is not set for them.
>
>To solve this problem, can we add "/usr/bin" and "/bin" to BIN_DIR?
>
>Index: ds_newinst.in
>===================================================================
>RCS file: /cvs/dirsec/ldapserver/wrappers/ds_newinst.in,v
>retrieving revision 1.2
>diff -t -w -U4 -r1.2 ds_newinst.in
>--- ds_newinst.in 2 Nov 2006 03:11:40 -0000 1.2
>+++ ds_newinst.in 27 Jan 2007 00:36:28 -0000
>@@ -4,9 +4,9 @@
> ## (1) Specify variables used by this script. ##
> ###############################################################################
>
> LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@serverdir@
>-BIN_DIR=@serverdir@
>+BIN_DIR=@serverdir@:/usr/bin:/bin
> COMMAND=ds_newinst-bin
>
>
16 years, 4 months
Re: Fedora-directory-devel Digest, Vol 19, Issue 8Re: [Fedora-directory-devel] Please review: distributed numeric assignment plugin
by Howard Chu
> Date: Mon, 22 Jan 2007 13:02:40 -0700
> From: Richard Megginson <rmeggins(a)redhat.com>
>> > Rob Crittenden wrote:
>>> >> Pete Rowley wrote:
>>>> >>> New pre-operation plugin:
>>> >>
>>> >> In dna_get_next_value() what could cause a call to
>>> >> slapi_search_internal_get_entry() to fail that you have to try 3 times?
>>> >>
>> > It's actually the mod operation that can fail, the original value is
>> > deleted and the new value added in one operation with two mods, if the
>> > original value has changed since the search the mod operation will
>> > fail. It's a way to get an atomic increment.
> Ok. So I think the errors should be treated a little differently. If
> the search fails, that's bad - probably a fatal error, or perhaps
> someone deleted the configuration entry out from under you. I think
> that if the mod fails, you should check the error code, for something
> like LDAP_TYPE_OR_VALUE_EXISTS, which means the mod->add failed because
> attribute already has that value, or whatever specific error is returned
> from the mod->delete value operation when the value doesn't exist.
> Other errors are probably fatal.
You should only be able to get LDAP_NO_SUCH_ATTRIBUTE, not
LDAP_TYPE_OR_VALUE_EXISTS from this operation. The delete of the old value
must fail before it even tries to add the new value. This is the standard
test-and-set operation in LDAP. (And of course LDAP_NO_SUCH_OBJECT if someone
is really messing with you...)
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/
16 years, 4 months
[Fedora-directory-devel] Please review: Bug 222398: Allow building on Fedora
by Rich Megginson
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=222398
Resolves: bug 222398
Bug Description: Allow building on Fedora
Reviewed by: ???
Files: https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=145417
Branch: HEAD
Fix Description: There are a few issues with building on Fedora (5 or
later):
1) Need to be able to build with db4.2, db4.3, db4.4, etc. This version
auto-detects the db version from the db.h file it finds. In order to use a
different db version, just use configure --with-db=path or
--with-db-inc=path that points to a
different db.h
2) mozldap and svrcore are now part of Fedora, so we need to look for those
components. Look for mozldap6 first to allow building on RHEL-4 as well.
mozldap now includes libldif, so add that to the link line.
svrcore-devel is now just svrcore - a svrcore runtime package and a
svrcore-devel build time package.
3) FHS means FHS - /etc, /var/, prefix=/usr and exec_prefix=/usr. It
doesn't
make any sense to talk about FHS under a prefix. This means the default
build
will do /opt/fedora-ds/etc, var, lib, bin, share, and so on instead of
/opt/fedora-ds/usr/etc. --with-fhs resets prefix=/usr and
exec_prefix=/usr, and overrides the default settings for sysconfdir and
localstatedir
So, different build types:
FHS - use configure --with-fhs - uses /etc, /var, /usr/lib, /usr/share, etc.
Nothing - configure - uses /opt/fedora-ds/etc/, var/, bin/, lib/, etc.
GNU style - configure --prefix=/usr/local - /usr/local/etc,
/usr/local/bin, /usr/local/var, and so on
Developers can use configure --prefix=/home/user/fds && make && make
install to install local versions
Platforms tested: FC-6
Flag Day: no
Doc impact: no
https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=145418&action=diff
16 years, 4 months