diff --git a/README.md b/README.md index de80d8ea..d56b236a 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,9 @@ The installation script and the update-designer.sh script set environment variab so you may want to logout/login, or start a new bash shell before using Labtainers the first time. +July 26, 2024 +- Modify capinout to not use grantpt clib function, which now seems to crash when run from a container. + July 22, 2024 - Add a base container for Ubuntu22 and changes to framework to support that. diff --git a/scripts/designer/templates/dockerfiles/Dockerfile.template.base3.student b/scripts/designer/templates/dockerfiles/Dockerfile.template.base3.student index 774bf8c0..0bf52709 100644 --- a/scripts/designer/templates/dockerfiles/Dockerfile.template.base3.student +++ b/scripts/designer/templates/dockerfiles/Dockerfile.template.base3.student @@ -45,7 +45,7 @@ RUN /usr/bin/apt-source.sh ADD $labdir/$imagedir/sys_tar/sys.tar / ADD $labdir/sys_$lab.tar.gz / # -RUN deluser --remove-home ubuntu` +RUN deluser --remove-home ubuntu RUN useradd -ms /bin/bash $user_name RUN echo "$user_name:$password" | chpasswd RUN adduser $user_name sudo diff --git a/testsets/bin/test-ubuntu24.sh b/testsets/bin/test-ubuntu24.sh new file mode 100755 index 00000000..313462f4 --- /dev/null +++ b/testsets/bin/test-ubuntu24.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Start the Ubuntu 24 smoke test with the results of the latest mkall +# +isrunning=$(./vbox-client.py "list runningvms") +echo "isrunning $isrunning" +ok=$(echo $isrunning | grep -c "LabtainerVM24-smoketest") +if [[ $ok != 0 ]]; then + echo "ERROR: Is already running: $isrunning" + exit 1 +fi +vmdir="/media/sf_SEED/test_vms/ubuntu24smoke/" +if [[ "$1" != "-n" ]]; then + mkdir -p $vmdir + cp testvm-do.sh $vmdir/dothis.sh + chmod a+x $vmdir/dothis.sh + if [[ "$1" != "-t" ]]; then + branch=$(git rev-parse --abbrev-ref HEAD) + sed -i "s/REPLACE_THIS/$branch/" $vmdir/dothis.sh + else + sed -i "s/REPLACE_THIS/premaster/" $vmdir/dothis.sh + fi +else + echo "Leaving the dothis.sh file as it was." +fi +tlist="labtainer.tar labtainer-master.tar labtainer-tests.tar" +for t in $tlist; do + cp /media/sf_SEED/$t $vmdir +done + +./vbox-client.py "startvm LabtainerVM24-smoketest" diff --git a/tool-src/capinout/mypty2.cpp b/tool-src/capinout/mypty2.cpp index eea47061..d85a1375 100644 --- a/tool-src/capinout/mypty2.cpp +++ b/tool-src/capinout/mypty2.cpp @@ -172,12 +172,12 @@ int getMaster() return -1; } - rc = grantpt(fdm); - if (rc != 0) - { - fprintf(stderr, "Error %d on grantpt()\n", errno); - return -1; - } + //rc = grantpt(fdm); + //if (rc != 0) + //{ + // fprintf(stderr, "Error %d on grantpt()\n", errno); + // return -1; + //} rc = unlockpt(fdm); if (rc != 0)