mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
GT-2658 - more finishing touches
docs, exception handling, direct config file parsing instead of system property.
This commit is contained in:
parent
0ae460952e
commit
58f93ea0e7
11 changed files with 95 additions and 47 deletions
27
Ghidra/RuntimeScripts/Common/server/jaas_external_program.example.sh
Executable file
27
Ghidra/RuntimeScripts/Common/server/jaas_external_program.example.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This is a trivial example to show how the Ghidra ExternalProgramLoginModule
|
||||
# communicates with the external authenticator.
|
||||
#
|
||||
# The username and password will be supplied on STDIN separated by a newline.
|
||||
# No other data will be sent on STDIN.
|
||||
#
|
||||
# The external authenticator (this script) needs to exit with 0 (zero) error level
|
||||
# if the authentication was successful, or a non-zero error level if not successful.
|
||||
#
|
||||
|
||||
echo "Starting example JAAS external auth script" 1>&2
|
||||
|
||||
read NAME
|
||||
read PASSWORD
|
||||
|
||||
|
||||
if [[ ${NAME} =~ "bad" ]]
|
||||
then
|
||||
echo "Login failed: username has 'bad' in it: $NAME" 1>&2
|
||||
exit 100
|
||||
else
|
||||
echo "Login successful" 1>&2
|
||||
fi
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue