updated full-test

This commit is contained in:
Nikos Mavrogiannopoulos
2014-09-03 09:15:54 +02:00
parent 9f42ae8da8
commit be50fb3ac1
4 changed files with 34 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ EXTRA_DIST = ca-key.pem ca.pem common.sh server-cert.pem server-key.pem test1.co
user-config/test test-pass-script.config test-multi-cookie.config test-pam.config \
test-stress.config user-cert-wrong.pem connect-script test-group.passwd \
test-group-pass.config user-group-cert.pem user-group-key.pem test-user-group-cert.config \
test-user-group-cert-no-pass.config echo-admin
test-user-group-cert-no-pass.config
SUBDIRS = docker-ocserv

View File

@@ -1,14 +1,13 @@
FROM tianon/debian:jessie
RUN apt-get update;sleep 1
RUN apt-get update;sleep 3
RUN apt-get install -y libgnutls-deb0-28
RUN apt-get install -y libprotobuf-c1
RUN apt-get install -y libwrap0 libpam0g libseccomp2 libdbus-1-3 libreadline5 libnl-route-3-200
RUN apt-get install -y libhttp-parser2.1 libpcl1 libopts25 autogen
RUN apt-get install -y libsystemd-daemon0 valgrind nuttcp openssh-server bash
#RUN apt-get install -y inotify-tools
RUN apt-get update
RUN apt-get install -y libtalloc2
RUN sed 's/PermitRootLogin without-password/PermitRootLogin yes/g' -i /etc/ssh/sshd_config
RUN echo 'root:root' |chpasswd
RUN useradd -m -d /home/admin -s /bin/bash admin

View File

@@ -5,6 +5,14 @@
auth = "plain[/etc/ocserv/passwd]"
#auth = "pam"
# Whether to enable support for the occtl tool (i.e., either through D-BUS,
# or via a unix socket).
use-occtl = true
# socket file used for IPC with occtl. You only need to set that,
# if you use more than a single servers.
#occtl-socket-file = /var/run/occtl.socket
# The plain option requires specifying a password file which contains
# entries of the following format.
# "username:groupname:encoded-password"

View File

@@ -106,8 +106,29 @@ if test $? != 0;then
stop
fi
export SSH_ASKPASS="$srcdir/echo-admin"
setsid ssh admin@192.168.1.190 occtl show user test >out.tmp 2>&1
echo "Waiting for RX data to be sent to master"
sleep 65
echo "UserKnownHostsFile ./known-hosts.tmp" >config.tmp
printf "#\!/bin/sh\n" >echo-admin.tmp
printf "echo yes" >>echo-admin.tmp
printf "echo root" >>echo-admin.tmp
printf "\n" >>echo-admin.tmp
chmod 755 echo-admin.tmp
export SSH_ASKPASS="./echo-admin.tmp"
setsid ssh -T -F config.tmp root@192.168.1.190 occtl show user test >out.tmp 2>&1
cat out.tmp
printf "#\!/bin/sh\n" >echo-admin.tmp
printf "echo root" >>echo-admin.tmp
printf "\n" >>echo-admin.tmp
chmod 755 echo-admin.tmp
setsid ssh -T -F config.tmp root@192.168.1.190 occtl show user test >out.tmp 2>&1
cat out.tmp
rm -f echo-admin.tmp
rm -f config.tmp
rm -f known-hosts.tmp
grep "RX data" out.tmp
if test $? != 0;then