mirror of
https://github.com/ovh/the-bastion.git
synced 2025-09-08 22:14:25 +08:00
Merge pull request #49 from speed47/ttyrecfreebsd
enh: freebsd: use ttyrec prebuilt static version
This commit is contained in:
commit
073bc3f7e9
3 changed files with 17 additions and 14 deletions
10
.github/workflows/freebsd.yml
vendored
10
.github/workflows/freebsd.yml
vendored
|
@ -19,17 +19,11 @@ jobs:
|
||||||
set -ex
|
set -ex
|
||||||
freebsd-version
|
freebsd-version
|
||||||
mount -o acls /
|
mount -o acls /
|
||||||
pkg install -y bash unzip rsync ca_root_nss jq fping screen flock gmake
|
pkg install -y bash rsync ca_root_nss jq fping screen flock
|
||||||
mkdir -p /opt/bastion
|
mkdir -p /opt/bastion
|
||||||
rsync -a . /opt/bastion/
|
rsync -a . /opt/bastion/
|
||||||
fetch https://github.com/ovh/ovh-ttyrec/archive/master.zip
|
|
||||||
unzip master.zip
|
|
||||||
cd ovh-ttyrec-master/
|
|
||||||
./configure
|
|
||||||
gmake
|
|
||||||
gmake install
|
|
||||||
cd ..
|
|
||||||
/opt/bastion/bin/admin/packages-check.sh -i
|
/opt/bastion/bin/admin/packages-check.sh -i
|
||||||
|
/opt/bastion/bin/admin/install-ttyrec.sh -s
|
||||||
/opt/bastion/bin/admin/install --new-install --no-wait
|
/opt/bastion/bin/admin/install --new-install --no-wait
|
||||||
ssh-keygen -t ed25519 -f id_user
|
ssh-keygen -t ed25519 -f id_user
|
||||||
ssh-keygen -t ed25519 -f id_root
|
ssh-keygen -t ed25519 -f id_root
|
||||||
|
|
|
@ -78,11 +78,11 @@ Linux distros below are tested with each release, but as this is a security prod
|
||||||
*: Note that these versions have no out-of-the-box MFA support, as they lack packaged versions of `pamtester`, `pam-google-authenticator`, or both. Of course, you may compile those yourself.
|
*: Note that these versions have no out-of-the-box MFA support, as they lack packaged versions of `pamtester`, `pam-google-authenticator`, or both. Of course, you may compile those yourself.
|
||||||
Any other so-called "modern" Linux version are not tested with each release, but should work with no or minor adjustments.
|
Any other so-called "modern" Linux version are not tested with each release, but should work with no or minor adjustments.
|
||||||
|
|
||||||
The code is also known to work correctly under:
|
The following OS are also tested with each release:
|
||||||
|
|
||||||
- FreeBSD 10+ / HardenedBSD**
|
- FreeBSD/HardenedBSD 12.1**
|
||||||
|
|
||||||
**: Note that FreeBSD has partial MFA support, due to its reduced set of available `pam` plugins. You can set it up to support an additional password or TOTP factor, but not both.
|
**: Note that these have partial MFA support, due to their reduced set of available `pam` plugins. Support for either an additional password or TOTP factor can be configured, but not both at the same time. The code is actually known to work on FreeBSD/HardenedBSD 10+, but it's only regularly tested under 12.1.
|
||||||
|
|
||||||
Other BSD variants partially work but are unsupported and discouraged as they have a severe limitation over the maximum number of supplementary groups (causing problems for group membership and restricted commands checks), no filesystem-level ACL support and missing MFA:
|
Other BSD variants partially work but are unsupported and discouraged as they have a severe limitation over the maximum number of supplementary groups (causing problems for group membership and restricted commands checks), no filesystem-level ACL support and missing MFA:
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,16 @@ set_download_url() {
|
||||||
_download() {
|
_download() {
|
||||||
curl -sL -O "$1"
|
curl -sL -O "$1"
|
||||||
}
|
}
|
||||||
|
elif command -v fetch >/dev/null; then
|
||||||
|
action_done fetch
|
||||||
|
_apicall() {
|
||||||
|
fetch -o - "$1" || true
|
||||||
|
}
|
||||||
|
_download() {
|
||||||
|
fetch "$1"
|
||||||
|
}
|
||||||
else
|
else
|
||||||
action_error "Couldn't find wget nor curl"
|
action_error "Couldn't find wget, curl nor fetch"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
action_doing "Getting latest release for arch $arch..."
|
action_doing "Getting latest release for arch $arch..."
|
||||||
|
@ -83,8 +91,9 @@ action_static() {
|
||||||
else
|
else
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
fi
|
fi
|
||||||
|
os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
set_download_url "_$arch-linux-static-binary.tar.gz"
|
set_download_url "_$arch-$os-static-binary.tar.gz"
|
||||||
prepare_temp_folder
|
prepare_temp_folder
|
||||||
|
|
||||||
_download "$url"
|
_download "$url"
|
||||||
|
@ -191,7 +200,7 @@ action_auto() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$OS_FAMILY" != "Linux" ]; then
|
if [ "$OS_FAMILY" != "Linux" ] && [ "$OS_FAMILY" != "FreeBSD" ]; then
|
||||||
echo "Sorry, your OS ($OS_FAMILY) is not supported." >&2
|
echo "Sorry, your OS ($OS_FAMILY) is not supported." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue