1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

changed structure of trustdb

This commit is contained in:
Werner Koch 1998-02-02 14:36:06 +00:00
parent 3bcd3cd7b2
commit c8f12e218f
28 changed files with 2323 additions and 979 deletions

View file

@ -1,12 +1,12 @@
## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_srcdir)/include
INCLUDES = -I.. -I$(top_srcdir)/include
noinst_LIBRARIES = util
noinst_LIBRARIES = libutil.a
util_SOURCES = logger.c fileutil.c miscutil.c strgutil.c \
ttyio.c argparse.c memory.c secmem.c errors.c iobuf.c
libutil_a_SOURCES = logger.c fileutil.c miscutil.c strgutil.c \
ttyio.c argparse.c memory.c secmem.c errors.c iobuf.c

View file

@ -1,8 +1,14 @@
# Makefile.in generated automatically by automake 1.0 from Makefile.am
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# 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.
SHELL = /bin/sh
@ -32,202 +38,248 @@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
INCLUDES = -I$(top_srcdir)/include
noinst_LIBRARIES = util
util_SOURCES = logger.c fileutil.c miscutil.c strgutil.c \
ttyio.c argparse.c memory.c secmem.c errors.c iobuf.c
mkinstalldirs = $(top_srcdir)/scripts/mkinstalldirs
CONFIG_HEADER = ../config.h
LIBRARIES = $(noinst_LIBRARIES)
noinst_LIBFILES = libutil.a
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
LEX = @LEX@
YACC = @YACC@
CIPHER_EXTRA_DIST = @CIPHER_EXTRA_DIST@
CIPHER_EXTRA_OBJS = @CIPHER_EXTRA_OBJS@
CPP = @CPP@
DATADIRNAME = @DATADIRNAME@
G10_LOCALEDIR = @G10_LOCALEDIR@
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTLSUB = @INTLSUB@
MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
VERSION = @VERSION@
INCLUDES = -I.. -I$(top_srcdir)/include
noinst_LIBRARIES = libutil.a
libutil_a_SOURCES = logger.c fileutil.c miscutil.c strgutil.c \
ttyio.c argparse.c memory.c secmem.c errors.c iobuf.c
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
util_LIBADD =
util_OBJECTS = logger.o fileutil.o miscutil.o strgutil.o ttyio.o \
libutil_a_LIBADD =
libutil_a_OBJECTS = logger.o fileutil.o miscutil.o strgutil.o ttyio.o \
argparse.o memory.o secmem.o errors.o iobuf.o
EXTRA_util_SOURCES =
LIBFILES = libutil.a
AR = ar
RANLIB = @RANLIB@
DIST_COMMON = Makefile.am Makefile.in
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in
PACKAGE = @PACKAGE@
VERSION = @VERSION@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
$(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA)
DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
$(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
DEP_FILES = $(srcdir)/.deps/argparse.P $(srcdir)/.deps/errors.P \
$(srcdir)/.deps/fileutil.P $(srcdir)/.deps/iobuf.P \
$(srcdir)/.deps/logger.P $(srcdir)/.deps/memory.P \
$(srcdir)/.deps/miscutil.P $(srcdir)/.deps/secmem.P \
$(srcdir)/.deps/strgutil.P $(srcdir)/.deps/ttyio.P
SOURCES = $(util_SOURCES)
OBJECTS = $(util_OBJECTS)
GZIP = --best
DEP_FILES = .deps/argparse.P .deps/errors.P .deps/fileutil.P \
.deps/iobuf.P .deps/logger.P .deps/memory.P .deps/miscutil.P \
.deps/secmem.P .deps/strgutil.P .deps/ttyio.P
SOURCES = $(libutil_a_SOURCES)
OBJECTS = $(libutil_a_OBJECTS)
default: all
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu util/Makefile
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in
cd $(top_srcdir) && automake $(subdir)/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Makefile: $(top_builddir)/config.status Makefile.in
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
mostlyclean-noinstLIBRARIES:
clean-noinstLIBRARIES:
rm -f $(noinst_LIBFILES)
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
distclean-noinstLIBRARIES:
maintainer-clean-noinstLIBRARIES:
.c.o:
$(COMPILE) $<
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
rm -f *.o core
-rm -f *.o core
clean-compile:
distclean-compile:
rm -f *.tab.c
-rm -f *.tab.c
maintainer-clean-compile:
$(util_OBJECTS): ../config.h
libutil.a: $(util_OBJECTS) $(util_LIBADD)
rm -f libutil.a
$(AR) cru libutil.a $(util_OBJECTS) $(util_LIBADD)
libutil.a: $(libutil_a_OBJECTS) $(libutil_a_DEPENDENCIES)
-rm -f libutil.a
$(AR) cru libutil.a $(libutil_a_OBJECTS) $(libutil_a_LIBADD)
$(RANLIB) libutil.a
ID: $(HEADERS) $(SOURCES)
here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES)
here=`pwd` && cd $(srcdir) && etags $(ETAGS_ARGS) $(SOURCES) $(HEADERS) -o $$here/TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
rm -f TAGS ID
-rm -f TAGS ID
maintainer-clean-tags:
subdir = util
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DEP_DISTFILES)
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
subdir = util
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu util/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -f $(distdir)/$$file \
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
# This fragment is probably only useful for maintainers. It relies on
# GNU make and gcc. It is only included in the generated Makefile.in
# if `automake' is not passed the `--include-deps' flag.
MKDEP = $(CC) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
MKDEP = gcc -MM $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-include $(srcdir)/.deps/.P
$(srcdir)/.deps/.P: $(BUILT_SOURCES)
cd $(srcdir) && test -d .deps || mkdir .deps
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include .deps/.P
.deps/.P: $(BUILT_SOURCES)
echo > $@
-include $(DEP_FILES)
$(DEP_FILES): $(srcdir)/.deps/.P
$(srcdir)/.deps/%.P: $(srcdir)/%.c
@echo "mkdeps $< > $@"
@re=`echo 's,^$(srcdir)//*,,g;s, $(srcdir)//*, ,g' | sed 's,\.,\\\\.,g'`; \
$(MKDEP) $< | sed "$$re" > $@-tmp
@if test -n "$o"; then \
sed 's/\.o:/$$o:/' $@-tmp > $@; \
rm $@-tmp; \
else \
mv $@-tmp $@; \
fi
mostlyclean-depend:
# End of maintainer-only section
clean-depend:
distclean-depend:
maintainer-clean-depend:
-rm -rf .deps
.deps/%.P: %.c
@echo "Computing dependencies for $<..."
@o='o'; \
test -n "$o" && o='$$o'; \
$(MKDEP) $< >$@.tmp \
&& sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \
&& rm -f $@.tmp
info:
dvi:
check: all
$(MAKE)
installcheck:
install-exec:
@$(NORMAL_INSTALL)
install-exec:
install-data:
install-data:
@$(NORMAL_INSTALL)
install: install-exec install-data all
@:
uninstall:
uninstall:
all: $(LIBFILES) Makefile
all: Makefile $(LIBRARIES)
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
mostlyclean-generic:
test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
rm -f Makefile $(DISTCLEANFILES)
rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
-rm -f Makefile $(DISTCLEANFILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
mostlyclean-tags mostlyclean-generic
mostlyclean-tags mostlyclean-depend mostlyclean-generic
clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
mostlyclean
clean: clean-noinstLIBRARIES clean-compile clean-tags clean-depend \
clean-generic mostlyclean
distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
distclean-generic clean
rm -f config.status
distclean-depend distclean-generic clean
-rm -f config.status
maintainer-clean: maintainer-clean-noinstLIBRARIES \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-generic distclean
maintainer-clean-depend maintainer-clean-generic \
distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
@ -235,13 +287,12 @@ maintainer-clean: maintainer-clean-noinstLIBRARIES \
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir info dvi check installcheck \
install-exec install-data install uninstall all installdirs \
mostlyclean-generic distclean-generic clean-generic \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
distclean-depend clean-depend maintainer-clean-depend info dvi \
installcheck install-exec install-data install uninstall all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
.SUFFIXES:
.SUFFIXES: .c .o
# 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.

View file

@ -59,7 +59,7 @@ static unsigned max_alloced;
static unsigned cur_alloced;
static unsigned max_blocks;
static unsigned cur_blocks;
static int disable_secmem;
static void
lock_pool( void *p, size_t n )
@ -94,12 +94,15 @@ init_pool( size_t n)
{
poolsize = n;
if( disable_secmem )
log_bug("secure memory is disabled");
#if HAVE_MMAP && defined(MAP_ANONYMOUS)
poolsize = (poolsize + 4095) & ~4095;
pool = mmap( 0, poolsize, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
if( pool == (void*)-1 )
log_error("can´t mmap pool of %u bytes: %s - using malloc\n",
log_error("can't mmap pool of %u bytes: %s - using malloc\n",
(unsigned)poolsize, strerror(errno));
else {
pool_is_mmapped = 1;
@ -110,7 +113,7 @@ init_pool( size_t n)
if( !pool_okay ) {
pool = malloc( poolsize );
if( !pool )
log_fatal("can´t allocate memory pool of %u bytes\n",
log_fatal("can't allocate memory pool of %u bytes\n",
(unsigned)poolsize);
else
pool_okay = 1;
@ -131,12 +134,16 @@ compress_pool(void)
void
secmem_init( size_t n )
{
if( n < DEFAULT_POOLSIZE )
n = DEFAULT_POOLSIZE;
if( !pool_okay )
init_pool(n);
else
log_error("Oops, secure memory pool already initialized\n");
if( !n )
disable_secmem=1;
else {
if( n < DEFAULT_POOLSIZE )
n = DEFAULT_POOLSIZE;
if( !pool_okay )
init_pool(n);
else
log_error("Oops, secure memory pool already initialized\n");
}
}
@ -235,6 +242,8 @@ secmem_term()
void
secmem_dump_stats()
{
if( disable_secmem )
return;
fprintf(stderr,
"secmem usage: %u/%u bytes in %u/%u blocks of pool %lu/%lu\n",
cur_alloced, max_alloced, cur_blocks, max_blocks,