Fixed issue where remote sessions could be authenticated through howdy
This commit is contained in:
parent
b5c715df9a
commit
8180dafdaf
2 changed files with 9 additions and 1 deletions
|
|
@ -9,6 +9,9 @@ no_confirmation = false
|
||||||
# show an error but fail silently
|
# show an error but fail silently
|
||||||
suppress_unknown = false
|
suppress_unknown = false
|
||||||
|
|
||||||
|
# Disable Howdy in remote shells
|
||||||
|
ignore_ssh = true
|
||||||
|
|
||||||
# Auto dismiss lock screen on confirmation
|
# Auto dismiss lock screen on confirmation
|
||||||
# Will run loginctl unlock-sessions after every auth
|
# Will run loginctl unlock-sessions after every auth
|
||||||
# Expirimental, can behave incorrectly on some systems
|
# Expirimental, can behave incorrectly on some systems
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,11 @@ def doAuth(pamh):
|
||||||
if config.get("core", "disabled") == "true":
|
if config.get("core", "disabled") == "true":
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
# Abort if we're in a remote SSH env
|
||||||
|
if config.get("core", "ignore_ssh") == "true":
|
||||||
|
if "SSH_CONNECTION" in os.environ or "SSH_CLIENT" in os.environ or "SSHD_OPTS" in os.environ:
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
# Run compare as python3 subprocess to circumvent python version and import issues
|
# Run compare as python3 subprocess to circumvent python version and import issues
|
||||||
status = subprocess.call(["python3", os.path.dirname(os.path.abspath(__file__)) + "/compare.py", pamh.get_user()])
|
status = subprocess.call(["python3", os.path.dirname(os.path.abspath(__file__)) + "/compare.py", pamh.get_user()])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue