#! /bin/sh # $OpenLDAP$ ## This work is part of OpenLDAP Software . ## ## Copyright 2021 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted only as authorized by the OpenLDAP ## Public License. ## ## A copy of this license is available in the file LICENSE in the ## top-level directory of the distribution or, alternatively, at ## . echo "running defines.sh" . $SRCDIR/scripts/defines.sh if test $DEREF = derefno; then echo "Deref overlay not available, test skipped" exit 0 fi mkdir -p $TESTDIR $DBDIR1 $SLAPPASSWD -g -n >$CONFIGPWF echo "rootpw `$SLAPPASSWD -T $CONFIGPWF`" >$TESTDIR/configpw.conf echo "Running slapadd to build slapd database..." . $CONFFILTER $BACKEND < $DEREFCONF > $CONF1 $SLAPADD -f $CONF1 -l $LDIFDEREF RC=$? if test $RC != 0 ; then echo "slapadd failed ($RC)!" exit $RC fi echo "Starting slapd on TCP/IP port $PORT1..." $SLAPD -f $CONF1 -h $URI1 -d $LVL > $LOG1 2>&1 & PID=$! if test $WAIT != 0 ; then echo PID $PID read foo fi KILLPIDS="$PID" sleep 1 echo "Testing slapd deref control operations..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -H $URI1 \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 0 ; then break fi echo "Waiting 5 seconds for slapd to start..." sleep 5 done if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi echo "Sending deref control..." $LDAPSEARCH -b "$DEREFBASEDN" -H $URI1 \ -E 'deref=member:uid' > $SEARCHOUT 2>&1 RC=$? if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi echo "Comparing output..." $CMP $SEARCHOUT $DEREFOUT > $CMPOUT if test $? != 0 ; then echo "Comparison failed" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit 1 fi test $KILLSERVERS != no && kill -HUP $KILLPIDS test $KILLSERVERS != no && wait echo ">>>>> Test succeeded" exit 0 n value='author'>author
AgeCommit message (Collapse)Author
2013-03-16fix the build!christos
2013-03-15Rerevert to preprevious now that this builds with build.shpooka
2013-03-14Guess the RUMPCOMP_USER stuff wasn't ready to be in the NetBSD tree yet,pooka
so revert previous commits to fix build. I'll look at rereverting when toolchain/47644 is fixed and clean buildtests are again possible.
2013-03-13Fix a few minor issues found by proofreading the diff one last time.pooka
2013-03-13Push the bits accessing the networking backend into hypercalls.pooka
This allows a few highly desirable things to happen: 1) Linux support, which is included in this commit (thanks to wanq for sending me the magic bits for accessing /dev/net/tun) 2) Reusing the kernel-side of the interface for devices such as hardware packet processors which interact directly with user vm spaces (not included in the commit).
2012-09-14Do not assume that O_FOO flags have matching values in the rump kernelpooka
and hypervisor.
2011-11-19First step of random number subsystem rework described intls
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes the following: An initial cleanup and minor reorganization of the entropy pool code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are fixed. Some effort is made to accumulate entropy more quickly at boot time. A generic interface, "rndsink", is added, for stream generators to request that they be re-keyed with good quality entropy from the pool as soon as it is available. The arc4random()/arc4randbytes() implementation in libkern is adjusted to use the rndsink interface for rekeying, which helps address the problem of low-quality keys at boot time. An implementation of the FIPS 140-2 statistical tests for random number generator quality is provided (libkern/rngtest.c). This is based on Greg Rose's implementation from Qualcomm. A new random stream generator, nist_ctr_drbg, is provided. It is based on an implementation of the NIST SP800-90 CTR_DRBG by Henric Jungheim. This generator users AES in a modified counter mode to generate a backtracking-resistant random stream. An abstraction layer, "cprng", is provided for in-kernel consumers of randomness. The arc4random/arc4randbytes API is deprecated for in-kernel use. It is replaced by "cprng_strong". The current cprng_fast implementation wraps the existing arc4random implementation. The current cprng_strong implementation wraps the new CTR_DRBG implementation. Both interfaces are rekeyed from the entropy pool automatically at intervals justifiable from best current cryptographic practice. In some quick tests, cprng_fast() is about the same speed as the old arc4randbytes(), and cprng_strong() is about 20% faster than rnd_extract_data(). Performance is expected to improve. The AES code in src/crypto/rijndael is no longer an optional kernel component, as it is required by cprng_strong, which is not an optional kernel component. The entropy pool output is subjected to the rngtest tests at startup time; if it fails, the system will reboot. There is approximately a 3/10000 chance of a false positive from these tests. Entropy pool _input_ from hardware random numbers is subjected to the rngtest tests at attach time, as well as the FIPS continuous-output test, to detect bad or stuck hardware RNGs; if any are detected, they are detached, but the system continues to run. A problem with rndctl(8) is fixed -- datastructures with pointers in arrays are no longer passed to userspace (this was not a security problem, but rather a major issue for compat32). A new kernel will require a new rndctl. The sysctl kern.arandom() and kern.urandom() nodes are hooked up to the new generators, but the /dev/*random pseudodevices are not, yet. Manual pages for the new kernel interfaces are forthcoming.
2011-10-31fix a type in a printf messageyamt
2011-08-07Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN.rmind
2011-06-22fix an operator precedence error picked up by GCC 4.5.3. real bug.mrg
2010-12-01Don't bother asserting: if we create the thread without KTHREAD_MPSAFE,pooka
it's not going to be MPSAFE.
2010-11-15Make interface support ifconfig {down,destroy} and generally makepooka
it a little less eager to panic.
2010-10-19Make virtif a cloner so that it can be brough to life also withpooka
"ifconfig create". As previously, virt<n> interfaces with the host's /dev/tap<n> (I guess it could be made explicit with "ifconfig media", but leave it this way for now).
2010-08-10* improve diagnostic printpooka
* deal with a tap quirk when it returns 0 bytes
2010-04-05Fix typojoerg
2010-04-05Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpfjoerg
check into the inline functions as well the fourth argument for bpf_attach.
2010-03-01Introduce RUMP_COMPONENT. It behaves mostly like a simplifiedpooka
module which is linked into the kernel and cannot be unloaded. The main purpose is to get the proper constructors run and create any /dev nodes necessary for said component. Once more of the kernel (e.g. networking stack and device drivers) are converted to MODULE and devfs pops up from somewhere, rump components can be retired.
2010-01-19Redefine bpf linkage through an always present op vector, i.e.pooka
#if NBPFILTER is no longer required in the client. This change doesn't yet add support for loading bpf as a module, since drivers can register before bpf is attached. However, callers of bpf can now be modularized. Dynamically loadable bpf could probably be done fairly easily with coordination from the stub driver and the real driver by registering attachments in the stub before the real driver is loaded and doing a handoff. ... and I'm not going to ponder the depths of unload here. Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-16support bpfpooka
2009-10-14"rumppriv" goes back to "rump" per internal interface naming change.pooka
2009-10-14Adjust rump sources for external/internal interfaces.pooka
No functional change.
2009-10-12Bump iovec lazy bum magic value to 32: nfsd likes to write mbufspooka
with 17 per chain (previous i'm-too-lazy-for-my-forloop value was of course 16).
2009-09-16work around tap bug: if /dev/tap<n> was previously non-blocking, newlypooka
opened fd's will also be non-blocking. (yeayea, i'll fix the kernel some day, but I don't want to reboot my host OS now)
2009-05-28Use a bunch of weak symbols to determine which network componentspooka
are present. This works in userspace as opposed relying in link sets, which fail miserably. Later, when the networking stack becomes modularized, we can move to a dynamic scheme like with file systems. Also, this change allows us to do proper autoconfig, namely attach the loopback interface iff it is present.
2009-05-27Add a dummyif, which doesn't actually traffic any cargo, but sincepooka
it has no backend it can always be attached and is therefore convenient for testing ifconfig.
2009-05-26Filter out ENETRESET from ether_ioctl() since we aren't interestedpooka
in multicast hugging.
2009-03-27* make interface creation open /dev/tapn for interface npooka
* create "unique" enaddr * do send in async context
2009-02-28Fix a silly mistake: indubitably the struct ifnet pointer given topooka
ether_ifattach() should point to a struct ethercom.
2009-02-26decouple from host struct iovecpooka
2008-12-18__KERNEL_RCSIDpooka
2008-10-16Add a prototype to allow this to build (will be moved to a betterpooka
place later).
2008-10-16kill default DBG=-gpooka
2008-10-14Make the "something random" ethernet address ETHER_IS_LOCALpooka
(address assignment probably needs some more work if we want to support multiple interfaces). hat tip to Quentin Garnier
2008-10-13Dear diary: an ethernet address with 0x01 set in the first octetpooka
is an ethernet multicast address. TCP does not like ethernet multicast addresses.
2008-10-06Implement a virtual userspace networking interface. This is requiredpooka
for any sensible operation when running the entire TCP/IP stack in userspace (as opposed to libsockin which uses host kernel networking to provide PF_INET). While this basically works (although it is quite barebones), it depends on some bit of cleanup in librump and is not built by default yet.