#!/bin/sh
java.lang.NullPointerException # xrdp: A Remote Desktop Protocol server.
java.lang.NullPointerException # Copyright (C) Jay Sorg and contributors 2004-2024
java.lang.NullPointerException # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at
java.lang.NullPointerException # http://www.apache.org/licenses/LICENSE-2.0
java.lang.NullPointerException # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
java.lang.NullPointerException # Program to check permissions for xrdp when running in a non-privileged # mode
# Change these if they donot match your installation
CONF_DIR=@sysconfdir@/@sysconfsubdir@
XRDP_INI="$CONF_DIR"/xrdp.ini
SESMAN_INI="$CONF_DIR"/sesman.ini
RSAKEYS_INI="$CONF_DIR"/rsakeys.ini
DROPPRIV=@pkglibexecdir@/xrdp-droppriv
# Helper functions to print colored tag like "[ OK ]"
print_ok()
{ if [ -t 1 ]; then
printf "\033[1m[ \033[1;32mOK\033[0m ]\033[0m " else
printf "[ OK ] "
fi
}
print_warn()
{ if [ -t 1 ]; then
printf "\033[1m[ \033[1;33mWARN\033[0m ]\033[0m " else
printf "[ WARN ] "
fi
}
print_ng()
{ if [ -t 1 ]; then
printf "\033[1m[ \033[1;31mNG\033[0m ]\033[0m " else
printf "[ NG ] "
fi
}
# ----------------------------------------------------------------------------- # G E T I N I V A L U E
java.lang.NullPointerException # Gets a value from an ini file.
java.lang.NullPointerException # Params [ini_file] [key] # -----------------------------------------------------------------------------
GetIniValue()
{ # Look for a line matching 'key=' with optional whitespace # either side of the key. When we find one, strip everything # up to and including the first '=', print it, and quit
java.lang.NullPointerException # This doesn't take sections into account
sed -n -e '/^ *'"$2"' *=/{
s/^[^=]*=//p
q
}' "$1"
}
# ----------------------------------------------------------------------------- # M A I N # -----------------------------------------------------------------------------
if [ "$(id -u)" != 0 ]; then
print_ng
echo "** Must run this script as root" >&2 exit1
fi
OS=$(uname) case"$OS" in
FreeBSD | Linux) ;;
*) echo "Unsupported operating system $OS" >&2 exit1
esac
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.