From b6db45eed57da6bc386b0a6092ce3673e92f3650 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 3 Oct 2024 21:40:17 -0500 Subject: lib: auth: Fixup error handling Signed-off-by: Ian Moffett --- lib/libostp/auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libostp') diff --git a/lib/libostp/auth.c b/lib/libostp/auth.c index b807485..13be3a8 100644 --- a/lib/libostp/auth.c +++ b/lib/libostp/auth.c @@ -134,13 +134,13 @@ session_td(void *args) /* Try user auth, not needed if REQUIRE_USER_AUTH is 0 */ if (passwd_auth(tmp->c, tmp->session_key) != 0) { free_session_key(tmp->session_key); - exit(-1); + return NULL; } /* Handle any requested session parameters */ if ((error = negotiate_spw(tmp->c, tmp->session_key)) < 0) { free_session_key(tmp->session_key); - exit(error); + return NULL; } send_motd(tmp->c, tmp->session_key); -- cgit v1.2.3