diff options
| -rw-r--r-- | remote/modules/pam/pam.build | 15 | ||||
| -rw-r--r-- | remote/modules/pam/pam.conf | 9 | ||||
| -rw-r--r-- | remote/modules/redsocks/data/etc/systemd/system/redsocks.service | 2 | ||||
| -rwxr-xr-x | remote/modules/redsocks/data/opt/openslx/bin/setup_proxy | 1 | ||||
| -rwxr-xr-x | remote/setup_target | 2 |
5 files changed, 23 insertions, 6 deletions
diff --git a/remote/modules/pam/pam.build b/remote/modules/pam/pam.build index 60e18414..d3c0dd88 100644 --- a/remote/modules/pam/pam.build +++ b/remote/modules/pam/pam.build @@ -5,7 +5,9 @@ fetch_source() { build() { mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin" gcc -o "$MODULE_BUILD_DIR/opt/openslx/bin/sslconnect" "$MODULE_DIR/sslconnect.c" -lssl -lcrypto -O3 || perror "Could not compile sslconnect.c" - tarcopy "$(list_packet_files | sort -u)" "${MODULE_BUILD_DIR}" + local COPYLIST="$MODULE_BUILD_DIR/list_packet_files" + list_packet_files | sort -u > "$COPYLIST" + tarcopy "$(cat "$COPYLIST")" "${MODULE_BUILD_DIR}" } post_copy() { @@ -14,10 +16,13 @@ post_copy() { fi # find libnfsidmap run-time library directory - SEARCH=$(dirname "$(list_packet_files | sort -u | grep "/libsnfsidmap/"|head -1)") - if [ -d "${SEARCH}" ]; then - tarcopy "${SEARCH}" "${TARGET_BUILD_DIR}" || pinfo "Something went wrong copying $SEARCH" - fi + #local COPYLIST="$MODULE_BUILD_DIR/list_packet_files" + #local SEARCH=$(grep "/libsnfsidmap/" "$COPYLIST" | head -1) + #[ -z "$SEARCH" ] && perror "Hä" + #SEARCH=$(dirname "$SEARCH") + #if [ -d "${SEARCH}" ]; then + # tarcopy "${SEARCH}" "${TARGET_BUILD_DIR}" || pinfo "Something went wrong copying $SEARCH" + #fi } diff --git a/remote/modules/pam/pam.conf b/remote/modules/pam/pam.conf index f932749c..bbdd610f 100644 --- a/remote/modules/pam/pam.conf +++ b/remote/modules/pam/pam.conf @@ -8,6 +8,7 @@ REQUIRED_INSTALLED_PACKAGES=" libssl-dev ldap-utils libnfsidmap2 + nfs-common " REQUIRED_CONTENT_PACKAGES=" libpam0g @@ -22,7 +23,9 @@ REQUIRED_CONTENT_PACKAGES=" krb5-config libpam-krb5 libpam-mount + ldap-utils libnfsidmap2 + nfs-common " REQUIRED_BINARIES=" rpc.gssd @@ -36,6 +39,12 @@ REQUIRED_BINARIES=" umount.crypto_LUKS ldapsearch " +REQUIRED_LIBRARIES=" + nsswitch + static + umich_ldap + libnfsidmap +" REQUIRED_DIRECTORIES=" /lib /usr/lib diff --git a/remote/modules/redsocks/data/etc/systemd/system/redsocks.service b/remote/modules/redsocks/data/etc/systemd/system/redsocks.service index 6f207586..4b30d09e 100644 --- a/remote/modules/redsocks/data/etc/systemd/system/redsocks.service +++ b/remote/modules/redsocks/data/etc/systemd/system/redsocks.service @@ -4,6 +4,6 @@ Description=Transparent redirector of any TCP connection to proxy using your fir [Service] Type=forking PIDFile=/run/redsocks.pid -ExecStart=/bin/redsocks -c /etc/redsocks.conf -p /run/redsocks.pid +ExecStart=/sbin/redsocks -c /etc/redsocks.conf -p /run/redsocks.pid ExecStopPost=/bin/rm /run/redsocks.pid Restart=on-abort diff --git a/remote/modules/redsocks/data/opt/openslx/bin/setup_proxy b/remote/modules/redsocks/data/opt/openslx/bin/setup_proxy index 8fa5721c..5dc22a14 100755 --- a/remote/modules/redsocks/data/opt/openslx/bin/setup_proxy +++ b/remote/modules/redsocks/data/opt/openslx/bin/setup_proxy @@ -20,6 +20,7 @@ sed -i "s/%%PROXY_IP%%/$SLX_PROXY_IP/g;s/%%PROXY_PORT%%/$SLX_PROXY_PORT/g;s/%%PR systemctl start redsocks iptables -t nat -N REDSOCKS +iptables -t nat -A REDSOCKS -d "$SLX_PROXY_IP" -j RETURN iptables -t nat -A REDSOCKS -d 0.0.0.0/8 -j RETURN iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN diff --git a/remote/setup_target b/remote/setup_target index d193638a..da4b7701 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -135,6 +135,8 @@ copy_files_with_deps () { else pdebug "\tFound ${FILENAME} at ${FILE}" fi + elif [ "$(echo $FILE_CANDIDATES | wc -w)" -eq 0 ]; then + perror "Could not find required binary $FILENAME" else # one candidate FINAL_LIST=${FILE_CANDIDATES} |
