[Fedora-directory-commits] dsbuild/ds/adminserver checksums, 1.8, 1.9
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsbuild/ds/adminserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9047
Modified Files:
checksums
Log Message:
updated adminserver
Index: checksums
===================================================================
RCS file: /cvs/dirsec/dsbuild/ds/adminserver/checksums,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- checksums 12 Oct 2006 20:08:04 -0000 1.8
+++ checksums 13 Oct 2006 15:28:56 -0000 1.9
@@ -1 +1 @@
-c65c0b7ddf8027cb28a4e8a364b6d0a5 download/fedora-adminserver-1.0.3.tar.gz
+8f203a6ca482ffe31e2517e5c04b5b89 download/fedora-adminserver-1.0.3.tar.gz
17 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/cm Makefile,1.63,1.64
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27171
Modified Files:
Makefile
Log Message:
For FDS 103 - When I changed the makefiles around for the earlier fix to enable rpmbuild,
I inadvertantly removed the packaging for ds-nshttpd from the gateway. This adds it back
for USE_DSGW=1 builds.
Index: Makefile
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/Makefile,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- Makefile 9 Oct 2006 22:26:19 -0000 1.63
+++ Makefile 13 Oct 2006 01:45:29 -0000 1.64
@@ -418,7 +418,9 @@
then $(INSTALL) -m 755 $$file $(RELDIR)/clients/lib ; \
fi ; \
done
-endif
+# the httpd library
+ $(INSTALL) -m 755 $(OBJDIR)/$(NSHTTPD_DLL)$(DLL_PRESUF).$(DLL_SUFFIX)* $(RELDIR)/clients/lib
+endif # USE_DSGW
ifeq ($(PACKAGE_LIB32), 1)
# these are files to copy to the shared32/lib directory - nspr, nss, ldapsdk lib
for file in $(LIBS_TO_PKG_SHARED_32); \
17 years, 7 months
[Fedora-directory-commits] coolkey/src/libckyapplet Makefile.in, 1.7, 1.8
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey/src/libckyapplet
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26778/src/libckyapplet
Modified Files:
Makefile.in
Log Message:
Add pk11install to the build
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/coolkey/src/libckyapplet/Makefile.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile.in 18 Aug 2006 16:11:09 -0000 1.7
+++ Makefile.in 13 Oct 2006 01:16:26 -0000 1.8
@@ -160,6 +160,8 @@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
17 years, 7 months
[Fedora-directory-commits] coolkey/src/coolkey Makefile.in,1.5,1.6
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey/src/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26778/src/coolkey
Modified Files:
Makefile.in
Log Message:
Add pk11install to the build
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/coolkey/src/coolkey/Makefile.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Makefile.in 25 Aug 2006 00:31:40 -0000 1.5
+++ Makefile.in 13 Oct 2006 01:16:20 -0000 1.6
@@ -77,6 +77,7 @@
am__installdirs = "$(DESTDIR)$(pkcs11dir)"
pkcs11LTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(pkcs11_LTLIBRARIES)
+am__DEPENDENCIES_1 =
am_libcoolkeypk11_la_OBJECTS = libcoolkeypk11_la-coolkey.lo \
libcoolkeypk11_la-dllmain.lo libcoolkeypk11_la-locking.lo \
libcoolkeypk11_la-log.lo libcoolkeypk11_la-machdep.lo \
@@ -160,6 +161,8 @@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
17 years, 7 months
[Fedora-directory-commits] coolkey/src/install Makefile, NONE, 1.1 Makefile.am, NONE, 1.1 Makefile.in, NONE, 1.1 pk11install.c, NONE, 1.1
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey/src/install
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26778/src/install
Added Files:
Makefile Makefile.am Makefile.in pk11install.c
Log Message:
Add pk11install to the build
--- NEW FILE Makefile ---
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# src/install/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# ***** BEGIN COPYRIGHT BLOCK *****
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version
# 2.1 of the License.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# ***** END COPYRIGHT BLOCK *****
# Process this file with automake to create Makefile.in
srcdir = .
top_srcdir = ../..
pkgdatadir = $(datadir)/coolkey
pkglibdir = $(libdir)/coolkey
pkgincludedir = $(includedir)/coolkey
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = i686-redhat-linux-gnu
host_triplet = i686-redhat-linux-gnu
target_triplet = i686-redhat-linux-gnu
bin_PROGRAMS = pk11install$(EXEEXT)
subdir = src/install
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_pk11install_OBJECTS = pk11install.$(OBJEXT)
pk11install_OBJECTS = $(am_pk11install_OBJECTS)
pk11install_DEPENDENCIES =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(pk11install_SOURCES)
DIST_SOURCES = $(pk11install_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /builds/fedora/coolkey/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /builds/fedora/coolkey/missing --run tar
AR = ar
AUTOCONF = ${SHELL} /builds/fedora/coolkey/missing --run autoconf
AUTOHEADER = ${SHELL} /builds/fedora/coolkey/missing --run autoheader
AUTOMAKE = ${SHELL} /builds/fedora/coolkey/missing --run automake-1.9
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS =
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
F77 =
FFLAGS =
HAVE_PCSC_FALSE = #
HAVE_PCSC_TRUE =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBCKYAPPLET = ${top_builddir}/src/libckyapplet/libckyapplet.la
LIBOBJS =
LIBS = -ldl -lz
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAINT = #
MAINTAINER_MODE_FALSE =
MAINTAINER_MODE_TRUE = #
MAKEINFO = ${SHELL} /builds/fedora/coolkey/missing --run makeinfo
NSS_CFLAGS = -I/usr/include/nss3 -I/usr/include/nspr4
NSS_LIBS = -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
OBJEXT = o
PACKAGE = coolkey
PACKAGE_BUGREPORT =
PACKAGE_NAME = coolkey
PACKAGE_STRING = coolkey "1.1.0"
PACKAGE_TARNAME = coolkey
PACKAGE_VERSION = "1.1.0"
PATH_SEPARATOR = :
PCSC_CFLAGS = -pthread -I/usr/include/PCSC
PCSC_LIBS = -lpcsclite
PKG_CONFIG = /usr/bin/pkg-config
RANLIB = ranlib
SCARD_LIB_NAME = libpcsclite.so.1
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
VERSION = 1.1.0
ZLIB_CFLAGS =
ZLIB_LIBS =
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_F77 =
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
ac_pt_PKG_CONFIG = /usr/bin/pkg-config
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__fastdepCXX_FALSE = #
am__fastdepCXX_TRUE =
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = i686-redhat-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = redhat
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-redhat-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = redhat
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /builds/fedora/coolkey/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p --
oldincludedir = /usr/include
prefix = /usr/local
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target = i686-redhat-linux-gnu
target_alias =
target_cpu = i686
target_os = linux-gnu
target_vendor = redhat
INCLUDES = $(NSS_CFLAGS)
pk11install_SOURCES = pk11install.c
pk11install_LDADD = -lsoftokn3
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/install/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/install/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: # $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
pk11install$(EXEEXT): $(pk11install_OBJECTS) $(pk11install_DEPENDENCIES)
@rm -f pk11install$(EXEEXT)
$(LINK) $(pk11install_LDFLAGS) $(pk11install_OBJECTS) $(pk11install_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/pk11install.Po
.c.o:
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
# source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(COMPILE) -c $<
.c.obj:
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
# source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
# source='$<' object='$@' libtool=yes \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
--- NEW FILE Makefile.am ---
# ***** BEGIN COPYRIGHT BLOCK *****
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version
# 2.1 of the License.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# ***** END COPYRIGHT BLOCK *****
# Process this file with automake to create Makefile.in
INCLUDES=$(NSS_CFLAGS)
bin_PROGRAMS=pk11install
pk11install_SOURCES = pk11install.c
pk11install_LDADD = -lsoftokn3
--- NEW FILE Makefile.in ---
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# ***** BEGIN COPYRIGHT BLOCK *****
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version
# 2.1 of the License.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# ***** END COPYRIGHT BLOCK *****
# Process this file with automake to create Makefile.in
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
bin_PROGRAMS = pk11install$(EXEEXT)
subdir = src/install
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_pk11install_OBJECTS = pk11install.$(OBJEXT)
pk11install_OBJECTS = $(am_pk11install_OBJECTS)
pk11install_DEPENDENCIES =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(pk11install_SOURCES)
DIST_SOURCES = $(pk11install_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
HAVE_PCSC_FALSE = @HAVE_PCSC_FALSE@
HAVE_PCSC_TRUE = @HAVE_PCSC_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBCKYAPPLET = @LIBCKYAPPLET@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NSS_CFLAGS = @NSS_CFLAGS@
NSS_LIBS = @NSS_LIBS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCSC_CFLAGS = @PCSC_CFLAGS@
PCSC_LIBS = @PCSC_LIBS@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SCARD_LIB_NAME = @SCARD_LIB_NAME@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ZLIB_CFLAGS = @ZLIB_CFLAGS@
ZLIB_LIBS = @ZLIB_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
INCLUDES = $(NSS_CFLAGS)
pk11install_SOURCES = pk11install.c
pk11install_LDADD = -lsoftokn3
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/install/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/install/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
pk11install$(EXEEXT): $(pk11install_OBJECTS) $(pk11install_DEPENDENCIES)
@rm -f pk11install$(EXEEXT)
$(LINK) $(pk11install_LDFLAGS) $(pk11install_OBJECTS) $(pk11install_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pk11install.Po(a)am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
--- NEW FILE pk11install.c ---
/* ***** BEGIN COPYRIGHT BLOCK *****
* Copyright (C) 2006 Red Hat, Inc.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version
* 2.1 of the License.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ***** END COPYRIGHT BLOCK ***** */
#include <stdio.h>
#include <string.h>
#include "pkcs11.h"
#include "pkcs11n.h"
/*
* windows specific globing search
*/
#ifdef _WINDOWS
#include <windows.h>
#include <winver.h>
#include <winreg.h>
#include <direct.h>
#include <shlobj.h>
#define PINST_FILE_DATA WIN32_FIND_DATA
#define PINST_ITERATOR HANDLE
#define PINST_FIRST(pattern, data) FindFirstFile(pattern, &data)
#define PINST_PATH(iter, data) (data).cFileName
#define PINST_NEXT(iter, data) FindNextFile(iter, &data)
#define PINST_FREE_ITER(iter, data) FindClose(iter)
#define PINST_INVALID_ITERATOR INVALID_HANDLE_VALUE
#define PINST_IS_DIRECTORY(iter, data) \
((data).dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
#define PINST_IS_HIDDEN(iter, data) \
((data).dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
#define PINST_FULLPATH(tempPath,path) tempPath
#define PINST_ERROR DWORD
#define PINST_NO_MORE ERROR_NO_MORE_FILES
#define PINST_SET_ERROR(x) SetLastError(x)
#define PINST_GET_ERROR() GetLastError()
#define PINST_FS "\\"
/*#define NETSCAPE_KEY "Software\\Netscape\\Netscape Navigator\\Main" */
#define NETSCAPE_KEY "Software\\Netscape\\Netscape Navigator"
#define NETSCAPE_SUBKEY_1 "Main"
#define NETSCAPE_SUBKEY_2 "Install Directory"
/* capture the window's error string */
static void
winPerror(FILE *outFile, DWORD error, const char *msgString)
{
char buffer[256];
char *cp;
DWORD ret;
fprintf(outFile,"*** %s: ",msgString);
sprintf(buffer,"Format message problem, error = %d (0x%x)\n", error, error);
ret=FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error, 0, buffer,
sizeof(buffer), NULL);
for (cp=buffer; *cp; cp++) {
if (*cp == '\r') *cp = ' ';
}
fprintf(outFile, buffer);
}
#endif
/*
* otherwise we are assuming unix (posix)
*/
#ifndef PINST_FILE_DATA
#define UNIX
#include <stdlib.h>
#include <limits.h>
#include <glob.h>
#define PINST_FILE_DATA glob_t
#define PINST_ITERATOR int
#define PINST_INVALID_ITERATOR -1
#define PINST_FIRST(pattern, data) \
((glob(pattern, GLOB_MARK, NULL, &data) == 0) ? 0 : PINST_INVALID_ITERATOR)
#define PINST_PATH(iter, data) \
(((data).gl_pathv == NULL) ? 0 : (data).gl_pathv[iter] )
#define PINST_NEXT(iter, data) (((data).gl_pathc > ++iter) ? iter : 0)
#define PINST_FREE_ITER(iter, data) globfree(&data)
#define PINST_IS_DIRECTORY(iter, data) pinst_isdir(PINST_PATH(iter,data))
#define PINST_IS_HIDDEN(iter, data) (0)
#define PINST_FULLPATH(tempPath,path) path
#define PINST_ERROR int
#define NO_ERROR 0
#define PINST_NO_MORE NO_ERROR
#define PINST_SET_ERROR(x)
#define PINST_GET_ERROR() NO_ERROR
#define PINST_FS "/"
#define MAX_PATH PATH_MAX
static int
pinst_isdir(const char *path)
{
int len = strlen(path);
return (len > 0) && (path[len-1] == '/');
}
#endif
typedef enum _InstType {
Install,
UnInstall,
} InstType;
typedef enum _DirType {
AppDataDir = 0,
HomeDir,
NetscapeInstallDir,
MaxDirType,
} DirType;
char *dirPaths[MaxDirType] = { NULL };
typedef struct _DirList {
DirType dirType;
char *search;
char *tail;
} DirList;
DirList dirList[] = {
#ifdef _WINDOWS
{ AppDataDir, "Mozilla\\Profiles\\*", "*.slt" },
{ AppDataDir, "Mozilla\\Firefox\\Profiles\\*", NULL },
{ AppDataDir, "Thunderbird\\Profiles\\*", NULL },
{ NetscapeInstallDir, "..\\Users\\*", NULL },
#endif
#ifndef DARWIN
#ifdef UNIX
{ HomeDir, ".mozilla/firefox/*", NULL },
{ HomeDir, ".mozilla/*", NULL },
{ HomeDir, ".thunderbird/*", NULL },
{ HomeDir, ".netscape", NULL },
#endif
#endif
#ifdef DARWIN
{ HomeDir, "Library/Mozilla/Profiles/*", "*.slt"},
{ HomeDir, "Library/Application Support/Firefox/Profiles/*", NULL },
{ HomeDir, "Library/Thunderbird/Profiles/*", NULL },
#endif
};
int verbose = 0;
int dirListCount = sizeof(dirList)/sizeof(dirList[0]);
static void
usage(char *prog)
{
fprintf(stderr,"usage: %s [-u][-v] [-p path] module\n", prog);
return;
}
/* Utility printing functions */
#define CONFIG_TAG "configDir="
int
installPKCS11(char *dirPath, InstType type, char *module)
{
char *paramString = (char *)malloc(strlen(dirPath)+sizeof(CONFIG_TAG)+3);
char *cp;
char **rc;
if (paramString == NULL) {
PINST_SET_ERROR(ERROR_NOT_ENOUGH_MEMORY);
return 0;
}
sprintf(paramString,CONFIG_TAG"\"%s\" ",dirPath);
/* translate all the \'s to /'s */
for (cp=paramString; *cp; cp++) {
if (*cp == '\\') *cp='/';
}
/* don't call this if you have NSS initialized!!, use SECMOD_AddModule
* or SECMOD_AddUserModule instead */
rc = (char **) NSC_ModuleDBFunc(type == Install ?
SECMOD_MODULE_DB_FUNCTION_ADD :
SECMOD_MODULE_DB_FUNCTION_DEL, paramString, module);
if (verbose) {
fprintf(stderr, "Install \"%s\" in %s : %s\n", module, dirPath,
rc ? *rc : "Fail" );
}
free(paramString);
return 1;
}
int
installAllPKCS11(char *dirPath, char *search, char *tail,
InstType type, char *module)
{
char *searchString;
unsigned long searchStringLen;
int len;
char *tempPath, *fileStart;
PINST_FILE_DATA fileData;
PINST_ITERATOR iter;
PINST_ERROR err = NO_ERROR;
char *myPath = NULL;
searchString = (char *)malloc(strlen(dirPath)+2+strlen(search));
if (searchString == NULL) {
PINST_SET_ERROR(ERROR_NOT_ENOUGH_MEMORY);
return 0;
}
sprintf(searchString,"%s" PINST_FS "%s",dirPath,search);
searchStringLen = strlen(searchString);
tempPath=malloc(searchStringLen+MAX_PATH+1);
if (tempPath == NULL) {
free(searchString);
PINST_SET_ERROR(ERROR_NOT_ENOUGH_MEMORY);
return 0;
}
strcpy(tempPath, searchString);
fileStart = strrchr(tempPath, *PINST_FS);
if (fileStart == NULL) {
tempPath[searchStringLen] = *PINST_FS;
fileStart = &tempPath[searchStringLen];
}
fileStart++;
iter = PINST_FIRST(searchString, fileData);
free(searchString);
if (iter == PINST_INVALID_ITERATOR) {
/* error set by PINST_FIRST */
free(tempPath);
return 0;
}
len=1;
do {
char *path = PINST_PATH(iter, fileData);
if(!path)
{
break;
}
if (!PINST_IS_DIRECTORY(iter, fileData)) {
continue;
}
if (PINST_IS_HIDDEN(iter, fileData)) {
continue;
}
/* skip . and .. */
if ((path[0] == '.') && ((path[1] == 0) ||
(path[1] == '.' && path[2] == 0)) ) {
continue;
}
strcpy(fileStart,path);
myPath=PINST_FULLPATH(tempPath,path);
if (tail) {
installAllPKCS11(myPath, tail, NULL, type, module);
} else {
installPKCS11(myPath, type, module);
}
} while (PINST_NEXT(iter, fileData));
free(tempPath);
err = PINST_GET_ERROR();
PINST_FREE_ITER(iter,fileData);
if (err != PINST_NO_MORE) {
/* restore the previous error (in case FindClose trashes it) */
PINST_SET_ERROR(err);
return 0;
}
return 1;
}
int main(int argc, char **argv)
{
char *module = NULL;
char *prog = *argv++;
char *cp;
int argCount = 0;
int i;
InstType type = Install;
char * path = NULL;
#ifdef _WINDOWS
BOOL brc;
HKEY regKey;
unsigned long lrc;
TCHAR appData[MAX_PATH];
char netscapeInstall[MAX_PATH];
unsigned long nsInstallSize = MAX_PATH;
#endif
/*
* parse the arglist;
*/
while ((cp = *argv++) != 0) {
if (*cp == '-') {
while (*++cp) switch (*cp) {
case 'i':
type = Install;
break;
case 'u':
type = UnInstall;
break;
case 'v':
verbose = 1;
break;
case 'p':
path = *argv++;
if (path == NULL) {
usage(prog);
return 2;
}
break;
default:
usage(prog);
return 2;
}
} else switch (argCount++) {
case 0:
module = cp;
break;
default:
usage(prog);
return 2;
}
}
if (module == NULL) {
usage(prog);
}
if (path) {
installAllPKCS11(path, "", NULL, type, module);
return 0;
}
#ifdef _WINDOWS
/* App Data Dir */
brc = SHGetSpecialFolderPath(NULL, appData, CSIDL_APPDATA, FALSE);
if (brc) {
dirPaths[AppDataDir] = appData;
} else {
if (verbose) {
winPerror(stderr, GetLastError(), "Reading App Directory");
}
}
/* Netscape Install Dir */
lrc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, NETSCAPE_KEY, 0,
KEY_ENUMERATE_SUB_KEYS, ®Key);
if (lrc == ERROR_SUCCESS) {
int i = 0;
TCHAR productName[255];
HKEY prodKey;
HKEY mainKey;
while ((lrc = RegEnumKey(regKey, i, productName, sizeof(productName)))
== ERROR_SUCCESS) {
i++;
lrc = RegOpenKeyEx(regKey, productName, 0,
KEY_ENUMERATE_SUB_KEYS, &prodKey);
if (lrc != ERROR_SUCCESS) {
if (verbose) {
winPerror(stderr, GetLastError(),
"Reading Netscape 4.0 prodkey");
fprintf(stderr,"Product = %s\n",productName);
}
continue;
}
lrc = RegOpenKeyEx(prodKey, NETSCAPE_SUBKEY_1, 0,
KEY_QUERY_VALUE, &mainKey);
if (lrc != ERROR_SUCCESS) {
RegCloseKey(prodKey);
continue;
}
/* open main */
lrc = RegQueryValueEx(mainKey, NETSCAPE_SUBKEY_2, NULL, NULL,
netscapeInstall, &nsInstallSize);
RegCloseKey(mainKey);
RegCloseKey(prodKey);
if (lrc == ERROR_SUCCESS) {
if (netscapeInstall[nsInstallSize-1] == 0) {
if (verbose) {
fprintf(stderr,
"Found Netscape 4.0 Install directory\n");
}
dirPaths[NetscapeInstallDir] = netscapeInstall;
break;
} else {
fprintf(stderr,
"Reading Netscape 4.0 key: Value too large\n");
}
} else {
if (verbose) {
winPerror(stderr, lrc, "Reading Netscape 4.0 key");
}
}
}
if ((lrc != ERROR_SUCCESS) && (lrc != ERROR_NO_MORE_ITEMS)) {
winPerror(stderr, lrc, "EnumKey on Netscape Registry Key failed");
}
} else {
if (verbose) {
winPerror(stderr, lrc, "Openning Netscape 4.0 key");
}
}
#endif
#ifdef UNIX
dirPaths[HomeDir] = getenv("HOME");
#endif
/* OK, now search the directories and complete the Install */
for (i=0; i < dirListCount; i++) {
char *dirPath = dirPaths[dirList[i].dirType];
if (!dirPath) {
continue;
}
installAllPKCS11(dirPath, dirList[i].search, dirList[i].tail,
type, module);
}
return 0;
}
17 years, 7 months
[Fedora-directory-commits] coolkey Makefile.am, 1.2, 1.3 Makefile.in, 1.4, 1.5 config.h, 1.2, 1.3 configure, 1.5, 1.6 config.status, 1.5, 1.6 configure.in, 1.5, 1.6
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26778
Modified Files:
Makefile.am Makefile.in config.h configure config.status
configure.in
Log Message:
Add pk11install to the build
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/coolkey/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile.am 9 Jun 2006 21:56:34 -0000 1.2
+++ Makefile.am 13 Oct 2006 01:16:20 -0000 1.3
@@ -19,7 +19,7 @@
# Process this file with automake to create Makefile.in.
-SUBDIRS = src/libckyapplet src/coolkey
+SUBDIRS = src/libckyapplet src/coolkey src/install
ACLOCAL_AMFLAGS = -I m4
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/coolkey/Makefile.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile.in 18 Aug 2006 16:04:42 -0000 1.4
+++ Makefile.in 13 Oct 2006 01:16:20 -0000 1.5
@@ -57,7 +57,7 @@
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure ChangeLog compile config.guess \
config.sub depcomp install-sh ltmain.sh missing
@@ -140,6 +140,8 @@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -207,7 +209,7 @@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
-SUBDIRS = src/libckyapplet src/coolkey
+SUBDIRS = src/libckyapplet src/coolkey src/install
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST =
DISTCLEANFILES =
Index: config.h
===================================================================
RCS file: /cvs/dirsec/coolkey/config.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config.h 25 Aug 2006 00:31:39 -0000 1.2
+++ config.h 13 Oct 2006 01:16:20 -0000 1.3
@@ -5,7 +5,7 @@
#define DEBUG 1
/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
+#define HAVE_DLFCN_H 1
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
@@ -14,7 +14,7 @@
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
-/* #undef HAVE_INTTYPES_H */
+#define HAVE_INTTYPES_H 1
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
@@ -41,7 +41,7 @@
/* #undef HAVE_STAT_EMPTY_STRING_BUG */
/* Define to 1 if you have the <stdint.h> header file. */
-/* #undef HAVE_STDINT_H */
+#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
@@ -53,13 +53,13 @@
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
-/* #undef HAVE_STRINGS_H */
+#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <syslog.h> header file. */
-/* #undef HAVE_SYSLOG_H */
+#define HAVE_SYSLOG_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
@@ -68,14 +68,14 @@
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
-/* #undef HAVE_UNISTD_H */
+#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
-/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
/* Name of package */
#define PACKAGE "coolkey"
Index: configure
===================================================================
RCS file: /cvs/dirsec/coolkey/configure,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- configure 25 Aug 2006 00:55:29 -0000 1.5
+++ configure 13 Oct 2006 01:16:20 -0000 1.6
@@ -463,7 +463,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE EGREP LN_S E!
CHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBCKYAPPLET PKG_CONFIG ac_pt_PKG_CONFIG PCSC_CFLAGS PCSC_LIBS ZLIB_CFLAGS ZLIB_LIBS SCARD_LIB_NAME HAVE_PCSC_TRUE HAVE_PCSC_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE EGREP LN_S E!
CHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG ac_pt_PKG_CONFIG NSS_CFLAGS NSS_LIBS LIBCKYAPPLET PCSC_CFLAGS PCSC_LIBS ZLIB_CFLAGS ZLIB_LIBS SCARD_LIB_NAME HAVE_PCSC_TRUE HAVE_PCSC_FALSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -948,6 +948,14 @@
ac_env_PKG_CONFIG_value=$PKG_CONFIG
ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
+ac_env_NSS_CFLAGS_set=${NSS_CFLAGS+set}
+ac_env_NSS_CFLAGS_value=$NSS_CFLAGS
+ac_cv_env_NSS_CFLAGS_set=${NSS_CFLAGS+set}
+ac_cv_env_NSS_CFLAGS_value=$NSS_CFLAGS
+ac_env_NSS_LIBS_set=${NSS_LIBS+set}
+ac_env_NSS_LIBS_value=$NSS_LIBS
+ac_cv_env_NSS_LIBS_set=${NSS_LIBS+set}
+ac_cv_env_NSS_LIBS_value=$NSS_LIBS
ac_env_PCSC_CFLAGS_set=${PCSC_CFLAGS+set}
ac_env_PCSC_CFLAGS_value=$PCSC_CFLAGS
ac_cv_env_PCSC_CFLAGS_set=${PCSC_CFLAGS+set}
@@ -1075,6 +1083,8 @@
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
PKG_CONFIG path to pkg-config utility
+ NSS_CFLAGS C compiler flags for NSS, overriding pkg-config
+ NSS_LIBS linker flags for NSS, overriding pkg-config
PCSC_CFLAGS C compiler flags for PCSC, overriding pkg-config
PCSC_LIBS linker flags for PCSC, overriding pkg-config
@@ -4273,7 +4283,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4276 "configure"' > conftest.$ac_ext
+ echo '#line 4286 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5408,7 +5418,7 @@
# Provide some information about the compiler.
-echo "$as_me:5411:" \
+echo "$as_me:5421:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6471,11 +6481,11 @@
-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:6474: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6484: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6478: \$? = $ac_status" >&5
+ echo "$as_me:6488: \$? = $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.
@@ -6739,11 +6749,11 @@
-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:6742: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6752: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6746: \$? = $ac_status" >&5
+ echo "$as_me:6756: \$? = $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.
@@ -6843,11 +6853,11 @@
-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:6846: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6856: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6850: \$? = $ac_status" >&5
+ echo "$as_me:6860: \$? = $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
@@ -8312,7 +8322,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 8315 "configure"' > conftest.$ac_ext
+ echo '#line 8325 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9209,7 +9219,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9212 "configure"
+#line 9222 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9309,7 +9319,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9312 "configure"
+#line 9322 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11653,11 +11663,11 @@
-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:11656: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11666: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11660: \$? = $ac_status" >&5
+ echo "$as_me:11670: \$? = $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.
@@ -11757,11 +11767,11 @@
-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:11760: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11770: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11764: \$? = $ac_status" >&5
+ echo "$as_me:11774: \$? = $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
@@ -12293,7 +12303,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 12296 "configure"' > conftest.$ac_ext
+ echo '#line 12306 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -13348,11 +13358,11 @@
-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:13351: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13361: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13355: \$? = $ac_status" >&5
+ echo "$as_me:13365: \$? = $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.
@@ -13452,11 +13462,11 @@
-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:13455: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13465: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13459: \$? = $ac_status" >&5
+ echo "$as_me:13469: \$? = $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
@@ -14901,7 +14911,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 14904 "configure"' > conftest.$ac_ext
+ echo '#line 14914 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -15676,11 +15686,11 @@
-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:15679: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15689: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15683: \$? = $ac_status" >&5
+ echo "$as_me:15693: \$? = $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.
@@ -15944,11 +15954,11 @@
-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:15947: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15957: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15951: \$? = $ac_status" >&5
+ echo "$as_me:15961: \$? = $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.
@@ -16048,11 +16058,11 @@
-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:16051: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16061: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16055: \$? = $ac_status" >&5
+ echo "$as_me:16065: \$? = $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
@@ -17517,7 +17527,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 17520 "configure"' > conftest.$ac_ext
+ echo '#line 17530 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -18985,22 +18995,6 @@
{ (exit 1); exit 1; }; }
fi
-fi
-
-# add our compiled static libraries
-
-LIBCKYAPPLET="\${top_builddir}/src/libckyapplet/libckyapplet.la"
-
-
-# Check whether --with-pcsclite or --without-pcsclite was given.
-if test "${with_pcsclite+set}" = set; then
- withval="$with_pcsclite"
-
-fi;
-if test "$with_pcsclite" = "no" -o "$with_pcsclite" = "false"
-then
- with_pcsclite=no
-else
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
@@ -19108,6 +19102,95 @@
fi
pkg_failed=no
+echo "$as_me:$LINENO: checking for NSS" >&5
+echo $ECHO_N "checking for NSS... $ECHO_C" >&6
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$NSS_CFLAGS"; then
+ pkg_cv_NSS_CFLAGS="$NSS_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5
+ ($PKG_CONFIG --exists --print-errors "nss") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$NSS_LIBS"; then
+ pkg_cv_NSS_LIBS="$NSS_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5
+ ($PKG_CONFIG --exists --print-errors "nss") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_NSS_LIBS=`$PKG_CONFIG --libs "nss" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ NSS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nss"`
+ else
+ NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$NSS_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: could not find NSS Crypto libraries" >&5
+echo "$as_me: error: could not find NSS Crypto libraries" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { echo "$as_me:$LINENO: error: could not find NSS Crypto libraries" >&5
+echo "$as_me: error: could not find NSS Crypto libraries" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ NSS_CFLAGS=$pkg_cv_NSS_CFLAGS
+ NSS_LIBS=$pkg_cv_NSS_LIBS
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ true
+fi
+fi
+
+# add our compiled static libraries
+
+LIBCKYAPPLET="\${top_builddir}/src/libckyapplet/libckyapplet.la"
+
+
+# Check whether --with-pcsclite or --without-pcsclite was given.
+if test "${with_pcsclite+set}" = set; then
+ withval="$with_pcsclite"
+
+fi;
+if test "$with_pcsclite" = "no" -o "$with_pcsclite" = "false"
+then
+ with_pcsclite=no
+else
+
+pkg_failed=no
echo "$as_me:$LINENO: checking for PCSC" >&5
echo $ECHO_N "checking for PCSC... $ECHO_C" >&6
@@ -19201,6 +19284,7 @@
+
if test x$with_pcsclite = xyes; then
HAVE_PCSC_TRUE=
HAVE_PCSC_FALSE='#'
@@ -20777,7 +20861,7 @@
- ac_config_files="$ac_config_files Makefile src/libckyapplet/Makefile src/libckyapplet/libckyapplet.pc src/coolkey/Makefile"
+ ac_config_files="$ac_config_files Makefile src/libckyapplet/Makefile src/libckyapplet/libckyapplet.pc src/coolkey/Makefile src/install/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -21353,6 +21437,7 @@
"src/libckyapplet/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libckyapplet/Makefile" ;;
"src/libckyapplet/libckyapplet.pc" ) CONFIG_FILES="$CONFIG_FILES src/libckyapplet/libckyapplet.pc" ;;
"src/coolkey/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/coolkey/Makefile" ;;
+ "src/install/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/install/Makefile" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -21512,9 +21597,11 @@
s,@FFLAGS@,$FFLAGS,;t t
s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
-s,@LIBCKYAPPLET@,$LIBCKYAPPLET,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
+s,@NSS_CFLAGS@,$NSS_CFLAGS,;t t
+s,@NSS_LIBS@,$NSS_LIBS,;t t
+s,@LIBCKYAPPLET@,$LIBCKYAPPLET,;t t
s,@PCSC_CFLAGS@,$PCSC_CFLAGS,;t t
s,@PCSC_LIBS@,$PCSC_LIBS,;t t
s,@ZLIB_CFLAGS@,$ZLIB_CFLAGS,;t t
Index: config.status
===================================================================
RCS file: /cvs/dirsec/coolkey/config.status,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- config.status 25 Aug 2006 00:31:39 -0000 1.5
+++ config.status 13 Oct 2006 01:16:20 -0000 1.6
@@ -271,7 +271,7 @@
_CSEOF
echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
echo >&5
-config_files=" Makefile src/libckyapplet/Makefile src/libckyapplet/libckyapplet.pc src/coolkey/Makefile"
+config_files=" Makefile src/libckyapplet/Makefile src/libckyapplet/libckyapplet.pc src/coolkey/Makefile src/install/Makefile"
config_headers=" config.h"
config_commands=" depfiles"
@@ -303,7 +303,7 @@
Report bugs to <bug-autoconf(a)gnu.org>."
ac_cs_version="\
coolkey config.status "1.1.0"
-configured by ./configure, generated by GNU Autoconf 2.59,
+configured by configure, generated by GNU Autoconf 2.59,
with options \"\"
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -383,8 +383,8 @@
fi
if $ac_cs_recheck; then
- echo "running /bin/sh ./configure " $ac_configure_extra_args " --no-create --no-recursion" >&6
- exec /bin/sh ./configure $ac_configure_extra_args --no-create --no-recursion
+ echo "running /bin/sh configure " $ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec /bin/sh configure $ac_configure_extra_args --no-create --no-recursion
fi
#
@@ -401,6 +401,7 @@
"src/libckyapplet/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libckyapplet/Makefile" ;;
"src/libckyapplet/libckyapplet.pc" ) CONFIG_FILES="$CONFIG_FILES src/libckyapplet/libckyapplet.pc" ;;
"src/coolkey/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/coolkey/Makefile" ;;
+ "src/install/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/install/Makefile" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -484,31 +485,31 @@
s,@ECHO_C@,,;t t
s,@ECHO_N@,-n,;t t
s,@ECHO_T@,,;t t
-s,@LIBS@,,;t t
-s,@build@,i686-pc-cygwin,;t t
+s,@LIBS@,-ldl -lz ,;t t
+s,@build@,i686-redhat-linux-gnu,;t t
s,@build_cpu@,i686,;t t
-s,@build_vendor@,pc,;t t
-s,@build_os@,cygwin,;t t
-s,@host@,i686-pc-cygwin,;t t
+s,@build_vendor@,redhat,;t t
+s,@build_os@,linux-gnu,;t t
+s,@host@,i686-redhat-linux-gnu,;t t
s,@host_cpu@,i686,;t t
-s,@host_vendor@,pc,;t t
-s,@host_os@,cygwin,;t t
-s,@target@,i686-pc-cygwin,;t t
+s,@host_vendor@,redhat,;t t
+s,@host_os@,linux-gnu,;t t
+s,@target@,i686-redhat-linux-gnu,;t t
s,@target_cpu@,i686,;t t
-s,@target_vendor@,pc,;t t
-s,@target_os@,cygwin,;t t
+s,@target_vendor@,redhat,;t t
+s,@target_os@,linux-gnu,;t t
s,@INSTALL_PROGRAM@,${INSTALL},;t t
s,@INSTALL_SCRIPT@,${INSTALL},;t t
s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
-s,@CYGPATH_W@,cygpath -w,;t t
+s,@CYGPATH_W@,echo,;t t
s,@PACKAGE@,coolkey,;t t
s,@VERSION(a),1.1.0,;t t
-s,@ACLOCAL@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run aclocal-1.9,;t t
-s,@AUTOCONF@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run autoconf,;t t
-s,@AUTOMAKE@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run automake-1.9,;t t
-s,@AUTOHEADER@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run autoheader,;t t
-s,@MAKEINFO@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run makeinfo,;t t
-s,@install_sh@,/cygdrive/c/builds/fedora/coolkey/install-sh,;t t
+s,@ACLOCAL@,${SHELL} /builds/fedora/coolkey/missing --run aclocal-1.9,;t t
+s,@AUTOCONF@,${SHELL} /builds/fedora/coolkey/missing --run autoconf,;t t
+s,@AUTOMAKE@,${SHELL} /builds/fedora/coolkey/missing --run automake-1.9,;t t
+s,@AUTOHEADER@,${SHELL} /builds/fedora/coolkey/missing --run autoheader,;t t
+s,@MAKEINFO@,${SHELL} /builds/fedora/coolkey/missing --run makeinfo,;t t
+s,@install_sh@,/builds/fedora/coolkey/install-sh,;t t
s,@STRIP@,strip,;t t
s,@ac_ct_STRIP@,strip,;t t
s,@INSTALL_STRIP_PROGRAM@,${SHELL} $(install_sh) -c -s,;t t
@@ -516,34 +517,34 @@
s,@AWK@,gawk,;t t
s,@SET_MAKE@,,;t t
s,@am__leading_dot(a),.,;t t
-s,@AMTAR@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run tar,;t t
+s,@AMTAR@,${SHELL} /builds/fedora/coolkey/missing --run tar,;t t
s,@am__tar@,${AMTAR} chof - "$$tardir",;t t
s,@am__untar@,${AMTAR} xf -,;t t
s,@MAINTAINER_MODE_TRUE@,#,;t t
s,@MAINTAINER_MODE_FALSE@,,;t t
s,@MAINT@,#,;t t
-s,@CC@,cl,;t t
-s,@CFLAGS@,-g,;t t
+s,@CC@,gcc,;t t
+s,@CFLAGS@,-g -O2,;t t
s,@LDFLAGS@,,;t t
-s,@CPPFLAGS@, -DWIN32,;t t
-s,@ac_ct_CC@,cl,;t t
-s,@EXEEXT(a),.exe,;t t
-s,@OBJEXT@,obj,;t t
+s,@CPPFLAGS@,,;t t
+s,@ac_ct_CC@,gcc,;t t
+s,@EXEEXT@,,;t t
+s,@OBJEXT@,o,;t t
s,@DEPDIR(a),.deps,;t t
s,@am__include@,include,;t t
s,@am__quote@,,;t t
s,@AMDEP_TRUE@,,;t t
s,@AMDEP_FALSE@,#,;t t
s,@AMDEPBACKSLASH@,\,;t t
-s,@CCDEPMODE@,depmode=none,;t t
-s,@am__fastdepCC_TRUE@,#,;t t
-s,@am__fastdepCC_FALSE@,,;t t
-s,@CXX@,cl,;t t
-s,@CXXFLAGS@, /EHsc,;t t
-s,@ac_ct_CXX@,,;t t
-s,@CXXDEPMODE@,depmode=none,;t t
-s,@am__fastdepCXX_TRUE@,#,;t t
-s,@am__fastdepCXX_FALSE@,,;t t
+s,@CCDEPMODE@,depmode=gcc3,;t t
+s,@am__fastdepCC_TRUE@,,;t t
+s,@am__fastdepCC_FALSE@,#,;t t
+s,@CXX@,g++,;t t
+s,@CXXFLAGS@,-g -O2,;t t
+s,@ac_ct_CXX@,g++,;t t
+s,@CXXDEPMODE@,depmode=gcc3,;t t
+s,@am__fastdepCXX_TRUE@,,;t t
+s,@am__fastdepCXX_FALSE@,#,;t t
s,@EGREP@,grep -E,;t t
s,@LN_S@,ln -s,;t t
s,@ECHO@,echo,;t t
@@ -551,24 +552,26 @@
s,@ac_ct_AR@,ar,;t t
s,@RANLIB@,ranlib,;t t
s,@ac_ct_RANLIB@,ranlib,;t t
-s,@CPP@,cl -E,;t t
-s,@CXXCPP@,cl -E,;t t
+s,@CPP@,gcc -E,;t t
+s,@CXXCPP@,g++ -E,;t t
s,@F77@,,;t t
s,@FFLAGS@,,;t t
s,@ac_ct_F77@,,;t t
s,@LIBTOOL@,$(SHELL) $(top_builddir)/libtool,;t t
-s,@LIBCKYAPPLET(a),${top_builddir}/src/libckyapplet/libckyapplet.la,;t t
s,@PKG_CONFIG@,/usr/bin/pkg-config,;t t
s,@ac_pt_PKG_CONFIG@,/usr/bin/pkg-config,;t t
-s,@PCSC_CFLAGS@,,;t t
-s,@PCSC_LIBS@,,;t t
-s,@ZLIB_CFLAGS@,-Ic:/zlib,;t t
-s,@ZLIB_LIBS@,c:/zlib/zlib.dll,;t t
-s,@SCARD_LIB_NAME(a),winscard.dll,;t t
-s,@HAVE_PCSC_TRUE@,#,;t t
-s,@HAVE_PCSC_FALSE@,,;t t
-s,@LIBOBJS@, ${LIBOBJDIR}lstat$U.obj,;t t
-s,@LTLIBOBJS@, ${LIBOBJDIR}lstat$U.lo,;t t
+s,@NSS_CFLAGS@,-I/usr/include/nss3 -I/usr/include/nspr4 ,;t t
+s,@NSS_LIBS@,-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl ,;t t
+s,@LIBCKYAPPLET(a),${top_builddir}/src/libckyapplet/libckyapplet.la,;t t
+s,@PCSC_CFLAGS@,-pthread -I/usr/include/PCSC ,;t t
+s,@PCSC_LIBS@,-lpcsclite ,;t t
+s,@ZLIB_CFLAGS@,,;t t
+s,@ZLIB_LIBS@,,;t t
+s,@SCARD_LIB_NAME(a),libpcsclite.so.1,;t t
+s,@HAVE_PCSC_TRUE@,,;t t
+s,@HAVE_PCSC_FALSE@,#,;t t
+s,@LIBOBJS@,,;t t
+s,@LTLIBOBJS@,,;t t
CEOF
# Split the substitutions into bite-sized pieces for seds with
@@ -891,14 +894,25 @@
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_MEMORY_H${ac_dB}HAVE_MEMORY_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRINGS_H${ac_dB}HAVE_STRINGS_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_INTTYPES_H${ac_dB}HAVE_INTTYPES_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDINT_H${ac_dB}HAVE_STDINT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_DLFCN_H${ac_dB}HAVE_DLFCN_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_LIBZ${ac_dB}HAVE_LIBZ${ac_dC}1${ac_dD}
+${ac_dA}HAVE_LIBDL${ac_dB}HAVE_LIBDL${ac_dC}1${ac_dD}
${ac_dA}DEBUG${ac_dB}DEBUG${ac_dC}1${ac_dD}
${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYSLOG_H${ac_dB}HAVE_SYSLOG_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_FCNTL_H${ac_dB}HAVE_FCNTL_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_ZLIB_H${ac_dB}HAVE_ZLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_MALLOC${ac_dB}HAVE_MALLOC${ac_dC}1${ac_dD}
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_REALLOC${ac_dB}HAVE_REALLOC${ac_dC}1${ac_dD}
+${ac_dA}LSTAT_FOLLOWS_SLASHED_SYMLINK${ac_dB}LSTAT_FOLLOWS_SLASHED_SYMLINK${ac_dC}1${ac_dD}
${ac_dA}HAVE_VPRINTF${ac_dB}HAVE_VPRINTF${ac_dC}1${ac_dD}
${ac_dA}HAVE_MEMSET${ac_dB}HAVE_MEMSET${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRDUP${ac_dB}HAVE_STRDUP${ac_dC}1${ac_dD}
@@ -929,14 +943,25 @@
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_MEMORY_H${ac_uB}HAVE_MEMORY_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRINGS_H${ac_uB}HAVE_STRINGS_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_INTTYPES_H${ac_uB}HAVE_INTTYPES_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDINT_H${ac_uB}HAVE_STDINT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_DLFCN_H${ac_uB}HAVE_DLFCN_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_LIBZ${ac_uB}HAVE_LIBZ${ac_uC}1${ac_uD}
+${ac_uA}HAVE_LIBDL${ac_uB}HAVE_LIBDL${ac_uC}1${ac_uD}
${ac_uA}DEBUG${ac_uB}DEBUG${ac_uC}1${ac_uD}
${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYSLOG_H${ac_uB}HAVE_SYSLOG_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_FCNTL_H${ac_uB}HAVE_FCNTL_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_ZLIB_H${ac_uB}HAVE_ZLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_MALLOC${ac_uB}HAVE_MALLOC${ac_uC}1${ac_uD}
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_REALLOC${ac_uB}HAVE_REALLOC${ac_uC}1${ac_uD}
+${ac_uA}LSTAT_FOLLOWS_SLASHED_SYMLINK${ac_uB}LSTAT_FOLLOWS_SLASHED_SYMLINK${ac_uC}1${ac_uD}
${ac_uA}HAVE_VPRINTF${ac_uB}HAVE_VPRINTF${ac_uC}1${ac_uD}
${ac_uA}HAVE_MEMSET${ac_uB}HAVE_MEMSET${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRDUP${ac_uB}HAVE_STRDUP${ac_uC}1${ac_uD}
Index: configure.in
===================================================================
RCS file: /cvs/dirsec/coolkey/configure.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- configure.in 25 Aug 2006 00:31:39 -0000 1.5
+++ configure.in 13 Oct 2006 01:16:20 -0000 1.6
@@ -93,6 +93,7 @@
if test $WINDOWS -ne 1; then
AC_CHECK_LIB(z, uncompress, , AC_MSG_ERROR(could not locate libz compression library))
AC_CHECK_LIB(dl, dlopen, , AC_MSG_ERROR(could not locate dynamic library services library))
+PKG_CHECK_MODULES(NSS, nss, true, [ AC_MSG_ERROR(could not find NSS Crypto libraries) ])
fi
# add our compiled static libraries
@@ -114,6 +115,7 @@
fi
])
fi
+AC_SUBST(NSS_CFLAGS)
AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS)
AC_SUBST(PCSC_CFLAGS)
@@ -144,5 +146,6 @@
src/libckyapplet/Makefile
src/libckyapplet/libckyapplet.pc
src/coolkey/Makefile
+src/install/Makefile
])
AC_OUTPUT
17 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm archive.c, 1.9, 1.10 ldbm_config.c, 1.7, 1.8 ldbm_config.h, 1.4, 1.5
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23608/ldap/servers/slapd/back-ldbm
Modified Files:
archive.c ldbm_config.c ldbm_config.h
Log Message:
[208672] parameterizing the hardcoded paths (phase 2. db, log, lock, pid, cert, and instance dir)
1) introduced these 3 new config attributes:
nsslapd-lockdir, nsslapd-tmpdir, nsslapd-certdir,
and eliminated: nsslapd-instancedir.
2) replaced the hardcoded paths with the corresponding attribute value in the
server as well as in the create/remove instance codes.
3) moved snmp stats file to the nsslapd-tmpdir
4) moved the server instance dir to <prefix>/lib/<brand>-ds/slapd-<id>
Index: archive.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/archive.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- archive.c 11 Apr 2006 02:14:45 -0000 1.9
+++ archive.c 13 Oct 2006 01:06:29 -0000 1.10
@@ -42,9 +42,7 @@
int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
{
struct ldbminfo *li;
- char *instancedir = NULL;
- char *orig_dir = NULL;
- char *directory = NULL;
+ char *directory = NULL; /* -a <directory> */
char *backendname = NULL;
int return_value = -1;
int task_flags = 0;
@@ -53,19 +51,17 @@
int is_old_to_new = 0;
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
- slapi_pblock_get( pb, SLAPI_SEQ_VAL, &orig_dir );
+ slapi_pblock_get( pb, SLAPI_SEQ_VAL, &directory );
slapi_pblock_get( pb, SLAPI_BACKEND_INSTANCE_NAME, &backendname);
slapi_pblock_get( pb, SLAPI_BACKEND_TASK, &task );
slapi_pblock_get( pb, SLAPI_TASK_FLAGS, &task_flags );
li->li_flags = run_from_cmdline = (task_flags & TASK_RUNNING_FROM_COMMANDLINE);
- if ( !orig_dir || !*orig_dir ) {
+ if ( !directory || !*directory ) {
LDAPDebug( LDAP_DEBUG_ANY, "archive2db: no archive name\n",
0, 0, 0 );
return( -1 );
}
- instancedir = config_get_instancedir();
- directory = rel2abspath_ext(orig_dir, instancedir);
/* check the current idl format vs backup DB version */
if (idl_get_idl_new())
@@ -248,17 +244,14 @@
}
}
out:
- slapi_ch_free_string(&directory);
return return_value;
}
int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
{
struct ldbminfo *li;
- char *orig_dir = NULL;
- char *directory = NULL;
+ char *directory = NULL; /* -a <directory> */
char *dir_bak = NULL;
- char *instancedir = NULL;
int return_value = -1;
int task_flags = 0;
int run_from_cmdline = 0;
@@ -266,19 +259,17 @@
struct stat sbuf;
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
- slapi_pblock_get( pb, SLAPI_SEQ_VAL, &orig_dir );
+ slapi_pblock_get( pb, SLAPI_SEQ_VAL, &directory );
slapi_pblock_get( pb, SLAPI_TASK_FLAGS, &task_flags );
li->li_flags = run_from_cmdline = (task_flags & TASK_RUNNING_FROM_COMMANDLINE);
slapi_pblock_get( pb, SLAPI_BACKEND_TASK, &task );
- if ( !orig_dir || !*orig_dir ) {
+ if ( !directory || !*directory ) {
LDAPDebug( LDAP_DEBUG_ANY, "db2archive: no archive name\n",
0, 0, 0 );
return( -1 );
}
- instancedir = config_get_instancedir();
- directory = rel2abspath_ext(orig_dir, instancedir);
if (stat(directory, &sbuf) == 0) {
int baklen = strlen(directory) + 5; /* ".bak\0" */
dir_bak = slapi_ch_malloc(baklen);
@@ -446,6 +437,5 @@
}
out:
slapi_ch_free_string(&dir_bak);
- slapi_ch_free_string(&directory);
return return_value;
}
Index: ldbm_config.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_config.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ldbm_config.c 12 Oct 2006 21:21:10 -0000 1.7
+++ ldbm_config.c 13 Oct 2006 01:06:29 -0000 1.8
@@ -226,13 +226,10 @@
LDAPDebug(LDAP_DEBUG_ANY, "New db directory location will not take affect until the server is restarted\n", 0, 0, 0);
} else {
if (!strcmp(val, "get default")) {
- /* Generate the default db directory name. The default db directory
- * should be the instance directory with a '/db' thrown on the end.
- * We need to read cn=config to get the instance dir. */
/* We use this funky "get default" string for the caller to
* tell us that it has no idea what the db directory should
- * be. This code figures it out be reading cn=config. */
-
+ * be. This code figures it out be reading "cn=config,cn=ldbm
+ * database,cn=plugins,cn=config" entry. */
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
Slapi_Attr *attr = NULL;
@@ -241,30 +238,33 @@
int res;
search_pb = slapi_pblock_new();
- slapi_search_internal_set_pb(search_pb, "cn=config", LDAP_SCOPE_BASE,
- "objectclass=*", NULL, 0, NULL, NULL, li->li_identity, 0);
+ slapi_search_internal_set_pb(search_pb, CONFIG_LDBM_DN,
+ LDAP_SCOPE_BASE, "objectclass=*", NULL, 0, NULL, NULL,
+ li->li_identity, 0);
slapi_search_internal_pb(search_pb);
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if (res != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: ldbm plugin unable to read cn=config\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "ERROR: ldbm plugin unable to read %s\n",
+ CONFIG_LDBM_DN, 0, 0);
goto done;
}
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: ldbm plugin unable to read cn=config\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "ERROR: ldbm plugin unable to read %s\n",
+ CONFIG_LDBM_DN, 0, 0);
res = LDAP_OPERATIONS_ERROR;
goto done;
}
- res = slapi_entry_attr_find(entries[0], "nsslapd-instancedir", &attr);
+ res = slapi_entry_attr_find(entries[0], "nsslapd-directory", &attr);
if (res != 0 || attr == NULL) {
LDAPDebug(LDAP_DEBUG_ANY,
- "ERROR: ldbm plugin unable to read attribute nsslapd-instancedir from cn=config\n",
- 0, 0, 0);
+ "ERROR: ldbm plugin unable to read attribute nsslapd-directory from %s\n",
+ CONFIG_LDBM_DN, 0, 0);
res = LDAP_OPERATIONS_ERROR;
goto done;
}
@@ -273,8 +273,8 @@
|| ( NULL == v )
|| ( NULL == ( s = slapi_value_get_string( v )))) {
LDAPDebug(LDAP_DEBUG_ANY,
- "ERROR: ldbm plugin unable to read attribute nsslapd-instancedir from cn=config\n",
- 0, 0, 0);
+ "ERROR: ldbm plugin unable to read attribute nsslapd-directory from %s\n",
+ CONFIG_LDBM_DN, 0, 0);
res = LDAP_OPERATIONS_ERROR;
goto done;
}
@@ -284,7 +284,7 @@
if (res != LDAP_SUCCESS) {
return res;
}
- PR_snprintf(tmpbuf, BUFSIZ, "%s/db", s );
+ PR_snprintf(tmpbuf, BUFSIZ, "%s", s);
val = tmpbuf;
}
slapi_ch_free((void **) &(li->li_new_directory));
@@ -350,7 +350,7 @@
val = 100;
}
- li->li_maxpassbeforemerge = val;
+ li->li_maxpassbeforemerge = val;
}
return retval;
@@ -661,7 +661,7 @@
if (val < 0 || val > 100) {
PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
- "Error: Invalid value for %s (%d). Must be between 0 and 100\n", CONFIG_DB_TRICKLE_PERCENTAGE, val);
+ "Error: Invalid value for %s (%d). Must be between 0 and 100\n", CONFIG_DB_TRICKLE_PERCENTAGE, val);
LDAPDebug(LDAP_DEBUG_ANY, "%s", errorbuf, 0, 0);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -896,12 +896,12 @@
}
static int ldbm_config_import_cache_autosize_set(void *arg, void *value, char *errorbuf,
- int phase, int apply)
+ int phase, int apply)
{
struct ldbminfo *li = (struct ldbminfo *)arg;
if (apply)
- li->li_import_cache_autosize = (int)value;
+ li->li_import_cache_autosize = (int)value;
return LDAP_SUCCESS;
}
@@ -913,12 +913,12 @@
}
static int ldbm_config_cache_autosize_set(void *arg, void *value, char *errorbuf,
- int phase, int apply)
+ int phase, int apply)
{
struct ldbminfo *li = (struct ldbminfo *)arg;
if (apply)
- li->li_cache_autosize = (int)value;
+ li->li_cache_autosize = (int)value;
return LDAP_SUCCESS;
}
@@ -930,12 +930,12 @@
}
static int ldbm_config_cache_autosize_split_set(void *arg, void *value, char *errorbuf,
- int phase, int apply)
+ int phase, int apply)
{
struct ldbminfo *li = (struct ldbminfo *)arg;
if (apply)
- li->li_cache_autosize_split = (int)value;
+ li->li_cache_autosize_split = (int)value;
return LDAP_SUCCESS;
}
@@ -1090,7 +1090,7 @@
static int
ldbm_config_exclude_from_export_set( void *arg, void *value, char *errorbuf,
- int phase, int apply)
+ int phase, int apply)
{
struct ldbminfo *li = (struct ldbminfo *)arg;
@@ -1114,12 +1114,12 @@
ldbm_config_exclude_from_export_get( void *arg )
{
struct ldbminfo *li = (struct ldbminfo *)arg;
- char *p, *retstr = NULL;
- size_t len = 0;
+ char *p, *retstr = NULL;
+ size_t len = 0;
if ( NULL != li->li_attrs_to_exclude_from_export &&
NULL != li->li_attrs_to_exclude_from_export[0] ) {
- int i;
+ int i;
for ( i = 0; li->li_attrs_to_exclude_from_export[i] != NULL; ++i ) {
len += strlen( li->li_attrs_to_exclude_from_export[i] ) + 1;
@@ -1171,59 +1171,59 @@
* Configuration array for ldbm and dblayer variables
*----------------------------------------------------------------------*/
static config_info ldbm_config[] = {
- {CONFIG_LOOKTHROUGHLIMIT, CONFIG_TYPE_INT, "5000", &ldbm_config_lookthroughlimit_get, &ldbm_config_lookthroughlimit_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_MODE, CONFIG_TYPE_INT_OCTAL, "0600", &ldbm_config_mode_get, &ldbm_config_mode_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_IDLISTSCANLIMIT, CONFIG_TYPE_INT, "4000", &ldbm_config_allidsthreshold_get, &ldbm_config_allidsthreshold_set, CONFIG_FLAG_ALWAYS_SHOW},
- {CONFIG_DIRECTORY, CONFIG_TYPE_STRING, "", &ldbm_config_directory_get, &ldbm_config_directory_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_DBCACHESIZE, CONFIG_TYPE_SIZE_T, "10000000", &ldbm_config_dbcachesize_get, &ldbm_config_dbcachesize_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_DBNCACHE, CONFIG_TYPE_INT, "0", &ldbm_config_dbncache_get, &ldbm_config_dbncache_set, CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_MAXPASSBEFOREMERGE, CONFIG_TYPE_INT, "100", &ldbm_config_maxpassbeforemerge_get, &ldbm_config_maxpassbeforemerge_set, 0},
-
- /* dblayer config attributes */
- {CONFIG_DB_LOGDIRECTORY, CONFIG_TYPE_STRING, "", &ldbm_config_db_logdirectory_get, &ldbm_config_db_logdirectory_set, CONFIG_FLAG_ALWAYS_SHOW},
- {CONFIG_DB_DURABLE_TRANSACTIONS, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_durable_transactions_get, &ldbm_config_db_durable_transactions_set, CONFIG_FLAG_ALWAYS_SHOW},
- {CONFIG_DB_CIRCULAR_LOGGING, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_circular_logging_get, &ldbm_config_db_circular_logging_set, 0},
- {CONFIG_DB_TRANSACTION_LOGGING, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_transaction_logging_get, &ldbm_config_db_transaction_logging_set, CONFIG_FLAG_ALWAYS_SHOW},
- {CONFIG_DB_CHECKPOINT_INTERVAL, CONFIG_TYPE_INT, "60", &ldbm_config_db_checkpoint_interval_get, &ldbm_config_db_checkpoint_interval_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_DB_TRANSACTION_BATCH, CONFIG_TYPE_INT, "0", &dblayer_get_batch_transactions, &dblayer_set_batch_transactions, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_DB_LOGBUF_SIZE, CONFIG_TYPE_SIZE_T, "0", &ldbm_config_db_logbuf_size_get, &ldbm_config_db_logbuf_size_set, CONFIG_FLAG_ALWAYS_SHOW},
- {CONFIG_DB_PAGE_SIZE, CONFIG_TYPE_SIZE_T, "0", &ldbm_config_db_page_size_get, &ldbm_config_db_page_size_set, 0},
- {CONFIG_DB_INDEX_PAGE_SIZE, CONFIG_TYPE_SIZE_T, "0", &ldbm_config_db_index_page_size_get, &ldbm_config_db_index_page_size_set, 0},
- {CONFIG_DB_IDL_DIVISOR, CONFIG_TYPE_INT, "0", &ldbm_config_db_idl_divisor_get, &ldbm_config_db_idl_divisor_set, 0},
- {CONFIG_DB_LOGFILE_SIZE, CONFIG_TYPE_SIZE_T, "0", &ldbm_config_db_logfile_size_get, &ldbm_config_db_logfile_size_set, 0},
- {CONFIG_DB_TRICKLE_PERCENTAGE, CONFIG_TYPE_INT, "5", &ldbm_config_db_trickle_percentage_get, &ldbm_config_db_trickle_percentage_set, 0},
- {CONFIG_DB_SPIN_COUNT, CONFIG_TYPE_INT, "0", &ldbm_config_db_spin_count_get, &ldbm_config_db_spin_count_set, 0},
- {CONFIG_DB_VERBOSE, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_verbose_get, &ldbm_config_db_verbose_set, 0},
- {CONFIG_DB_DEBUG, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_debug_get, &ldbm_config_db_debug_set, 0},
- {CONFIG_DB_NAMED_REGIONS, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_named_regions_get, &ldbm_config_db_named_regions_set, 0},
- {CONFIG_DB_LOCK, CONFIG_TYPE_INT, "10000", &ldbm_config_db_lock_get, &ldbm_config_db_lock_set, 0},
- {CONFIG_DB_PRIVATE_MEM, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_private_mem_get, &ldbm_config_db_private_mem_set, 0},
- {CONFIG_DB_PRIVATE_IMPORT_MEM, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_private_import_mem_get, &ldbm_config_db_private_import_mem_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_DB_SHM_KEY, CONFIG_TYPE_LONG, "389389", &ldbm_config_db_shm_key_get, &ldbm_config_db_shm_key_set, 0},
- {CONFIG_DB_CACHE, CONFIG_TYPE_INT, "0", &ldbm_config_db_cache_get, &ldbm_config_db_cache_set, 0},
- {CONFIG_DB_DEBUG_CHECKPOINTING, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_debug_checkpointing_get, &ldbm_config_db_debug_checkpointing_set, 0},
- {CONFIG_DB_HOME_DIRECTORY, CONFIG_TYPE_STRING, "", &ldbm_config_db_home_directory_get, &ldbm_config_db_home_directory_set, 0},
- {CONFIG_IMPORT_CACHE_AUTOSIZE, CONFIG_TYPE_INT, "-1", &ldbm_config_import_cache_autosize_get, &ldbm_config_import_cache_autosize_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_CACHE_AUTOSIZE, CONFIG_TYPE_INT, "0", &ldbm_config_cache_autosize_get, &ldbm_config_cache_autosize_set, 0},
- {CONFIG_CACHE_AUTOSIZE_SPLIT, CONFIG_TYPE_INT, "50", &ldbm_config_cache_autosize_split_get, &ldbm_config_cache_autosize_split_set, 0},
- {CONFIG_IMPORT_CACHESIZE, CONFIG_TYPE_SIZE_T, "20000000", &ldbm_config_import_cachesize_get, &ldbm_config_import_cachesize_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_LOOKTHROUGHLIMIT, CONFIG_TYPE_INT, "5000", &ldbm_config_lookthroughlimit_get, &ldbm_config_lookthroughlimit_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_MODE, CONFIG_TYPE_INT_OCTAL, "0600", &ldbm_config_mode_get, &ldbm_config_mode_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_IDLISTSCANLIMIT, CONFIG_TYPE_INT, "4000", &ldbm_config_allidsthreshold_get, &ldbm_config_allidsthreshold_set, CONFIG_FLAG_ALWAYS_SHOW},
+ {CONFIG_DIRECTORY, CONFIG_TYPE_STRING, "", &ldbm_config_directory_get, &ldbm_config_directory_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_DBCACHESIZE, CONFIG_TYPE_SIZE_T, "10000000", &ldbm_config_dbcachesize_get, &ldbm_config_dbcachesize_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_DBNCACHE, CONFIG_TYPE_INT, "0", &ldbm_config_dbncache_get, &ldbm_config_dbncache_set, CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_MAXPASSBEFOREMERGE, CONFIG_TYPE_INT, "100", &ldbm_config_maxpassbeforemerge_get, &ldbm_config_maxpassbeforemerge_set, 0},
+
+ /* dblayer config attributes */
+ {CONFIG_DB_LOGDIRECTORY, CONFIG_TYPE_STRING, "", &ldbm_config_db_logdirectory_get, &ldbm_config_db_logdirectory_set, CONFIG_FLAG_ALWAYS_SHOW},
+ {CONFIG_DB_DURABLE_TRANSACTIONS, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_durable_transactions_get, &ldbm_config_db_durable_transactions_set, CONFIG_FLAG_ALWAYS_SHOW},
+ {CONFIG_DB_CIRCULAR_LOGGING, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_circular_logging_get, &ldbm_config_db_circular_logging_set, 0},
+ {CONFIG_DB_TRANSACTION_LOGGING, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_transaction_logging_get, &ldbm_config_db_transaction_logging_set, CONFIG_FLAG_ALWAYS_SHOW},
+ {CONFIG_DB_CHECKPOINT_INTERVAL, CONFIG_TYPE_INT, "60", &ldbm_config_db_checkpoint_interval_get, &ldbm_config_db_checkpoint_interval_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_DB_TRANSACTION_BATCH, CONFIG_TYPE_INT, "0", &dblayer_get_batch_transactions, &dblayer_set_batch_transactions, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_DB_LOGBUF_SIZE, CONFIG_TYPE_SIZE_T, "0", &ldbm_config_db_logbuf_size_get, &ldbm_config_db_logbuf_size_set, CONFIG_FLAG_ALWAYS_SHOW},
+ {CONFIG_DB_PAGE_SIZE, CONFIG_TYPE_SIZE_T, "0", &ldbm_config_db_page_size_get, &ldbm_config_db_page_size_set, 0},
+ {CONFIG_DB_INDEX_PAGE_SIZE, CONFIG_TYPE_SIZE_T, "0", &ldbm_config_db_index_page_size_get, &ldbm_config_db_index_page_size_set, 0},
+ {CONFIG_DB_IDL_DIVISOR, CONFIG_TYPE_INT, "0", &ldbm_config_db_idl_divisor_get, &ldbm_config_db_idl_divisor_set, 0},
+ {CONFIG_DB_LOGFILE_SIZE, CONFIG_TYPE_SIZE_T, "0", &ldbm_config_db_logfile_size_get, &ldbm_config_db_logfile_size_set, 0},
+ {CONFIG_DB_TRICKLE_PERCENTAGE, CONFIG_TYPE_INT, "5", &ldbm_config_db_trickle_percentage_get, &ldbm_config_db_trickle_percentage_set, 0},
+ {CONFIG_DB_SPIN_COUNT, CONFIG_TYPE_INT, "0", &ldbm_config_db_spin_count_get, &ldbm_config_db_spin_count_set, 0},
+ {CONFIG_DB_VERBOSE, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_verbose_get, &ldbm_config_db_verbose_set, 0},
+ {CONFIG_DB_DEBUG, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_debug_get, &ldbm_config_db_debug_set, 0},
+ {CONFIG_DB_NAMED_REGIONS, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_named_regions_get, &ldbm_config_db_named_regions_set, 0},
+ {CONFIG_DB_LOCK, CONFIG_TYPE_INT, "10000", &ldbm_config_db_lock_get, &ldbm_config_db_lock_set, 0},
+ {CONFIG_DB_PRIVATE_MEM, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_private_mem_get, &ldbm_config_db_private_mem_set, 0},
+ {CONFIG_DB_PRIVATE_IMPORT_MEM, CONFIG_TYPE_ONOFF, "on", &ldbm_config_db_private_import_mem_get, &ldbm_config_db_private_import_mem_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_DB_SHM_KEY, CONFIG_TYPE_LONG, "389389", &ldbm_config_db_shm_key_get, &ldbm_config_db_shm_key_set, 0},
+ {CONFIG_DB_CACHE, CONFIG_TYPE_INT, "0", &ldbm_config_db_cache_get, &ldbm_config_db_cache_set, 0},
+ {CONFIG_DB_DEBUG_CHECKPOINTING, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_debug_checkpointing_get, &ldbm_config_db_debug_checkpointing_set, 0},
+ {CONFIG_DB_HOME_DIRECTORY, CONFIG_TYPE_STRING, "", &ldbm_config_db_home_directory_get, &ldbm_config_db_home_directory_set, 0},
+ {CONFIG_IMPORT_CACHE_AUTOSIZE, CONFIG_TYPE_INT, "-1", &ldbm_config_import_cache_autosize_get, &ldbm_config_import_cache_autosize_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_CACHE_AUTOSIZE, CONFIG_TYPE_INT, "0", &ldbm_config_cache_autosize_get, &ldbm_config_cache_autosize_set, 0},
+ {CONFIG_CACHE_AUTOSIZE_SPLIT, CONFIG_TYPE_INT, "50", &ldbm_config_cache_autosize_split_get, &ldbm_config_cache_autosize_split_set, 0},
+ {CONFIG_IMPORT_CACHESIZE, CONFIG_TYPE_SIZE_T, "20000000", &ldbm_config_import_cachesize_get, &ldbm_config_import_cachesize_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
#if defined(USE_NEW_IDL)
- {CONFIG_IDL_SWITCH, CONFIG_TYPE_STRING, "new", &ldbm_config_idl_get_idl_new, &ldbm_config_idl_set_tune, CONFIG_FLAG_ALWAYS_SHOW},
+ {CONFIG_IDL_SWITCH, CONFIG_TYPE_STRING, "new", &ldbm_config_idl_get_idl_new, &ldbm_config_idl_set_tune, CONFIG_FLAG_ALWAYS_SHOW},
#else
- {CONFIG_IDL_SWITCH, CONFIG_TYPE_STRING, "old", &ldbm_config_idl_get_idl_new, &ldbm_config_idl_set_tune, CONFIG_FLAG_ALWAYS_SHOW},
+ {CONFIG_IDL_SWITCH, CONFIG_TYPE_STRING, "old", &ldbm_config_idl_get_idl_new, &ldbm_config_idl_set_tune, CONFIG_FLAG_ALWAYS_SHOW},
#endif
- {CONFIG_BYPASS_FILTER_TEST, CONFIG_TYPE_STRING, "on", &ldbm_config_get_bypass_filter_test, &ldbm_config_set_bypass_filter_test, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_USE_VLV_INDEX, CONFIG_TYPE_ONOFF, "on", &ldbm_config_get_use_vlv_index, &ldbm_config_set_use_vlv_index, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_DB_LOCKDOWN, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_lockdown_get, &ldbm_config_db_lockdown_set, 0},
- {CONFIG_INDEX_BUFFER_SIZE, CONFIG_TYPE_INT, "0", &ldbm_config_index_buffer_size_get, &ldbm_config_index_buffer_size_set, 0},
- {CONFIG_EXCLUDE_FROM_EXPORT, CONFIG_TYPE_STRING,
- CONFIG_EXCLUDE_FROM_EXPORT_DEFAULT_VALUE,
- &ldbm_config_exclude_from_export_get,
- &ldbm_config_exclude_from_export_set, CONFIG_FLAG_ALWAYS_SHOW},
- {CONFIG_DB_TX_MAX, CONFIG_TYPE_INT, "200", &ldbm_config_db_tx_max_get, &ldbm_config_db_tx_max_set, 0},
- {CONFIG_SERIAL_LOCK, CONFIG_TYPE_ONOFF, "on", &ldbm_config_serial_lock_get, &ldbm_config_serial_lock_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
- {CONFIG_USE_LEGACY_ERRORCODE, CONFIG_TYPE_ONOFF, "off", &ldbm_config_legacy_errcode_get, &ldbm_config_legacy_errcode_set, 0},
- {NULL, 0, NULL, NULL, NULL, 0}
+ {CONFIG_BYPASS_FILTER_TEST, CONFIG_TYPE_STRING, "on", &ldbm_config_get_bypass_filter_test, &ldbm_config_set_bypass_filter_test, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_USE_VLV_INDEX, CONFIG_TYPE_ONOFF, "on", &ldbm_config_get_use_vlv_index, &ldbm_config_set_use_vlv_index, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_DB_LOCKDOWN, CONFIG_TYPE_ONOFF, "off", &ldbm_config_db_lockdown_get, &ldbm_config_db_lockdown_set, 0},
+ {CONFIG_INDEX_BUFFER_SIZE, CONFIG_TYPE_INT, "0", &ldbm_config_index_buffer_size_get, &ldbm_config_index_buffer_size_set, 0},
+ {CONFIG_EXCLUDE_FROM_EXPORT, CONFIG_TYPE_STRING,
+ CONFIG_EXCLUDE_FROM_EXPORT_DEFAULT_VALUE,
+ &ldbm_config_exclude_from_export_get,
+ &ldbm_config_exclude_from_export_set, CONFIG_FLAG_ALWAYS_SHOW},
+ {CONFIG_DB_TX_MAX, CONFIG_TYPE_INT, "200", &ldbm_config_db_tx_max_get, &ldbm_config_db_tx_max_set, 0},
+ {CONFIG_SERIAL_LOCK, CONFIG_TYPE_ONOFF, "on", &ldbm_config_serial_lock_get, &ldbm_config_serial_lock_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
+ {CONFIG_USE_LEGACY_ERRORCODE, CONFIG_TYPE_ONOFF, "off", &ldbm_config_legacy_errcode_get, &ldbm_config_legacy_errcode_set, 0},
+ {NULL, 0, NULL, NULL, NULL, 0}
};
void ldbm_config_setup_default(struct ldbminfo *li)
@@ -1279,7 +1279,7 @@
* there, then we process the config information it stores.
*/
PR_snprintf(dn, BUFSIZ, "cn=config, cn=%s, cn=plugins, cn=config",
- li->li_plugin->plg_name);
+ li->li_plugin->plg_name);
search_pb = slapi_pblock_new();
slapi_search_internal_set_pb(search_pb, dn, LDAP_SCOPE_BASE,
"objectclass=*", NULL, 0, NULL, NULL, li->li_identity, 0);
@@ -1304,14 +1304,14 @@
0, 0, 0);
return 1;
}
- parse_ldbm_config_entry(li, entries[0], ldbm_config);
+ parse_ldbm_config_entry(li, entries[0], ldbm_config);
}
if (search_pb) {
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
}
-
+
/* Find all the instance entries and create a Slapi_Backend and an
* ldbm_instance for each */
ldbm_config_read_instance_entries(li, li->li_plugin->plg_name);
@@ -1371,14 +1371,14 @@
void ldbm_config_get(void *arg, config_info *config, char *buf)
{
char *tmp_string;
- size_t val = 0;
+ size_t val = 0;
if (config == NULL) {
buf[0] = '\0';
}
switch(config->config_type) {
- case CONFIG_TYPE_INT:
+ case CONFIG_TYPE_INT:
sprintf(buf, "%d", (int) config->config_get_fn(arg));
break;
case CONFIG_TYPE_INT_OCTAL:
@@ -1388,7 +1388,7 @@
sprintf(buf, "%ld", (long) config->config_get_fn(arg));
break;
case CONFIG_TYPE_SIZE_T:
- val = (size_t) config->config_get_fn(arg);
+ val = (size_t) config->config_get_fn(arg);
sprintf(buf, "%lu", val);
break;
case CONFIG_TYPE_STRING:
@@ -1475,17 +1475,17 @@
int int_val;
long long_val;
size_t sz_val;
- PRInt64 llval;
- int maxint = (int)(((unsigned int)~0)>>1);
- int minint = ~maxint;
- PRInt64 llmaxint;
- PRInt64 llminint;
- int err = 0;
- char *str_val;
+ PRInt64 llval;
+ int maxint = (int)(((unsigned int)~0)>>1);
+ int minint = ~maxint;
+ PRInt64 llmaxint;
+ PRInt64 llminint;
+ int err = 0;
+ char *str_val;
int retval = 0;
- LL_I2L(llmaxint, maxint);
- LL_I2L(llminint, minint);
+ LL_I2L(llmaxint, maxint);
+ LL_I2L(llminint, minint);
config = get_config_info(config_array, attr_name);
if (NULL == config) {
@@ -1505,7 +1505,7 @@
/* If the config phase is initialization or if bval is NULL, we will use
* the default value for the attribute. */
if (CONFIG_PHASE_INITIALIZATION == phase || NULL == bval) {
- use_default = 1;
+ use_default = 1;
} else {
use_default = 0;
@@ -1518,33 +1518,33 @@
switch(config->config_type) {
case CONFIG_TYPE_INT:
if (use_default) {
- str_val = config->config_default_value;
+ str_val = config->config_default_value;
} else {
- str_val = bval->bv_val;
+ str_val = bval->bv_val;
+ }
+ /* get the value as a 64 bit value */
+ llval = db_atoi(str_val, &err);
+ /* check for parsing error (e.g. not a number) */
+ if (err) {
+ PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is not a number\n",
+ str_val, attr_name);
+ LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
+ return LDAP_UNWILLING_TO_PERFORM;
+ /* check for overflow */
+ } else if (LL_CMP(llval, >, llmaxint)) {
+ PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is greater than the maximum %d\n",
+ str_val, attr_name, maxint);
+ LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
+ return LDAP_UNWILLING_TO_PERFORM;
+ /* check for underflow */
+ } else if (LL_CMP(llval, <, llminint)) {
+ PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is less than the minimum %d\n",
+ str_val, attr_name, minint);
+ LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
+ return LDAP_UNWILLING_TO_PERFORM;
}
- /* get the value as a 64 bit value */
- llval = db_atoi(str_val, &err);
- /* check for parsing error (e.g. not a number) */
- if (err) {
- PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is not a number\n",
- str_val, attr_name);
- LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
- return LDAP_UNWILLING_TO_PERFORM;
- /* check for overflow */
- } else if (LL_CMP(llval, >, llmaxint)) {
- PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is greater than the maximum %d\n",
- str_val, attr_name, maxint);
- LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
- return LDAP_UNWILLING_TO_PERFORM;
- /* check for underflow */
- } else if (LL_CMP(llval, <, llminint)) {
- PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is less than the minimum %d\n",
- str_val, attr_name, minint);
- LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
- return LDAP_UNWILLING_TO_PERFORM;
- }
- /* convert 64 bit value to 32 bit value */
- LL_L2I(int_val, llval);
+ /* convert 64 bit value to 32 bit value */
+ LL_L2I(int_val, llval);
retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod);
break;
case CONFIG_TYPE_INT_OCTAL:
@@ -1553,37 +1553,37 @@
} else {
int_val = (int) strtol((char *)bval->bv_val, NULL, 8);
}
- retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod);
- break;
+ retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod);
+ break;
case CONFIG_TYPE_LONG:
if (use_default) {
- str_val = config->config_default_value;
+ str_val = config->config_default_value;
} else {
- str_val = bval->bv_val;
+ str_val = bval->bv_val;
}
- /* get the value as a 64 bit value */
- llval = db_atoi(str_val, &err);
- /* check for parsing error (e.g. not a number) */
- if (err) {
- PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is not a number\n",
- str_val, attr_name);
- LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
- return LDAP_UNWILLING_TO_PERFORM;
- /* check for overflow */
- } else if (LL_CMP(llval, >, llmaxint)) {
- PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is greater than the maximum %d\n",
- str_val, attr_name, maxint);
- LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
- return LDAP_UNWILLING_TO_PERFORM;
- /* check for underflow */
- } else if (LL_CMP(llval, <, llminint)) {
- PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is less than the minimum %d\n",
- str_val, attr_name, minint);
- LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
- return LDAP_UNWILLING_TO_PERFORM;
- }
- /* convert 64 bit value to 32 bit value */
- LL_L2I(long_val, llval);
+ /* get the value as a 64 bit value */
+ llval = db_atoi(str_val, &err);
+ /* check for parsing error (e.g. not a number) */
+ if (err) {
+ PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is not a number\n",
+ str_val, attr_name);
+ LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
+ return LDAP_UNWILLING_TO_PERFORM;
+ /* check for overflow */
+ } else if (LL_CMP(llval, >, llmaxint)) {
+ PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is greater than the maximum %d\n",
+ str_val, attr_name, maxint);
+ LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
+ return LDAP_UNWILLING_TO_PERFORM;
+ /* check for underflow */
+ } else if (LL_CMP(llval, <, llminint)) {
+ PR_snprintf(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value %s for attr %s is less than the minimum %d\n",
+ str_val, attr_name, minint);
+ LDAPDebug(LDAP_DEBUG_ANY, "%s", err_buf, 0, 0);
+ return LDAP_UNWILLING_TO_PERFORM;
+ }
+ /* convert 64 bit value to 32 bit value */
+ LL_L2I(long_val, llval);
retval = config->config_set_fn(arg, (void *) long_val, err_buf, phase, apply_mod);
break;
case CONFIG_TYPE_SIZE_T:
@@ -1615,7 +1615,7 @@
if (use_default) {
retval = config->config_set_fn(arg, config->config_default_value, err_buf, phase, apply_mod);
} else {
- retval = config->config_set_fn(arg, bval->bv_val, err_buf, phase, apply_mod);
+ retval = config->config_set_fn(arg, bval->bv_val, err_buf, phase, apply_mod);
}
break;
case CONFIG_TYPE_ONOFF:
@@ -1663,7 +1663,7 @@
* Returns:
* SLAPI_DSE_CALLBACK_ERROR on failure
* SLAPI_DSE_CALLBACK_OK on success
- */
+ */
int ldbm_config_modify_entry_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e, int *returncode, char *returntext, void *arg)
{
int i;
@@ -1678,7 +1678,7 @@
PR_Lock(li->li_config_mutex);
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
-
+
returntext[0] = '\0';
/*
@@ -1750,15 +1750,14 @@
void replace_ldbm_config_value(char *conftype, char *val, struct ldbminfo *li)
{
Slapi_PBlock pb;
- Slapi_Mods smods;
+ Slapi_Mods smods;
pblock_init(&pb);
- slapi_mods_init(&smods, 1);
- slapi_mods_add(&smods, LDAP_MOD_REPLACE, conftype, strlen(val), val);
- slapi_modify_internal_set_pb(&pb,
- "cn=config,cn=ldbm database,cn=plugins,cn=config",
- slapi_mods_get_ldapmods_byref(&smods),
- NULL, NULL, li->li_identity, 0);
+ slapi_mods_init(&smods, 1);
+ slapi_mods_add(&smods, LDAP_MOD_REPLACE, conftype, strlen(val), val);
+ slapi_modify_internal_set_pb(&pb, CONFIG_LDBM_DN,
+ slapi_mods_get_ldapmods_byref(&smods),
+ NULL, NULL, li->li_identity, 0);
slapi_modify_internal_pb(&pb);
slapi_mods_done(&smods);
pblock_done(&pb);
Index: ldbm_config.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_config.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ldbm_config.h 19 Apr 2005 22:07:38 -0000 1.4
+++ ldbm_config.h 13 Oct 2006 01:06:29 -0000 1.5
@@ -144,6 +144,8 @@
#define CONFIG_USE_LEGACY_ERRORCODE "nsslapd-do-not-use-vlv-error"
+#define CONFIG_LDBM_DN "cn=config,cn=ldbm database,cn=plugins,cn=config"
+
#define LDBM_INSTANCE_CONFIG_DONT_WRITE 1
/* Some fuctions in ldbm_config.c used by ldbm_instance_config.c */
17 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd auth.c, 1.7, 1.8 ch_malloc.c, 1.7, 1.8 config.c, 1.7, 1.8 libglobs.c, 1.10, 1.11 libslapd.def, 1.16, 1.17 log.c, 1.13, 1.14 main.c, 1.12, 1.13 protect_db.c, 1.6, 1.7 proto-slap.h, 1.21, 1.22 slap.h, 1.15, 1.16 snmp_collator.c, 1.8, 1.9 ssl.c, 1.8, 1.9
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23608/ldap/servers/slapd
Modified Files:
auth.c ch_malloc.c config.c libglobs.c libslapd.def log.c
main.c protect_db.c proto-slap.h slap.h snmp_collator.c ssl.c
Log Message:
[208672] parameterizing the hardcoded paths (phase 2. db, log, lock, pid, cert, and instance dir)
1) introduced these 3 new config attributes:
nsslapd-lockdir, nsslapd-tmpdir, nsslapd-certdir,
and eliminated: nsslapd-instancedir.
2) replaced the hardcoded paths with the corresponding attribute value in the
server as well as in the create/remove instance codes.
3) moved snmp stats file to the nsslapd-tmpdir
4) moved the server instance dir to <prefix>/lib/<brand>-ds/slapd-<id>
Index: auth.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/auth.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- auth.c 27 Sep 2006 23:40:51 -0000 1.7
+++ auth.c 13 Oct 2006 01:06:28 -0000 1.8
@@ -271,7 +271,6 @@
void
client_auth_init ()
{
- char *instancedir;
int err;
if (client_auth_config_file == NULL) {
char *confdir = config_get_configdir();
Index: ch_malloc.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ch_malloc.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ch_malloc.c 19 Apr 2005 22:07:36 -0000 1.7
+++ ch_malloc.c 13 Oct 2006 01:06:28 -0000 1.8
@@ -624,11 +624,12 @@
{
if (!SymInitialized)
{
+ /* OBSOLETE: we don't have this directory structure any longer */
/*
* searchpath= <instancedir>\bin\slapd\server;<instancedir>\lib
*/
char *searchpath= NULL;
- char *id= config_get_instancedir();
+ /* char *id= config_get_instancedir(); eliminated */
if(id!=NULL)
{
char *p= id;
Index: config.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/config.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- config.c 27 Sep 2006 23:40:51 -0000 1.7
+++ config.c 13 Oct 2006 01:06:28 -0000 1.8
@@ -160,7 +160,6 @@
char *buf = 0;
char *lastp = 0;
char *entrystr = 0;
- char *instancedir = NULL;
if (NULL == configdir) {
slapi_log_error(SLAPI_LOG_FATAL,
@@ -261,29 +260,6 @@
entrystr, configfile, 0);
continue;
}
-
- /* if instancedir is not set, set it first */
- {
- instancedir = config_get_instancedir();
- if (NULL == instancedir) {
- workpath[0] = '\0';
- if (entry_has_attr_and_value(e,
- CONFIG_INSTANCEDIR_ATTRIBUTE,
- workpath, sizeof(workpath))) {
- if (config_set_instancedir(
- CONFIG_INSTANCEDIR_ATTRIBUTE,
- workpath, errorbuf, CONFIG_APPLY)
- != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n",
- configfile, CONFIG_INSTANCEDIR_ATTRIBUTE,
- errorbuf);
- }
- }
- } else {
- slapi_ch_free((void **)&instancedir);
- }
- }
-
/* increase file descriptors */
#if !defined(_WIN32) && !defined(AIX)
if (!maxdescriptors[0] &&
@@ -369,6 +345,19 @@
}
}
+ /* set the cert dir; needed in slapd_nss_init */
+ workpath[0] = '\0';
+ if (entry_has_attr_and_value(e, CONFIG_CERTDIR_ATTRIBUTE,
+ workpath, sizeof(workpath)))
+ {
+ if (config_set_certdir(CONFIG_CERTDIR_ATTRIBUTE,
+ workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
+ {
+ LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+ CONFIG_CERTDIR_ATTRIBUTE, errorbuf);
+ }
+ }
+
/* see if the entry is a child of the plugin base dn */
if (slapi_sdn_isparent(&plug_dn,
slapi_entry_get_sdn_const(e)))
@@ -390,6 +379,7 @@
}
}
}
+
/* see if the entry is a grand child of the plugin base dn */
if (slapi_sdn_isgrandparent(&plug_dn,
slapi_entry_get_sdn_const(e)))
@@ -517,19 +507,6 @@
if (e)
slapi_entry_free(e);
}
-
- /*
- * check if the instance dir is set.
- */
- if ( NULL == ( instancedir = config_get_instancedir() )) {
- slapi_log_error(SLAPI_LOG_FATAL, "startup",
- "Instance directory is not specifiled in the file %s. It is mandatory.\n",
- configfile);
- exit (1);
- } else {
- slapi_ch_free((void **)&instancedir);
- }
-
/* kexcoff: initialize rootpwstoragescheme and pw_storagescheme
* if not explicilty set in the config file
*/
Index: libglobs.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- libglobs.c 27 Sep 2006 23:40:51 -0000 1.10
+++ libglobs.c 13 Oct 2006 01:06:28 -0000 1.11
@@ -513,16 +513,22 @@
CONFIG_CONSTANT_STRING, NULL},
{CONFIG_HASH_FILTERS_ATTRIBUTE, config_set_hash_filters,
NULL, 0, NULL, CONFIG_ON_OFF, (ConfigGetFunc)config_get_hash_filters},
- {CONFIG_INSTANCEDIR_ATTRIBUTE, config_set_instancedir,
- NULL, 0,
- (void**)&global_slapdFrontendConfig.instancedir, CONFIG_STRING, NULL},
/* parameterizing schema dir */
{CONFIG_SCHEMADIR_ATTRIBUTE, config_set_schemadir,
NULL, 0,
(void**)&global_slapdFrontendConfig.schemadir, CONFIG_STRING, NULL},
- /* parameterizing ldif dir */
- {CONFIG_LDIFDIR_ATTRIBUTE, config_set_ldifdir,
- NULL, 0, NULL, CONFIG_STRING, NULL},
+ /* parameterizing lock dir */
+ {CONFIG_LOCKDIR_ATTRIBUTE, config_set_lockdir,
+ NULL, 0,
+ (void**)&global_slapdFrontendConfig.lockdir, CONFIG_STRING, config_get_lockdir},
+ /* parameterizing tmp dir */
+ {CONFIG_TMPDIR_ATTRIBUTE, config_set_tmpdir,
+ NULL, 0,
+ (void**)&global_slapdFrontendConfig.tmpdir, CONFIG_STRING, config_get_tmpdir},
+ /* parameterizing cert dir */
+ {CONFIG_CERTDIR_ATTRIBUTE, config_set_certdir,
+ NULL, 0,
+ (void**)&global_slapdFrontendConfig.certdir, CONFIG_STRING, config_get_certdir},
{CONFIG_REWRITE_RFC1274_ATTRIBUTE, config_set_rewrite_rfc1274,
NULL, 0,
(void**)&global_slapdFrontendConfig.rewrite_rfc1274, CONFIG_ON_OFF, NULL},
@@ -2325,44 +2331,6 @@
return retVal;
}
-int
-config_set_instancedir( const char *attrname, char *value, char *errorbuf, int apply ) {
- int retVal = LDAP_SUCCESS;
- slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
-
- if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
- return LDAP_OPERATIONS_ERROR;
- }
-
- if ( PR_Access ( value, PR_ACCESS_READ_OK ) != 0 ) {
- PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Directory \"%s\" is not accessible.", value );
- retVal = LDAP_OPERATIONS_ERROR;
- return retVal;
- }
-
- if ( apply) {
- CFG_LOCK_WRITE(slapdFrontendConfig);
- slapdFrontendConfig->instancedir = slapi_ch_strdup ( value );
-#ifdef _WIN32
- dostounixpath(slapdFrontendConfig->instancedir);
-#endif /* _WIN32 */
- CFG_UNLOCK_WRITE(slapdFrontendConfig);
-
- /* Set the slapd type also */
- config_set_slapd_type ();
-
- /* Set the configdir if not set (it must be set since 7.2) */
- if (!slapdFrontendConfig->configdir)
- {
- char newdir[MAXPATHLEN+1];
- PR_snprintf ( newdir, sizeof(newdir), "%s/%s",
- slapdFrontendConfig->instancedir, CONFIG_SUBDIR_NAME);
- retVal = config_set_configdir(attrname, newdir, errorbuf, apply);
- }
- }
- return retVal;
-}
-
/* alias of encryption key and certificate files is now retrieved through */
/* calls to psetFullCreate() and psetGetAttrSingleValue(). See ssl.c, */
/* where this function is still used to set the global variable */
@@ -3715,19 +3683,6 @@
}
#endif /* _WIN32 */
-
-char *
-config_get_instancedir() {
- slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
- char *retVal;
-
- CFG_LOCK_READ(slapdFrontendConfig);
- retVal = config_copy_strval( slapdFrontendConfig->instancedir );
- CFG_UNLOCK_READ(slapdFrontendConfig);
-
- return retVal;
-}
-
/* alias of encryption key and certificate files is now retrieved through */
/* calls to psetFullCreate() and psetGetAttrSingleValue(). See ssl.c, */
/* where this function is still used to set the global variable */
@@ -4067,27 +4022,6 @@
return ( SLAPD_FULL );
}
-/* This function is called once at the startup time and no more */
-void
-config_set_slapd_type( )
-{
- char *root = NULL;
- char *s_root = NULL;
- slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
-
- CFG_LOCK_WRITE(slapdFrontendConfig);
- if ( slapdFrontendConfig->instancedir )
- s_root = root = slapi_ch_strdup ( slapdFrontendConfig->instancedir );
-
- if ( (root = strrchr( root, '/' )) != NULL ) {
- *root = '\0';
- }
- slapdFrontendConfig->slapd_type = 0;
- slapdFrontendConfig->versionstring = SLAPD_VERSION_STR;
- CFG_UNLOCK_WRITE(slapdFrontendConfig);
- slapi_ch_free ( (void **) &s_root );
-}
-
int
config_set_maxbersize( const char *attrname, char *value, char *errorbuf, int apply )
{
@@ -4263,11 +4197,112 @@
return retVal;
}
+char *
+config_get_lockdir()
+{
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+ char *retVal;
+
+ CFG_LOCK_READ(slapdFrontendConfig);
+ retVal = config_copy_strval(slapdFrontendConfig->lockdir);
+ CFG_UNLOCK_READ(slapdFrontendConfig);
+
+ return retVal;
+}
+
int
-config_set_ldifdir(const char *attrname, char *value, char *errorbuf, int apply)
+config_set_lockdir(const char *attrname, char *value, char *errorbuf, int apply)
{
- /* noop */
- return LDAP_SUCCESS;
+ int retVal = LDAP_SUCCESS;
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+
+ if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
+ return LDAP_OPERATIONS_ERROR;
+ }
+
+ if (!apply) {
+ return retVal;
+ }
+
+ CFG_LOCK_WRITE(slapdFrontendConfig);
+ slapi_ch_free((void **)&slapdFrontendConfig->lockdir);
+
+ slapdFrontendConfig->lockdir = slapi_ch_strdup(value);
+
+ CFG_UNLOCK_WRITE(slapdFrontendConfig);
+ return retVal;
+}
+
+char *
+config_get_tmpdir()
+{
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+ char *retVal;
+
+ CFG_LOCK_READ(slapdFrontendConfig);
+ retVal = config_copy_strval(slapdFrontendConfig->tmpdir);
+ CFG_UNLOCK_READ(slapdFrontendConfig);
+
+ return retVal;
+}
+
+int
+config_set_tmpdir(const char *attrname, char *value, char *errorbuf, int apply)
+{
+ int retVal = LDAP_SUCCESS;
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+
+ if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
+ return LDAP_OPERATIONS_ERROR;
+ }
+
+ if (!apply) {
+ return retVal;
+ }
+
+ CFG_LOCK_WRITE(slapdFrontendConfig);
+ slapi_ch_free((void **)&slapdFrontendConfig->tmpdir);
+
+ slapdFrontendConfig->tmpdir = slapi_ch_strdup(value);
+
+ CFG_UNLOCK_WRITE(slapdFrontendConfig);
+ return retVal;
+}
+
+char *
+config_get_certdir()
+{
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+ char *retVal;
+
+ CFG_LOCK_READ(slapdFrontendConfig);
+ retVal = config_copy_strval(slapdFrontendConfig->certdir);
+ CFG_UNLOCK_READ(slapdFrontendConfig);
+
+ return retVal;
+}
+
+int
+config_set_certdir(const char *attrname, char *value, char *errorbuf, int apply)
+{
+ int retVal = LDAP_SUCCESS;
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+
+ if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
+ return LDAP_OPERATIONS_ERROR;
+ }
+
+ if (!apply) {
+ return retVal;
+ }
+
+ CFG_LOCK_WRITE(slapdFrontendConfig);
+ slapi_ch_free((void **)&slapdFrontendConfig->certdir);
+
+ slapdFrontendConfig->certdir = slapi_ch_strdup(value);
+
+ CFG_UNLOCK_WRITE(slapdFrontendConfig);
+ return retVal;
}
char **
Index: libslapd.def
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libslapd.def,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- libslapd.def 19 Mar 2006 21:21:22 -0000 1.16
+++ libslapd.def 13 Oct 2006 01:06:28 -0000 1.17
@@ -473,7 +473,7 @@
slapi_build_control @437
slapi_entry_get_ndn @438
dse_unset_dont_ever_write_dse_files @439
- config_set_instancedir @440
+; config_set_instancedir @440
config_set_encryptionalias @441
config_set_threadnumber @442
config_set_maxthreadsperconn @443
@@ -537,7 +537,7 @@
slapi_entry_set_sdn @501
slapi_sdn_copy @502
config_set_basedn @503
- config_get_instancedir @504
+; config_get_instancedir @504
config_get_encryptionalias @505
config_get_threadnumber @506
config_get_maxthreadsperconn @507
@@ -570,7 +570,7 @@
attr_set_deletion_csn @534
slapi_mod_dump @535
config_is_slapd_lite @536
- config_set_slapd_type @537
+; config_set_slapd_type @537
config_get_versionstring @538
slapi_is_rootdse @539
slapi_find_matching_paren @540
Index: log.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- log.c 11 Apr 2006 02:14:44 -0000 1.13
+++ log.c 13 Oct 2006 01:06:28 -0000 1.14
@@ -225,7 +225,8 @@
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
#if defined( XP_WIN32 )
- char * instancedir = NULL;
+ /* char * instancedir = NULL; obsolete. */
+ /* To port to Windows, need to support FHS. */
#endif
ts_time_lock = PR_NewLock();
@@ -234,7 +235,7 @@
#if defined( XP_WIN32 )
pszServerName = slapi_ch_malloc( MAX_SERVICE_NAME );
- instancedir = config_get_instancedir();
+ /* instancedir = config_get_instancedir(); eliminated */
unixtodospath(instancedir);
if( !SlapdGetServerNameFromCmdline(pszServerName, instancedir, 1) )
{
@@ -1578,14 +1579,14 @@
PR_snprintf(buff, bufflen, "\t%s:%d (%s)\n\n",
fe_cfg->localhost,
fe_cfg->security ? fe_cfg->secureport : fe_cfg->port,
- fe_cfg->instancedir ? fe_cfg->instancedir : "");
+ fe_cfg->configdir ? fe_cfg->configdir : "");
}
else {
/* If fe_cfg->localhost is not set, ignore fe_cfg->port since
* it is the default and might be misleading.
*/
PR_snprintf(buff, bufflen, "\t<host>:<port> (%s)\n\n",
- fe_cfg->instancedir ? fe_cfg->instancedir : "");
+ fe_cfg->configdir ? fe_cfg->configdir : "");
}
LOG_WRITE_NOW(fp, buff, strlen(buff), 0);
slapi_ch_free((void **)&buildnum);
Index: main.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- main.c 27 Sep 2006 23:40:51 -0000 1.12
+++ main.c 13 Oct 2006 01:06:28 -0000 1.13
@@ -274,13 +274,7 @@
else {
return;
}
-
- /* The instance directory needs to be owned by the local user */
- if (slapdFrontendConfig->instancedir) {
- slapd_chown_if_not_owner(slapdFrontendConfig->instancedir,
- pw->pw_uid, -1);
- }
- /* config directory */
+ /* config directory needs to be owned by the local user */
if (slapdFrontendConfig->configdir) {
chown_dir_files(slapdFrontendConfig->configdir, pw, PR_FALSE);
}
@@ -698,8 +692,7 @@
process_command_line(argc,argv,myname,&extraname);
- if (!slapdFrontendConfig->instancedir &&
- !slapdFrontendConfig->configdir) {
+ if (NULL == slapdFrontendConfig->configdir) {
usage( myname, extraname );
exit( 1 );
}
Index: protect_db.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/protect_db.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- protect_db.c 19 Apr 2005 22:07:36 -0000 1.6
+++ protect_db.c 13 Oct 2006 01:06:28 -0000 1.7
@@ -44,7 +44,6 @@
#ifndef _WIN32
-#define LOCK_DIR "locks"
#define LOCK_FILE "lock"
#define IMPORT_DIR "imports"
#define EXPORT_DIR "exports"
@@ -87,8 +86,8 @@
gets called by an atexit function, and NSPR is long gone by then. */
/* Get the name of the lockfile */
- snprintf(lockfile, sizeof(lockfile), "%s/%s", slapdFrontendConfig->instancedir, LOCK_FILE);
- lockfile[sizeof(lockfile)-1] = (char)0;
+ snprintf(lockfile, sizeof(lockfile), "%s/%s", slapdFrontendConfig->lockdir, LOCK_FILE);
+ lockfile[sizeof(lockfile)-1] = (char)0;
/* Get our pid */
pid = getpid();
@@ -96,7 +95,7 @@
if ((fd = open(lockfile, O_RDWR | O_CREAT | O_EXCL, 0664)) != -1) {
/* We got the lock, write our pid to the file */
write(fd, (void *) &pid, sizeof(pid_t));
- close(fd);
+ close(fd);
return 0;
}
@@ -109,13 +108,13 @@
while(1) {
/* Try to grab the lockfile NUM_TRIES times waiting WAIT_TIME milliseconds after each try */
- t.tv_sec = 0;
- t.tv_usec = WAIT_TIME * 1000;
+ t.tv_sec = 0;
+ t.tv_usec = WAIT_TIME * 1000;
for(x = 0; x < NUM_TRIES; x++) {
if ((fd = open(lockfile, O_RDWR | O_CREAT | O_EXCL)) != -1) {
/* Got the lock */
write(fd, (void *) &pid, sizeof(pid_t));
- close(fd);
+ close(fd);
return 0;
}
select(0, NULL, NULL, NULL, &t);
@@ -123,7 +122,7 @@
/* We still haven't got the lockfile. Find out who owns it and see if they are still up */
if ((fd = open(lockfile, O_RDONLY)) != -1) {
- size_t nb_bytes=0;
+ size_t nb_bytes=0;
nb_bytes = read(fd, (void *) &owning_pid, sizeof(pid_t));
if ( (nb_bytes != (size_t)(sizeof(pid_t)) ) || (owning_pid == 0) || (kill(owning_pid, 0) != 0 && errno == ESRCH) ) {
@@ -158,8 +157,8 @@
/* This function assumes that the caller owns the lock, it doesn't check to make sure! */
- snprintf(lockfile, sizeof(lockfile), "%s/%s", slapdFrontendConfig->instancedir, LOCK_FILE);
- lockfile[sizeof(lockfile)-1] = (char)0;
+ snprintf(lockfile, sizeof(lockfile), "%s/%s", slapdFrontendConfig->lockdir, LOCK_FILE);
+ lockfile[sizeof(lockfile)-1] = (char)0;
unlink(lockfile);
}
@@ -171,9 +170,9 @@
is_process_up(pid_t pid)
{
if (kill(pid, 0) == -1 && errno == ESRCH) {
- return 0;
+ return 0;
} else {
- return 1;
+ return 1;
}
}
@@ -189,24 +188,24 @@
/* Make sure it exists */
if (PR_MkDir(dir, 0755) != PR_SUCCESS) {
- PRErrorCode prerr = PR_GetError();
- if (prerr != PR_FILE_EXISTS_ERROR) {
- LDAPDebug(LDAP_DEBUG_ANY, FILE_CREATE_ERROR, dir, prerr, slapd_pr_strerror(prerr));
- return 1;
- }
+ PRErrorCode prerr = PR_GetError();
+ if (prerr != PR_FILE_EXISTS_ERROR) {
+ LDAPDebug(LDAP_DEBUG_ANY, FILE_CREATE_ERROR, dir, prerr, slapd_pr_strerror(prerr));
+ return 1;
+ }
}
/* Make sure it's owned by the correct user */
if (slapdFrontendConfig->localuser != NULL) {
if ( (pw = getpwnam(slapdFrontendConfig->localuser)) == NULL ) {
- LDAPDebug(LDAP_DEBUG_ANY, GETPWNAM_WARNING, slapdFrontendConfig->localuser, errno, strerror(errno));
+ LDAPDebug(LDAP_DEBUG_ANY, GETPWNAM_WARNING, slapdFrontendConfig->localuser, errno, strerror(errno));
} else {
- if (chown(dir, pw->pw_uid, -1) == -1) {
- stat(dir, &stat_buffer);
- if (stat_buffer.st_uid != pw->pw_uid) {
- LDAPDebug(LDAP_DEBUG_ANY, CHOWN_WARNING, dir, 0, 0);
- }
- }
+ if (chown(dir, pw->pw_uid, -1) == -1) {
+ stat(dir, &stat_buffer);
+ if (stat_buffer.st_uid != pw->pw_uid) {
+ LDAPDebug(LDAP_DEBUG_ANY, CHOWN_WARNING, dir, 0, 0);
+ }
+ }
} /* else */
}
@@ -226,25 +225,25 @@
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
snprintf(file_name, sizeof(file_name), "%s/%d", dir_name, getpid());
- file_name[sizeof(file_name)-1] = (char)0;
+ file_name[sizeof(file_name)-1] = (char)0;
if ((prfd = PR_Open(file_name, PR_RDWR | PR_CREATE_FILE, 0666)) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, FILE_CREATE_WARNING, file_name, 0, 0);
- return;
+ LDAPDebug(LDAP_DEBUG_ANY, FILE_CREATE_WARNING, file_name, 0, 0);
+ return;
}
/* Make sure the owner is of the file is the user the server
* runs as. */
if (slapdFrontendConfig->localuser != NULL) {
if ( (pw = getpwnam(slapdFrontendConfig->localuser)) == NULL ) {
- LDAPDebug(LDAP_DEBUG_ANY, GETPWNAM_WARNING, slapdFrontendConfig->localuser, errno, strerror(errno));
+ LDAPDebug(LDAP_DEBUG_ANY, GETPWNAM_WARNING, slapdFrontendConfig->localuser, errno, strerror(errno));
} else {
- if (chown(file_name, pw->pw_uid, -1) == -1) {
- stat(file_name, &stat_buffer);
- if (stat_buffer.st_uid != pw->pw_uid) {
- LDAPDebug(LDAP_DEBUG_ANY, CHOWN_WARNING, file_name, 0, 0);
- }
- }
+ if (chown(file_name, pw->pw_uid, -1) == -1) {
+ stat(file_name, &stat_buffer);
+ if (stat_buffer.st_uid != pw->pw_uid) {
+ LDAPDebug(LDAP_DEBUG_ANY, CHOWN_WARNING, file_name, 0, 0);
+ }
+ }
} /* else */
}
PR_Close(prfd);
@@ -269,22 +268,22 @@
char file_name[MAXPATHLEN];
if ((dir = PR_OpenDir(dir_name)) == NULL) {
- return 0;
+ return 0;
}
while((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
- pid = (pid_t) strtol(entry->name, &endp, 0);
- if (*endp != '\0') {
- /* not quite sure what this file was, but we
- * didn't put it there */
- continue;
- }
- if (is_process_up(pid)) {
- result = (long) pid;
- } else {
- PR_snprintf(file_name, MAXPATHLEN, "%s/%s", dir_name, entry->name);
- PR_Delete(file_name);
- }
+ pid = (pid_t) strtol(entry->name, &endp, 0);
+ if (*endp != '\0') {
+ /* not quite sure what this file was, but we
+ * didn't put it there */
+ continue;
+ }
+ if (is_process_up(pid)) {
+ result = (long) pid;
+ } else {
+ PR_snprintf(file_name, MAXPATHLEN, "%s/%s", dir_name, entry->name);
+ PR_Delete(file_name);
+ }
}
PR_CloseDir(dir);
return result;
@@ -299,7 +298,6 @@
{
/* since this is called from an atexit function, we can't use
* NSPR. */
-
DIR *dir;
struct dirent *entry;
pid_t pid;
@@ -311,30 +309,30 @@
our_pid = getpid();
if ((dir = opendir(dir_name)) == NULL) {
- return;
+ return;
}
while((entry = readdir(dir)) != NULL) {
-
- /* skip dot and dot-dot */
- if (strcmp(entry->d_name, ".") == 0 ||
- strcmp(entry->d_name, "..") == 0)
- continue;
-
- pid = (pid_t) strtol(entry->d_name, &endp, 0);
- if (*endp != '\0') {
- /* not quite sure what this file was, but we
- * didn't put it there */
- continue;
- }
- if (!is_process_up(pid) || pid == our_pid) {
- PR_snprintf(file_name, MAXPATHLEN, "%s/%s", dir_name, entry->d_name);
- unlink(file_name);
- }
+
+ /* skip dot and dot-dot */
+ if (strcmp(entry->d_name, ".") == 0 ||
+ strcmp(entry->d_name, "..") == 0)
+ continue;
+
+ pid = (pid_t) strtol(entry->d_name, &endp, 0);
+ if (*endp != '\0') {
+ /* not quite sure what this file was, but we
+ * didn't put it there */
+ continue;
+ }
+ if (!is_process_up(pid) || pid == our_pid) {
+ PR_snprintf(file_name, sizeof(file_name), "%s/%s", dir_name, entry->d_name);
+ unlink(file_name);
+ }
}
closedir(dir);
}
-
+
/* Walks through all the pid directories and clears any stale
@@ -343,31 +341,26 @@
void
remove_slapd_process()
{
- char lock_dir[MAXPATHLEN];
char import_dir[MAXPATHLEN];
char export_dir[MAXPATHLEN];
char server_dir[MAXPATHLEN];
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
-
/* Create the name of the directories that hold the pids of the currently running
* ns-slapd processes */
- snprintf(lock_dir, sizeof(lock_dir), "%s/%s", slapdFrontendConfig->instancedir, LOCK_DIR);
- lock_dir[sizeof(lock_dir)-1] = (char)0;
- snprintf(import_dir, sizeof(import_dir), "%s/%s/%s", slapdFrontendConfig->instancedir, LOCK_DIR, IMPORT_DIR);
- import_dir[sizeof(import_dir)-1] = (char)0;
- snprintf(export_dir, sizeof(export_dir), "%s/%s/%s", slapdFrontendConfig->instancedir, LOCK_DIR, EXPORT_DIR);
- export_dir[sizeof(export_dir)-1] = (char)0;
- snprintf(server_dir, sizeof(server_dir), "%s/%s/%s", slapdFrontendConfig->instancedir, LOCK_DIR, SERVER_DIR);
- server_dir[sizeof(server_dir)-1] = (char)0;
+ snprintf(import_dir, sizeof(import_dir), "%s/%s", slapdFrontendConfig->lockdir, IMPORT_DIR);
+ import_dir[sizeof(import_dir)-1] = (char)0;
+ snprintf(export_dir, sizeof(export_dir), "%s/%s", slapdFrontendConfig->lockdir, EXPORT_DIR);
+ export_dir[sizeof(export_dir)-1] = (char)0;
+ snprintf(server_dir, sizeof(server_dir), "%s/%s", slapdFrontendConfig->lockdir, SERVER_DIR);
+ server_dir[sizeof(server_dir)-1] = (char)0;
/* Grab the lockfile */
if (grab_lockfile() != 0) {
- /* Unable to grab the lockfile */
- return;
+ /* Unable to grab the lockfile */
+ return;
}
-
remove_and_update(import_dir);
remove_and_update(export_dir);
remove_and_update(server_dir);
@@ -378,7 +371,6 @@
int
add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
{
- char lock_dir[MAXPATHLEN];
char import_dir[MAXPATHLEN];
char export_dir[MAXPATHLEN];
char server_dir[MAXPATHLEN];
@@ -387,33 +379,31 @@
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if (skip_flag) {
- return 0;
+ return 0;
}
/* Create the name of the directories that hold the pids of the currently running
* ns-slapd processes */
- snprintf(lock_dir, sizeof(lock_dir), "%s/%s", slapdFrontendConfig->instancedir, LOCK_DIR);
- lock_dir[sizeof(lock_dir)-1] = (char)0;
- snprintf(import_dir, sizeof(import_dir), "%s/%s/%s", slapdFrontendConfig->instancedir, LOCK_DIR, IMPORT_DIR);
- import_dir[sizeof(import_dir)-1] = (char)0;
- snprintf(export_dir, sizeof(export_dir), "%s/%s/%s", slapdFrontendConfig->instancedir, LOCK_DIR, EXPORT_DIR);
- export_dir[sizeof(export_dir)-1] = (char)0;
- snprintf(server_dir, sizeof(server_dir), "%s/%s/%s", slapdFrontendConfig->instancedir, LOCK_DIR, SERVER_DIR);
- server_dir[sizeof(server_dir)-1] = (char)0;
+ snprintf(import_dir, sizeof(import_dir), "%s/%s", slapdFrontendConfig->lockdir, IMPORT_DIR);
+ import_dir[sizeof(import_dir)-1] = (char)0;
+ snprintf(export_dir, sizeof(export_dir), "%s/%s", slapdFrontendConfig->lockdir, EXPORT_DIR);
+ export_dir[sizeof(export_dir)-1] = (char)0;
+ snprintf(server_dir, sizeof(server_dir), "%s/%s", slapdFrontendConfig->lockdir, SERVER_DIR);
+ server_dir[sizeof(server_dir)-1] = (char)0;
/* Grab the lockfile */
if (grab_lockfile() != 0) {
- /* Unable to grab the lockfile */
- return -1;
+ /* Unable to grab the lockfile */
+ return -1;
}
/* Make sure the directories exist */
- if (make_sure_dir_exists(lock_dir) != 0 ||
- make_sure_dir_exists(import_dir) != 0 ||
- make_sure_dir_exists(export_dir) != 0 ||
- make_sure_dir_exists(server_dir) != 0) {
- release_lockfile();
- return -1;
+ if (make_sure_dir_exists(slapdFrontendConfig->lockdir) != 0 ||
+ make_sure_dir_exists(import_dir) != 0 ||
+ make_sure_dir_exists(export_dir) != 0 ||
+ make_sure_dir_exists(server_dir) != 0) {
+ release_lockfile();
+ return -1;
}
/* Go through the directories and find out what's going on.
@@ -424,62 +414,62 @@
switch (exec_mode) {
case SLAPD_EXEMODE_SLAPD:
- if (running) {
- result = -1;
- LDAPDebug(LDAP_DEBUG_ANY, NO_SERVER_DUE_TO_SERVER, running, 0, 0);
- } else if (importing) {
- result = -1;
- LDAPDebug(LDAP_DEBUG_ANY, NO_SERVER_DUE_TO_IMPORT, importing, 0, 0);
- } else {
- add_this_process_to(server_dir);
- result = 0;
- }
- break;
+ if (running) {
+ result = -1;
+ LDAPDebug(LDAP_DEBUG_ANY, NO_SERVER_DUE_TO_SERVER, running, 0, 0);
+ } else if (importing) {
+ result = -1;
+ LDAPDebug(LDAP_DEBUG_ANY, NO_SERVER_DUE_TO_IMPORT, importing, 0, 0);
+ } else {
+ add_this_process_to(server_dir);
+ result = 0;
+ }
+ break;
case SLAPD_EXEMODE_DB2LDIF:
- if (r_flag) {
- /* When the -r flag is used in db2ldif we need to make sure
- * we get a consistent snapshot of the server. As a result
- * it needs to run by itself, so no other slapd process can
- * change the database while it is running. */
- if (running || importing) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DB2LDIFR_DUE_TO_USE, 0, 0, 0);
- result = -1;
- } else {
- /* Even though this is really going to export code, we will
- * but it in the importing dir so no other process can change
- * things while we are doing ldif2db with the -r flag. */
- add_this_process_to(import_dir);
- result = 0;
- }
- } else {
- if (importing) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DB2LDIF_DUE_TO_IMPORT, importing, 0, 0);
- result = -1;
- } else {
- add_this_process_to(export_dir);
- result = 0;
- }
- }
- break;
+ if (r_flag) {
+ /* When the -r flag is used in db2ldif we need to make sure
+ * we get a consistent snapshot of the server. As a result
+ * it needs to run by itself, so no other slapd process can
+ * change the database while it is running. */
+ if (running || importing) {
+ LDAPDebug(LDAP_DEBUG_ANY, NO_DB2LDIFR_DUE_TO_USE, 0, 0, 0);
+ result = -1;
+ } else {
+ /* Even though this is really going to export code, we will
+ * but it in the importing dir so no other process can change
+ * things while we are doing ldif2db with the -r flag. */
+ add_this_process_to(import_dir);
+ result = 0;
+ }
+ } else {
+ if (importing) {
+ LDAPDebug(LDAP_DEBUG_ANY, NO_DB2LDIF_DUE_TO_IMPORT, importing, 0, 0);
+ result = -1;
+ } else {
+ add_this_process_to(export_dir);
+ result = 0;
+ }
+ }
+ break;
case SLAPD_EXEMODE_DB2ARCHIVE:
- if (importing) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DB2BAK_DUE_TO_IMPORT, importing, 0, 0);
- result = -1;
- } else {
- add_this_process_to(export_dir);
- result = 0;
- }
- break;
+ if (importing) {
+ LDAPDebug(LDAP_DEBUG_ANY, NO_DB2BAK_DUE_TO_IMPORT, importing, 0, 0);
+ result = -1;
+ } else {
+ add_this_process_to(export_dir);
+ result = 0;
+ }
+ break;
case SLAPD_EXEMODE_ARCHIVE2DB:
case SLAPD_EXEMODE_LDIF2DB:
- if (running || importing || exporting) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_IMPORT_DUE_TO_USE, 0, 0, 0);
- result = -1;
- } else {
- add_this_process_to(import_dir);
- result = 0;
- }
- break;
+ if (running || importing || exporting) {
+ LDAPDebug(LDAP_DEBUG_ANY, NO_IMPORT_DUE_TO_USE, 0, 0, 0);
+ result = -1;
+ } else {
+ add_this_process_to(import_dir);
+ result = 0;
+ }
+ break;
case SLAPD_EXEMODE_DB2INDEX:
if (running || importing || exporting) {
LDAPDebug(LDAP_DEBUG_ANY, NO_DB2INDEX_DUE_TO_USE, 0, 0, 0);
@@ -514,7 +504,7 @@
release_lockfile();
if (result == 0) {
- atexit(remove_slapd_process);
+ atexit(remove_slapd_process);
}
return result;
@@ -525,31 +515,26 @@
/* is_slapd_running()
* returns 1 if slapd is running, 0 if not, -1 on error
*/
-
-
int
is_slapd_running() {
char server_dir[MAXPATHLEN];
- char lock_dir[MAXPATHLEN];
slapdFrontendConfig_t *cfg = getFrontendConfig();
int running = 0;
- snprintf(lock_dir, sizeof(lock_dir), "%s/%s", cfg->instancedir, LOCK_DIR);
- lock_dir[sizeof(lock_dir)-1] = (char)0;
- snprintf( server_dir, sizeof(server_dir), "%s/%s/%s", cfg->instancedir, LOCK_DIR, SERVER_DIR);
+ snprintf(server_dir, sizeof(server_dir), "%s/%s", cfg->lockdir, SERVER_DIR);
server_dir[sizeof(server_dir)-1] = (char)0;
/* Grab the lockfile */
if (grab_lockfile() != 0) {
- /* Unable to grab the lockfile */
- return -1;
+ /* Unable to grab the lockfile */
+ return -1;
}
/* Make sure the directories exist */
- if (make_sure_dir_exists(lock_dir) != 0 ||
- make_sure_dir_exists(server_dir) != 0) {
- release_lockfile();
- return -1;
+ if (make_sure_dir_exists(cfg->lockdir) != 0 ||
+ make_sure_dir_exists(server_dir) != 0) {
+ release_lockfile();
+ return -1;
}
running = sample_and_update(server_dir);
@@ -557,7 +542,6 @@
return running;
}
-
#else /* _WIN32 */
/* The NT version of this code */
@@ -568,11 +552,11 @@
int
mutex_exists( char *mutexName )
{
- if ( OpenMutex( SYNCHRONIZE, FALSE, mutexName ) == NULL ) {
- return( 0 );
- } else {
- return( 1 );
- }
+ if ( OpenMutex( SYNCHRONIZE, FALSE, mutexName ) == NULL ) {
+ return( 0 );
+ } else {
+ return( 1 );
+ }
}
/* is_slapd_running():
@@ -586,28 +570,28 @@
int result = 0;
slapdFrontendConfig_t *cfg = getFrontendConfig();
- strncpy( mutexName, cfg->instancedir, MAXPATHLEN );
- strncpy( serverMutexName, cfg->instancedir, MAXPATHLEN );
+ strncpy( mutexName, cfg->lockdir, MAXPATHLEN );
+ strncpy( serverMutexName, cfg->lockdir, MAXPATHLEN );
mutexName[ MAXPATHLEN ] = '\0';
serverMutexName[ MAXPATHLEN ] = '\0';
strcat( serverMutexName, "/server" );
-
+
return mutex_exists ( serverMutexName );
}
static void fix_mutex_name(char *name)
{
- /* On NT mutex names cannot contain the '\' character.
- * This functions replaces '\' with '/' in the supplied
- * name. */
- int x;
-
- for (x = 0; name[x] != '\0'; x++) {
- if ('\\' == name[x]) {
- name[x] = '/';
- }
- }
+ /* On NT mutex names cannot contain the '\' character.
+ * This functions replaces '\' with '/' in the supplied
+ * name. */
+ int x;
+
+ for (x = 0; name[x] != '\0'; x++) {
+ if ('\\' == name[x]) {
+ name[x] = '/';
+ }
+ }
}
/*
@@ -624,9 +608,9 @@
void
remove_slapd_process()
{
- if (open_mutex) {
- CloseHandle(open_mutex);
- }
+ if (open_mutex) {
+ CloseHandle(open_mutex);
+ }
}
/* This function makes sure different instances of slapd don't
@@ -646,158 +630,158 @@
int
add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
{
- char mutexName[ MAXPATHLEN + 1 ];
- char serverMutexName[ MAXPATHLEN + 1 ];
- char importMutexName[ MAXPATHLEN + 1 ];
- char exportMutexName[ MAXPATHLEN + 1 ];
-
- HANDLE mutex;
- SECURITY_ATTRIBUTES mutexAttributes;
- PSECURITY_DESCRIPTOR pSD;
- LPVOID lpMsgBuf;
-
- int result = 0;
-
- slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
-
- if (skip_flag) {
- return 0;
- }
-
- /* Create the names for the mutexes */
- PL_strncpyz(mutexName, slapdFrontendConfig->instancedir, sizeof(mutexName));
-
- /* Make sure the name of the mutex is legal. */
- fix_mutex_name(mutexName);
-
- PR_snprintf(serverMutexName, sizeof(serverMutexName), "%s/server", mutexName);
- PR_snprintf(importMutexName, sizeof(importMutexName), "%s/import", mutexName);
- PR_snprintf(exportMutexName, sizeof(exportMutexName), "%s/export", mutexName);
-
- /* Fill in the security crap for the mutex */
- pSD = (PSECURITY_DESCRIPTOR)slapi_ch_malloc( sizeof( SECURITY_DESCRIPTOR ) );
- InitializeSecurityDescriptor( pSD, SECURITY_DESCRIPTOR_REVISION );
- SetSecurityDescriptorDacl( pSD, TRUE, NULL, FALSE );
- mutexAttributes.nLength = sizeof( mutexAttributes );
- mutexAttributes.lpSecurityDescriptor = pSD;
- mutexAttributes.bInheritHandle = FALSE;
-
- /* Get a handle to the main mutex */
- if ( ( mutex = CreateMutex( &mutexAttributes, FALSE, mutexName ) ) == NULL ) {
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */
- (LPTSTR) &lpMsgBuf,
- 0,
- NULL
- );
-
- LDAPDebug( LDAP_DEBUG_ANY, CREATE_MUTEX_ERROR, lpMsgBuf, 0, 0 );
- LocalFree( lpMsgBuf );
- exit( 1 );
- }
-
- /* Lock the main mutex */
- if ( WaitForSingleObject( mutex, INFINITE ) == WAIT_FAILED ) {
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */
- (LPTSTR) &lpMsgBuf,
- 0,
- NULL
- );
-
- LDAPDebug( LDAP_DEBUG_ANY, WAIT_ERROR, lpMsgBuf, 0, 0 );
- LocalFree( lpMsgBuf );
- exit( 1 );
- }
-
-
- switch (exec_mode) {
- case SLAPD_EXEMODE_SLAPD:
- if ( mutex_exists( serverMutexName ) ||
- mutex_exists( importMutexName ) ) {
- LDAPDebug( LDAP_DEBUG_ANY, NO_SERVER_DUE_TO_USE, 0, 0, 0);
- result = -1;
- } else {
- open_mutex = CreateMutex( &mutexAttributes, FALSE, serverMutexName );
- result = 0;
- }
- break;
- case SLAPD_EXEMODE_DB2LDIF:
- if (r_flag) {
- /* When the -r flag is used in db2ldif we need to make sure
- * we get a consistent snapshot of the server. As a result
- * it needs to run by itself, so no other slapd process can
- * change the database while it is running. */
- if ( mutex_exists( serverMutexName ) ||
- mutex_exists( importMutexName ) ||
- mutex_exists( exportMutexName ) ) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DB2LDIFR_DUE_TO_USE, 0, 0, 0);
- result = -1;
- } else {
- CreateMutex( &mutexAttributes, FALSE, exportMutexName );
- result = 0;
- }
- break;
- }
- case SLAPD_EXEMODE_DB2ARCHIVE:
- if ( mutex_exists( importMutexName ) ) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_EXPORT_DUE_TO_IMPORT, 0, 0, 0);
- result = -1;
- } else {
- CreateMutex( &mutexAttributes, FALSE, exportMutexName );
- result = 0;
- }
- break;
- case SLAPD_EXEMODE_ARCHIVE2DB:
- case SLAPD_EXEMODE_LDIF2DB:
- if ( mutex_exists( serverMutexName ) ||
- mutex_exists( importMutexName ) ||
- mutex_exists( exportMutexName ) ) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_IMPORT_DUE_TO_USE, 0, 0, 0);
- result = -1;
- } else {
- CreateMutex( &mutexAttributes, FALSE, importMutexName );
- result = 0;
- }
- break;
+ char mutexName[ MAXPATHLEN + 1 ];
+ char serverMutexName[ MAXPATHLEN + 1 ];
+ char importMutexName[ MAXPATHLEN + 1 ];
+ char exportMutexName[ MAXPATHLEN + 1 ];
+
+ HANDLE mutex;
+ SECURITY_ATTRIBUTES mutexAttributes;
+ PSECURITY_DESCRIPTOR pSD;
+ LPVOID lpMsgBuf;
+
+ int result = 0;
+
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+
+ if (skip_flag) {
+ return 0;
+ }
+
+ /* Create the names for the mutexes */
+ PL_strncpyz(mutexName, slapdFrontendConfig->lockdir, sizeof(mutexName));
+
+ /* Make sure the name of the mutex is legal. */
+ fix_mutex_name(mutexName);
+
+ PR_snprintf(serverMutexName, sizeof(serverMutexName), "%s/server", mutexName);
+ PR_snprintf(importMutexName, sizeof(importMutexName), "%s/import", mutexName);
+ PR_snprintf(exportMutexName, sizeof(exportMutexName), "%s/export", mutexName);
+
+ /* Fill in the security crap for the mutex */
+ pSD = (PSECURITY_DESCRIPTOR)slapi_ch_malloc( sizeof( SECURITY_DESCRIPTOR ) );
+ InitializeSecurityDescriptor( pSD, SECURITY_DESCRIPTOR_REVISION );
+ SetSecurityDescriptorDacl( pSD, TRUE, NULL, FALSE );
+ mutexAttributes.nLength = sizeof( mutexAttributes );
+ mutexAttributes.lpSecurityDescriptor = pSD;
+ mutexAttributes.bInheritHandle = FALSE;
+
+ /* Get a handle to the main mutex */
+ if ( ( mutex = CreateMutex( &mutexAttributes, FALSE, mutexName ) ) == NULL ) {
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */
+ (LPTSTR) &lpMsgBuf,
+ 0,
+ NULL
+ );
+
+ LDAPDebug( LDAP_DEBUG_ANY, CREATE_MUTEX_ERROR, lpMsgBuf, 0, 0 );
+ LocalFree( lpMsgBuf );
+ exit( 1 );
+ }
+
+ /* Lock the main mutex */
+ if ( WaitForSingleObject( mutex, INFINITE ) == WAIT_FAILED ) {
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */
+ (LPTSTR) &lpMsgBuf,
+ 0,
+ NULL
+ );
+
+ LDAPDebug( LDAP_DEBUG_ANY, WAIT_ERROR, lpMsgBuf, 0, 0 );
+ LocalFree( lpMsgBuf );
+ exit( 1 );
+ }
+
+
+ switch (exec_mode) {
+ case SLAPD_EXEMODE_SLAPD:
+ if ( mutex_exists( serverMutexName ) ||
+ mutex_exists( importMutexName ) ) {
+ LDAPDebug( LDAP_DEBUG_ANY, NO_SERVER_DUE_TO_USE, 0, 0, 0);
+ result = -1;
+ } else {
+ open_mutex = CreateMutex( &mutexAttributes, FALSE, serverMutexName );
+ result = 0;
+ }
+ break;
+ case SLAPD_EXEMODE_DB2LDIF:
+ if (r_flag) {
+ /* When the -r flag is used in db2ldif we need to make sure
+ * we get a consistent snapshot of the server. As a result
+ * it needs to run by itself, so no other slapd process can
+ * change the database while it is running. */
+ if ( mutex_exists( serverMutexName ) ||
+ mutex_exists( importMutexName ) ||
+ mutex_exists( exportMutexName ) ) {
+ LDAPDebug(LDAP_DEBUG_ANY, NO_DB2LDIFR_DUE_TO_USE, 0, 0, 0);
+ result = -1;
+ } else {
+ CreateMutex( &mutexAttributes, FALSE, exportMutexName );
+ result = 0;
+ }
+ break;
+ }
+ case SLAPD_EXEMODE_DB2ARCHIVE:
+ if ( mutex_exists( importMutexName ) ) {
+ LDAPDebug(LDAP_DEBUG_ANY, NO_EXPORT_DUE_TO_IMPORT, 0, 0, 0);
+ result = -1;
+ } else {
+ CreateMutex( &mutexAttributes, FALSE, exportMutexName );
+ result = 0;
+ }
+ break;
+ case SLAPD_EXEMODE_ARCHIVE2DB:
+ case SLAPD_EXEMODE_LDIF2DB:
+ if ( mutex_exists( serverMutexName ) ||
+ mutex_exists( importMutexName ) ||
+ mutex_exists( exportMutexName ) ) {
+ LDAPDebug(LDAP_DEBUG_ANY, NO_IMPORT_DUE_TO_USE, 0, 0, 0);
+ result = -1;
+ } else {
+ CreateMutex( &mutexAttributes, FALSE, importMutexName );
+ result = 0;
+ }
+ break;
#if defined(UPGRADEDB)
- case SLAPD_EXEMODE_UPGRADEDB:
- if ( mutex_exists( serverMutexName ) ||
- mutex_exists( importMutexName ) ||
- mutex_exists( exportMutexName ) ) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_UPGRADEDB_DUE_TO_USE, 0, 0, 0);
- result = -1;
- } else {
- CreateMutex( &mutexAttributes, FALSE, importMutexName );
- result = 0;
- }
- break;
+ case SLAPD_EXEMODE_UPGRADEDB:
+ if ( mutex_exists( serverMutexName ) ||
+ mutex_exists( importMutexName ) ||
+ mutex_exists( exportMutexName ) ) {
+ LDAPDebug(LDAP_DEBUG_ANY, NO_UPGRADEDB_DUE_TO_USE, 0, 0, 0);
+ result = -1;
+ } else {
+ CreateMutex( &mutexAttributes, FALSE, importMutexName );
+ result = 0;
+ }
+ break;
#endif
- case SLAPD_EXEMODE_DBTEST:
- if ( mutex_exists( serverMutexName ) ||
- mutex_exists( importMutexName ) ||
- mutex_exists( exportMutexName ) ) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DBTEST_DUE_TO_USE, 0, 0, 0);
- result = -1;
- } else {
- CreateMutex( &mutexAttributes, FALSE, importMutexName );
- result = 0;
- }
- break;
- }
-
- /* release the main mutex */
- ReleaseMutex( mutex );
+ case SLAPD_EXEMODE_DBTEST:
+ if ( mutex_exists( serverMutexName ) ||
+ mutex_exists( importMutexName ) ||
+ mutex_exists( exportMutexName ) ) {
+ LDAPDebug(LDAP_DEBUG_ANY, NO_DBTEST_DUE_TO_USE, 0, 0, 0);
+ result = -1;
+ } else {
+ CreateMutex( &mutexAttributes, FALSE, importMutexName );
+ result = 0;
+ }
+ break;
+ }
+
+ /* release the main mutex */
+ ReleaseMutex( mutex );
- slapi_ch_free((void**)&pSD );
+ slapi_ch_free((void**)&pSD );
- return( result );
+ return( result );
}
#endif /* _WIN32 */
Index: proto-slap.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- proto-slap.h 27 Sep 2006 23:40:51 -0000 1.21
+++ proto-slap.h 13 Oct 2006 01:06:28 -0000 1.22
@@ -246,7 +246,6 @@
int config_set_rootpw( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_rootpwstoragescheme( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_workingdir( const char *attrname, char *value, char *errorbuf, int apply );
-int config_set_instancedir( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_encryptionalias( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_threadnumber( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_maxthreadsperconn( const char *attrname, char *value, char *errorbuf, int apply );
@@ -302,7 +301,9 @@
int config_set_basedn( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_configdir( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_schemadir( const char *attrname, char *value, char *errorbuf, int apply );
-int config_set_ldifdir( const char *attrname, char *value, char *errorbuf, int apply );
+int config_set_lockdir( const char *attrname, char *value, char *errorbuf, int apply );
+int config_set_tmpdir( const char *attrname, char *value, char *errorbuf, int apply );
+int config_set_certdir( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_attrname_exceptions( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_hash_filters( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_rewrite_rfc1274( const char *attrname, char *value, char *errorbuf, int apply );
@@ -366,7 +367,6 @@
char *config_get_localuser();
#endif /* _WIN32 */
char *config_get_workingdir();
-char *config_get_instancedir();
char *config_get_encryptionalias();
int config_get_threadnumber();
int config_get_maxthreadsperconn();
@@ -401,6 +401,9 @@
char *config_get_basedn();
char *config_get_configdir();
char *config_get_schemadir();
+char *config_get_lockdir();
+char *config_get_tmpdir();
+char *config_get_certdir();
char **config_get_errorlog_list();
char **config_get_accesslog_list();
char **config_get_auditlog_list();
@@ -966,7 +969,6 @@
struct snmp_vars_t * g_get_global_snmp_vars();
void FrontendConfig_init();
int g_get_slapd_security_on();
-void config_set_slapd_type ();
char *config_get_versionstring();
void libldap_init_debug_level(int *);
Index: slap.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- slap.h 27 Sep 2006 23:40:51 -0000 1.15
+++ slap.h 13 Oct 2006 01:06:28 -0000 1.16
@@ -1648,7 +1648,6 @@
#define CONFIG_SSL3CIPHERS_ATTRIBUTE "nsslapd-SSL3ciphers"
#define CONFIG_ACCESSLOG_ATTRIBUTE "nsslapd-accesslog"
#define CONFIG_ERRORLOG_ATTRIBUTE "nsslapd-errorlog"
-#define CONFIG_INSTANCEDIR_ATTRIBUTE "nsslapd-instancedir"
#define CONFIG_SECUREPORT_ATTRIBUTE "nsslapd-securePort"
#define CONFIG_SECURELISTENHOST_ATTRIBUTE "nsslapd-securelistenhost"
#define CONFIG_THREADNUMBER_ATTRIBUTE "nsslapd-threadnumber"
@@ -1709,7 +1708,9 @@
#define CONFIG_CONFIG_ATTRIBUTE "nsslapd-config"
#define CONFIG_SCHEMADIR_ATTRIBUTE "nsslapd-schemadir"
-#define CONFIG_LDIFDIR_ATTRIBUTE "nsslapd-ldifdir"
+#define CONFIG_LOCKDIR_ATTRIBUTE "nsslapd-lockdir"
+#define CONFIG_TMPDIR_ATTRIBUTE "nsslapd-tmpdir"
+#define CONFIG_CERTDIR_ATTRIBUTE "nsslapd-certdir"
#define CONFIG_SSLCLIENTAUTH_ATTRIBUTE "nsslapd-SSLclientAuth"
#define CONFIG_SSL_CHECK_HOSTNAME_ATTRIBUTE "nsslapd-ssl-check-hostname"
#define CONFIG_HASH_FILTERS_ATTRIBUTE "nsslapd-hash-filters"
@@ -1794,7 +1795,6 @@
char *encryptionalias;
char *errorlog;
char *listenhost;
- char *instancedir;
#ifndef _WIN32
char *localuser;
#endif /* _WIN32 */
@@ -1877,15 +1877,18 @@
ber_len_t maxbersize; /* Maximum BER element size we'll accept */
int max_filter_nest_level;/* deepest nested filter we will accept */
- int enquote_sup_oc; /* put single quotes around an oc's
- superior oc in cn=schema */
+ int enquote_sup_oc; /* put single quotes around an oc's
+ superior oc in cn=schema */
- char *certmap_basedn; /* Default Base DN for certmap */
+ char *certmap_basedn; /* Default Base DN for certmap */
char *workingdir; /* full path of directory before detach */
- char *configdir; /* full path name of directory containing configuration files */
- char *schemadir; /* full path name of directory containing schema files */
- int attrname_exceptions; /* if true, allow questionable attribute names */
+ char *configdir; /* full path name of directory containing configuration files */
+ char *schemadir; /* full path name of directory containing schema files */
+ char *lockdir; /* full path name of directory containing lock files */
+ char *tmpdir; /* full path name of directory containing tmp files */
+ char *certdir; /* full path name of directory containing cert files */
+ int attrname_exceptions; /* if true, allow questionable attribute names */
int rewrite_rfc1274; /* return attrs for both v2 and v3 names */
char *schemareplace; /* see CONFIG_SCHEMAREPLACE_* #defines below */
} slapdFrontendConfig_t;
Index: snmp_collator.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- snmp_collator.c 19 Apr 2005 22:07:37 -0000 1.8
+++ snmp_collator.c 13 Oct 2006 01:06:28 -0000 1.9
@@ -392,54 +392,50 @@
{
int err;
- char *instancedir = config_get_instancedir();
+ char *statspath = config_get_tmpdir();
+ char *lp = NULL;
- /*
- * Get directory for our stats file
- */
+ /*
+ * Get directory for our stats file
+ */
+ if (NULL == statspath) {
+ statspath = slapi_ch_strdup("/tmp");
+ }
- PR_snprintf(szStatsFile, sizeof(szStatsFile), "%s/logs/%s", instancedir,
- AGT_STATS_FILE);
+ PR_snprintf(szStatsFile, sizeof(szStatsFile), "%s/%s",
+ statspath, AGT_STATS_FILE);
tmpstatsfile = szStatsFile;
+ slapi_ch_free((void **) &statspath);
- slapi_ch_free((void **) &instancedir);
-
-
- /* open the memory map */
-
- if ((err = agt_mopen_stats(tmpstatsfile, O_RDWR, &hdl) != 0))
- {
- if (err != EEXIST) /* Ignore if file already exists */
- {
- printf("Failed to open stats file (%s) (error %d).\n",
- AGT_STATS_FILE, err);
-
- exit(1);
- }
- }
+ /* open the memory map */
+ if ((err = agt_mopen_stats(tmpstatsfile, O_RDWR, &hdl) != 0))
+ {
+ if (err != EEXIST) /* Ignore if file already exists */
+ {
+ printf("Failed to open stats file (%s) (error %d).\n",
+ szStatsFile, err);
+ exit(1);
+ }
+ }
/* read config entry for entity table data */
-
/* point stats struct at mmap data */
- stats = (struct agt_stats_t *) mmap_tbl [hdl].fp;
+ stats = (struct agt_stats_t *) mmap_tbl [hdl].fp;
/* initialize stats data */
- snmp_collator_init();
+ snmp_collator_init();
/*
-* now that memmap is open and things point the right way
-* an atomic set or increment anywhere in slapd should set
-* the snmp memmap vars correctly and be able to be polled by snmp
+* now that memmap is open and things point the right way
+* an atomic set or increment anywhere in slapd should set
+* the snmp memmap vars correctly and be able to be polled by snmp
*/
- /* Arrange to be called back periodically */
- snmp_eq_ctx = slapi_eq_repeat(snmp_collator_update, NULL, (time_t)0,
- SLAPD_SNMP_UPDATE_INTERVAL);
-
-
-return 0;
-
+ /* Arrange to be called back periodically */
+ snmp_eq_ctx = slapi_eq_repeat(snmp_collator_update, NULL, (time_t)0,
+ SLAPD_SNMP_UPDATE_INTERVAL);
+ return 0;
}
Index: ssl.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ssl.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ssl.c 19 Apr 2005 22:07:37 -0000 1.8
+++ ssl.c 13 Oct 2006 01:06:28 -0000 1.9
@@ -51,10 +51,7 @@
#include <io.h>
#endif
-#ifdef LINUX
#include <sys/param.h>
-#endif
-
#include <ssl.h>
#include <nss.h>
#include <key.h>
@@ -456,7 +453,7 @@
int len = 0;
PRUint32 nssFlags = 0;
Slapi_Entry *ec = NULL;
- char *instancedir;
+ char *certdir;
if (config_available) {
getConfigEntry( configDN, &ec );
@@ -469,9 +466,11 @@
ec = NULL;
}
- instancedir = config_get_instancedir();
- PL_strncpyz(path, instancedir, sizeof(path));
- slapi_ch_free_string(&instancedir);
+ /* set in slapd_bootstrap_config,
+ thus certdir is available even if config_available is false */
+ certdir = config_get_certdir();
+ PL_strncpyz(path, certdir, sizeof(path));
+ slapi_ch_free_string(&certdir);
/* make sure path does not end in the path separator character */
len = strlen(path);
@@ -479,14 +478,15 @@
path[len-1] = '\0';
}
- /* get the server root from the path */
+ /* get the server instance dir name from path:
+ <sysconfig>/BRAND_DS/slapd-<id> */
val = strrchr(path, '/');
if (!val) {
val = strrchr(path, '\\');
}
val++;
- if(keyfn && certfn) {
+ if (keyfn && certfn) {
if (is_abspath(certfn)) {
warn_if_no_cert_file(certfn);
/* first, initialize path from the certfn */
@@ -553,7 +553,6 @@
}
PR_snprintf(certPref, sizeof(certPref), "%s-", val);
PL_strncpyz(keyPref, certPref, sizeof(keyPref));
- PL_strncpyz(val, "alias/", sizeof(path)-(val-path));
}
slapi_ch_free((void **) &certfn);
@@ -581,10 +580,6 @@
return rv;
}
-
-
-
-
/*
* slapd_ssl_init() is called from main() if we plan to listen
* on a secure port.
@@ -1004,12 +999,11 @@
tmpDir = slapd_get_tmp_dir();
- slapi_log_error(
- SLAPI_LOG_TRACE,
- "slapd_ssl_init2",
- "tmp dir = %s\n", tmpDir);
+ slapi_log_error(SLAPI_LOG_TRACE,
+ "slapd_ssl_init2", "tmp dir = %s\n", tmpDir);
rv = SSL_ConfigServerSessionIDCache(0, stimeout, stimeout, tmpDir);
+ slapi_ch_free(&tmpDir);
if (rv) {
errorCode = PR_GetError();
if (errorCode == ENOSPC) {
@@ -1448,12 +1442,11 @@
return _ssl_listener_initialized;
}
-
+/* memory to store tmpdir is allocated and returned; caller should free it. */
char* slapd_get_tmp_dir()
{
- static char tmpdir[] = "/tmp";
- static char tmp[256];
- char* instanceDir;
+ static char tmp[MAXPATHLEN];
+ char* tmpdir = NULL;;
#if defined( XP_WIN32 )
unsigned ilen;
char pch;
@@ -1462,64 +1455,61 @@
tmp[0] = '\0';
- if((instanceDir = config_get_instancedir()) == NULL)
+ if((tmpdir = config_get_tmpdir()) == NULL)
{
slapi_log_error(
SLAPI_LOG_FATAL,
"slapd_get_tmp_dir",
- "config_get_instancedir returns NULL Setting tmp dir to default\n");
+ "config_get_tmpdir returns NULL Setting tmp dir to default\n");
#if defined( XP_WIN32 )
- ilen = sizeof(tmp);
- GetTempPath( ilen, tmp );
- tmp[ilen-1] = (char)0;
- ilen = strlen(tmp);
- /* Remove trailing slash. */
- pch = tmp[ilen-1];
- if( pch == '\\' || pch == '/' )
- tmp[ilen-1] = '\0';
- return tmp;
+ ilen = sizeof(tmp);
+ GetTempPath( ilen, tmp );
+ tmp[ilen-1] = (char)0;
+ ilen = strlen(tmp);
+ /* Remove trailing slash. */
+ pch = tmp[ilen-1];
+ if( pch == '\\' || pch == '/' )
+ tmp[ilen-1] = '\0';
#else
- return( tmpdir );
+ strcpy(tmp, "/tmp");
#endif
+ return slapi_ch_strdup(tmp);
}
- PR_snprintf(tmp,sizeof(tmp),"%s/tmp",instanceDir);
- slapi_ch_free_string(&instanceDir);
-
#if defined( XP_WIN32 )
- for(ilen=0;ilen < strlen(tmp); ilen++)
{
- if(tmp[ilen]=='/')
- tmp[ilen]='\\';
+ char *ptr = NULL;
+ char *endptr = tmpdir + strlen(tmpdir);
+ for(ptr = tmpdir; ptr < endptr; ptr++)
+ {
+ if('/' == *ptr)
+ *ptr = '\\';
+ }
}
#endif
- if(stat(tmp,&ffinfo) == -1)
+ if(stat(tmpdir, &ffinfo) == -1)
#if defined( XP_WIN32 )
- if(CreateDirectory(tmp, NULL) == 0)
+ if(CreateDirectory(tmpdir, NULL) == 0)
{
slapi_log_error(
SLAPI_LOG_FATAL,
"slapd_get_tmp_dir",
"CreateDirectory(%s, NULL) Error: %s\n",
- tmp, strerror(errno));
- return ( tmpdir );
+ tmpdir, strerror(errno));
}
#else
- if(mkdir(tmp, 00770) == -1)
+ if(mkdir(tmpdir, 00770) == -1)
{
slapi_log_error(
SLAPI_LOG_FATAL,
"slapd_get_tmp_dir",
"mkdir(%s, 00770) Error: %s\n",
- tmp, strerror(errno));
- return ( tmpdir );
+ tmpdir, strerror(errno));
}
#endif
-
- return ( tmp );
-
+ return ( tmpdir );
}
#endif /* NET_SSL */
17 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/rever des.c, 1.5, 1.6
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/rever
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23608/ldap/servers/plugins/rever
Modified Files:
des.c
Log Message:
[208672] parameterizing the hardcoded paths (phase 2. db, log, lock, pid, cert, and instance dir)
1) introduced these 3 new config attributes:
nsslapd-lockdir, nsslapd-tmpdir, nsslapd-certdir,
and eliminated: nsslapd-instancedir.
2) replaced the hardcoded paths with the corresponding attribute value in the
server as well as in the create/remove instance codes.
3) moved snmp stats file to the nsslapd-tmpdir
4) moved the server instance dir to <prefix>/lib/<brand>-ds/slapd-<id>
Index: des.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/rever/des.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- des.c 19 Apr 2005 22:07:34 -0000 1.5
+++ des.c 13 Oct 2006 01:06:27 -0000 1.6
@@ -214,7 +214,7 @@
CK_MECHANISM pbeMech;
CK_MECHANISM cryptoMech;
- char *instancedir = NULL;
+ char *configdir = NULL;
char *iv = NULL;
store = (struct pk11ContextStore*)slapi_ch_malloc(sizeof(*store));
@@ -243,22 +243,22 @@
/* Generate a unique id, used as salt for the key generation */
if ( path == NULL )
{
- instancedir = config_get_instancedir();
- if ( instancedir == NULL )
+ configdir = config_get_configdir();
+ if ( configdir == NULL )
{
return (err = SVRCORE_System_Error);
}
}
else
{
- instancedir = slapi_ch_strdup(path);
+ configdir = slapi_ch_strdup(path);
}
- if ( slapi_uniqueIDGenerateFromNameString (&iv, NULL, instancedir, strlen(instancedir)) != UID_SUCCESS )
+ if ( slapi_uniqueIDGenerateFromNameString (&iv, NULL, configdir, strlen(configdir)) != UID_SUCCESS )
{
- slapi_ch_free((void**)&instancedir);
+ slapi_ch_free((void**)&configdir);
return (err = SVRCORE_System_Error);
}
- slapi_ch_free((void**)&instancedir);
+ slapi_ch_free((void**)&configdir);
pwitem = (SECItem *) PORT_Alloc(sizeof(SECItem));
if (pwitem == NULL)
17 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-bak2db.pl, 1.5, 1.6 template-db2bak.pl, 1.4, 1.5 template-db2index.pl, 1.5, 1.6 template-db2ldif.pl, 1.4, 1.5 template-ldif2db.pl, 1.4, 1.5 template-ns-accountstatus.pl, 1.4, 1.5 template-ns-activate.pl, 1.4, 1.5 template-ns-inactivate.pl, 1.4, 1.5
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23608/ldap/admin/src/scripts
Modified Files:
template-bak2db.pl template-db2bak.pl template-db2index.pl
template-db2ldif.pl template-ldif2db.pl
template-ns-accountstatus.pl template-ns-activate.pl
template-ns-inactivate.pl
Log Message:
[208672] parameterizing the hardcoded paths (phase 2. db, log, lock, pid, cert, and instance dir)
1) introduced these 3 new config attributes:
nsslapd-lockdir, nsslapd-tmpdir, nsslapd-certdir,
and eliminated: nsslapd-instancedir.
2) replaced the hardcoded paths with the corresponding attribute value in the
server as well as in the create/remove instance codes.
3) moved snmp stats file to the nsslapd-tmpdir
4) moved the server instance dir to <prefix>/lib/<brand>-ds/slapd-<id>
Index: template-bak2db.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-bak2db.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-bak2db.pl 19 Apr 2005 22:07:00 -0000 1.5
+++ template-bak2db.pl 13 Oct 2006 01:06:21 -0000 1.6
@@ -55,7 +55,7 @@
$archivedir = "";
$dbtype = "ldbm database";
$instance = "";
-$dsroot = "{{DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
$mydsroot = "{{MY-DS-ROOT}}";
$verbose = 0;
$rootdn = "";
@@ -127,7 +127,7 @@
$entry = "${dn}${misc}${cn}${nsinstance}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-db2bak.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2bak.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-db2bak.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-db2bak.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -53,8 +53,8 @@
$taskname = "";
$archivedir = "";
$dbtype = "ldbm database";
-$dsroot = "{{DS-ROOT}}";
-$mydsroot = "{{MY-DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
+$mybakdir = "{{BAK-DIR}}";
$verbose = 0;
$rootdn = "";
$passwd = "";
@@ -105,7 +105,7 @@
$mn++; $yr += 1900;
$taskname = "backup_${yr}_${mn}_${dy}_${h}_${m}_${s}";
if ($archivedir eq "") {
- $archivedir = "${mydsroot}{{SEP}}bak{{SEP}}${yr}_${mn}_${dy}_${h}_${m}_${s}";
+ $archivedir = "${bakdir}{{SEP}}bak{{SEP}}${yr}_${mn}_${dy}_${h}_${m}_${s}";
}
$dn = "dn: cn=$taskname, cn=backup, cn=tasks, cn=config\n";
$misc = "changetype: add\nobjectclass: top\nobjectclass: extensibleObject\n";
@@ -115,7 +115,7 @@
$entry = "${dn}${misc}${cn}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-db2index.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2index.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-db2index.pl 25 Aug 2005 21:17:48 -0000 1.5
+++ template-db2index.pl 13 Oct 2006 01:06:21 -0000 1.6
@@ -65,8 +65,7 @@
$vlvattribute_arg = "";
$verbose = 0;
-$dsroot = "{{DS-ROOT}}";
-$mydsroot = "{{MY-DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
$i = 0;
while ($i <= $#ARGV)
@@ -163,11 +162,11 @@
$indexes_list="";
$vlvattribute="";
$vlvindexes_list="";
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
if ( $attribute_arg eq "" && $vlvattribute_arg eq "" )
{
# Get the list of indexes from the entry
- $indexes_list="$dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s one " .
+ $indexes_list="$prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s one " .
"-b \"cn=index,cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"(&(objectclass=*)(nsSystemIndex=false))\" cn";
# build the values of the attribute nsIndexAttribute
@@ -187,7 +186,7 @@
}
# Get the list of indexes from the entry
- $vlvindexes_list="$dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s sub -b \"cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"objectclass=vlvIndex\" cn";
+ $vlvindexes_list="$prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s sub -b \"cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"objectclass=vlvIndex\" cn";
# build the values of the attribute nsIndexVlvAttribute
open(LDAP1, "$vlvindexes_list |");
@@ -220,6 +219,6 @@
$nsinstance = "nsInstance: ${instance}\n";
$entry = "${dn}${misc}${cn}${nsinstance}${attribute}${vlvattribute}";
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-db2ldif.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2ldif.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-db2ldif.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-db2ldif.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -100,8 +100,9 @@
$taskname = "";
$ldiffile = "";
$doreplica = 0;
-$dsroot = "{{DS-ROOT}}";
-$mydsroot = "{{MY-DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
+$ldifdir = "{{LDIF-DIR}}";
+$servid = "{{SERV-ID}}";
$verbose = 0;
$rootdn = "";
$passwd = "";
@@ -195,7 +196,7 @@
$mn++; $yr += 1900;
$taskname = "export_${yr}_${mn}_${dy}_${h}_${m}_${s}";
if ($ldiffile eq "") {
- $ldiffile = "${mydsroot}{{SEP}}ldif{{SEP}}${yr}_${mn}_${dy}_${h}_${m}_${s}.ldif";
+ $ldiffile = "${ldifdir}{{SEP}}${servid}-${yr}_${mn}_${dy}_${h}_${m}_${s}.ldif";
}
$dn = "dn: cn=$taskname, cn=export, cn=tasks, cn=config\n";
$misc = "changetype: add\nobjectclass: top\nobjectclass: extensibleObject\n";
@@ -241,7 +242,7 @@
$entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsreplica}${nsnobase64}${nsnowrap}${nsnoversion}${nsnouniqueid}${nsuseid2entry}${nsonefile}${nsexportdecrypt}${nsprintkey}${nsldiffile}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-ldif2db.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ldif2db.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ldif2db.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ldif2db.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -93,7 +93,7 @@
$genuniqid = "time";
$uniqidname = "";
$taskname = "";
-$dsroot = "{{DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
$mydsroot = "{{MY-DS-ROOT}}";
$verbose = 0;
$rootdn = "";
@@ -219,7 +219,7 @@
$entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsldiffiles}${nsnoattrindexes}${nsimportencrypt}${nsmergechunksiz}${nsgenuniqid}${nsuniqidname}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-ns-accountstatus.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-accountstatus.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-accountstatus.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ns-accountstatus.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -356,7 +356,7 @@
###############################
# Generated variable
-$dsroot="{{DS-ROOT}}";
+$prefix="{{DS-ROOT}}";
# Determine which command we are running
if ( $0 =~ /ns-inactivate(.pl)?$/ )
@@ -392,7 +392,7 @@
debug("Running ** $cmd ** $operation\n");
-$dsbinroot="$dsroot{{SEP}}shared{{SEP}}bin";
+$dsbinroot="$prefix{{SEP}}shared{{SEP}}bin";
$ldapsearch="$dsbinroot{{SEP}}ldapsearch -1";
$ldapmodify="$dsbinroot{{SEP}}ldapmodify";
Index: template-ns-activate.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-activate.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-activate.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ns-activate.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -356,7 +356,7 @@
###############################
# Generated variable
-$dsroot="{{DS-ROOT}}";
+$prefix="{{DS-ROOT}}";
# Determine which command we are running
if ( $0 =~ /ns-inactivate(.pl)?$/ )
@@ -392,7 +392,7 @@
debug("Running ** $cmd ** $operation\n");
-$dsbinroot="$dsroot{{SEP}}shared{{SEP}}bin";
+$dsbinroot="$prefix{{SEP}}shared{{SEP}}bin";
$ldapsearch="$dsbinroot{{SEP}}ldapsearch -1";
$ldapmodify="$dsbinroot{{SEP}}ldapmodify";
Index: template-ns-inactivate.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-inactivate.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-inactivate.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ns-inactivate.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -356,7 +356,7 @@
###############################
# Generated variable
-$dsroot="{{DS-ROOT}}";
+$prefix="{{DS-ROOT}}";
# Determine which command we are running
if ( $0 =~ /ns-inactivate(.pl)?$/ )
@@ -392,7 +392,7 @@
debug("Running ** $cmd ** $operation\n");
-$dsbinroot="$dsroot{{SEP}}shared{{SEP}}bin";
+$dsbinroot="$prefix{{SEP}}shared{{SEP}}bin";
$ldapsearch="$dsbinroot{{SEP}}ldapsearch -1";
$ldapmodify="$dsbinroot{{SEP}}ldapmodify";
17 years, 7 months