Skip to content

Ghidra is a software reverse engineering (SRE) framework

Fix srvAdmin compatibility with BSD systems

zebrapurringf6217673e66c
diff --git a/Ghidra/RuntimeScripts/Linux/server/svrAdmin b/Ghidra/RuntimeScripts/Linux/server/svrAdmin
index 41ebb345b4..8ef5906033 100755
--- a/Ghidra/RuntimeScripts/Linux/server/svrAdmin
+++ b/Ghidra/RuntimeScripts/Linux/server/svrAdmin
@@ -42,7 +42,7 @@ else
fi
# Identify server process owner if set within server.conf
-OWNER="$(grep '^wrapper.app.account=' "${CONFIG}" | sed -e 's/^.*=\(.*\)\s*.*$/\1/')"
+OWNER="$(grep '^wrapper.app.account=' "${CONFIG}" | cut -d '=' -f 2)"
if [ -z "${OWNER}" -o "${OWNER}" = "$(whoami)" ]; then
VMARGS="-DUserAdmin.invocation=$(basename "${SCRIPT_FILE}")"