mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
Uses fork/exec to limit memory footprint of ocserv-worker processes
Capture all the required worker process state in a protobuf and pass to worker via env. Snapshot all config files to ensure ocserv-sm and ocserv-worker remain in sync. Split ocserv-worker functionality into it's own executable with minimal dependencies. Resolves: #285 Signed-off-by: Alan Jowett alanjo@microsoft.com
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
fb4116b2d7
commit
ce66485ee6
@@ -49,14 +49,14 @@ echo -n "Connecting to obtain cookie (with certificate)... "
|
||||
echo ok
|
||||
|
||||
sed -i 's/^auth = "certificate"/#auth = "certificate"/g' ${CONFIG}
|
||||
sed -i 's|^#auth = "plain[.\/data/test1.passwd]"|auth = "plain[.\/data/test1.passwd]"|g' ${CONFIG}
|
||||
sed -i 's/^#auth = "plain/auth = "plain/g' ${CONFIG}
|
||||
sleep 10
|
||||
echo "Reloading server"
|
||||
kill -HUP $PID
|
||||
sleep 5
|
||||
|
||||
echo -n "Connecting to obtain cookie (with certificate)... "
|
||||
( LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT -q $ADDRESS:$PORT --sslkey ${srcdir}/certs/user-key.pem -c ${srcdir}/certs/user-cert.pem --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly </dev/null >/dev/null 2>&1 ) ||
|
||||
( LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT -q $ADDRESS:$PORT --sslkey ${srcdir}/certs/user-key.pem -c ${srcdir}/certs/user-cert.pem --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly </dev/null >/dev/null 2>&1 ) &&
|
||||
fail $PID "Could not connect with certificate!"
|
||||
|
||||
echo ok
|
||||
|
||||
Reference in New Issue
Block a user