From 2cab70fd1fa0ab1d3e3401994271bb2b404380b8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 28 Sep 2000 20:14:46 +0000 Subject: [PATCH] fix schema install w/ VPATH update bprint --- CHANGES | 3 +++ build/top.mk | 1 + libraries/liblber/bprint.c | 37 +++++++++++++++++++++++++++++++++++++ servers/slapd/Makefile.in | 18 +++++++++--------- 4 files changed, 50 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 762fee9d25..275b3c54e3 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ OpenLDAP 2.0.X Engineering Fixed slapd/sasl no cred bug Fixed slapd idletimeout lock bug (ITS#767) Fixed slurpd TLS initialization bug (ITS#768) + Updated -llber bprint routine + Build Environment + Fixed VPATH schema install OpenLDAP 2.0.4 Release Fixed clients printf/usage bugs (ITS#749) diff --git a/build/top.mk b/build/top.mk index c5fc7ebdbf..75791071df 100644 --- a/build/top.mk +++ b/build/top.mk @@ -34,6 +34,7 @@ moduledir = @libexecdir@$(ldap_subdir) sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@$(ldap_subdir) +schemadir = $(sysconfdir)/schema EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ diff --git a/libraries/liblber/bprint.c b/libraries/liblber/bprint.c index 05c993ebb4..6379f26ad3 100644 --- a/libraries/liblber/bprint.c +++ b/libraries/liblber/bprint.c @@ -144,12 +144,49 @@ ber_bprint( assert( data != NULL ); +<<<<<<< bprint.c memset( out, '\0', BPLEN ); for ( ;; ) { if ( len < 1 ) { sprintf( buf, "\t%s\n", ( i == 0 ) ? "(end)" : out ); (*ber_pvt_log_print)( buf ); break; +======= + /* in case len is zero */ + line[0] = '\n'; + line[1] = '\0'; + + for ( i = 0 ; i < len ; i++ ) { + int n = i % 16; + unsigned off; + + if( !n ) { + if( i ) (*ber_pvt_log_print)( line ); + memset( line, ' ', sizeof(line)-2 ); + line[sizeof(line)-2] = '\n'; + line[sizeof(line)-1] = '\0'; + + off = i % 0x0ffffU; + + line[ 2 ] = hexdig[ 0x0f & (off >> 12) ]; + line[ 3 ] = hexdig[ 0x0f & (off >> 8) ]; + line[ 4 ] = hexdig[ 0x0f & (off >> 4) ]; + line[ 5 ] = hexdig[ 0x0f & off ]; + line[ 6 ] = ':'; + } + + off = BP_OFFSET + n*3 + ((n >= 8)?1:0); + line[ off ] = hexdig[ 0x0f & ( data[i] >> 4 ) ]; + line[ off+1 ] = hexdig[ 0x0f & data[i] ]; + + off = BP_GRAPH + n; + + if ( isprint( data[i] )) { + line[ BP_GRAPH + n ] = data[i]; + } else { + line[ BP_GRAPH + n ] = '.'; + } +>>>>>>> 1.34 } #ifndef LDAP_HEX diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 1c3b14747d..ed5f06487b 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -251,17 +251,17 @@ all-cffiles: slapd touch all-cffiles install-schema: FORCE - @-$(MKDIR) $(DESTDIR)$(sysconfdir)/schema - @cd $(srcdir) ; \ - for i in schema/*.schema ; do \ - if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \ - echo "installing $$i in $(sysconfdir)"; \ - echo $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $(DESTDIR)$(sysconfdir)/$$i; \ - $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $(DESTDIR)$(sysconfdir)/$$i; \ + @-$(MKDIR) $(DESTDIR)$(schemadir) + @cd $(srcdir)/schema ; \ + for i in *.schema ; do \ + if test ! -f $(DESTDIR)$(schemadir)/$$i; then \ + echo "installing $$i in $(schemadir)"; \ + echo $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $(DESTDIR)$(schemadir)/$$i; \ + $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $(DESTDIR)$(schemadir)/$$i; \ else \ - echo "PRESERVING EXISTING SCHEMA FILE $(DESTDIR)$(sysconfdir)/$$i"; \ + echo "PRESERVING EXISTING SCHEMA FILE $(DESTDIR)$(schemadir)/$$i"; \ fi; \ - $(INSTALL) $(INSTALLFLAGS) $$i $(DESTDIR)$(sysconfdir)/$$i.default ; \ + $(INSTALL) $(INSTALLFLAGS) $$i $(DESTDIR)$(schemadir)/$$i.default ; \ done install-conf: FORCE -- 2.39.5