From edd9de07ffd297a8b6a5724e61d202a9a7c0c0b5 Mon Sep 17 00:00:00 2001 From: Dante Catalfamo Date: Sat, 27 Jun 2020 03:11:26 -0400 Subject: More work towards bsd auth post --- content/posts/how-bsd-authentication-works/graph.dot | 2 +- content/posts/how-bsd-authentication-works/index.org | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'content/posts') diff --git a/content/posts/how-bsd-authentication-works/graph.dot b/content/posts/how-bsd-authentication-works/graph.dot index a07e3ec..6414b11 100644 --- a/content/posts/how-bsd-authentication-works/graph.dot +++ b/content/posts/how-bsd-authentication-works/graph.dot @@ -52,7 +52,7 @@ digraph G { auth_verify -> auth_setstate; auth_verify -> auth_call; - auth_call -> execve; + auth_call -> execve[label="fork()"]; // auth_call -> _auth_spool; execve -> login; diff --git a/content/posts/how-bsd-authentication-works/index.org b/content/posts/how-bsd-authentication-works/index.org index 20b825f..29a9d62 100644 --- a/content/posts/how-bsd-authentication-works/index.org +++ b/content/posts/how-bsd-authentication-works/index.org @@ -68,9 +68,23 @@ The return codes are defined inside of =login_cap.h= as =auth_userokay= is just a wrapper around =auth_usercheck=, which returns a finished auth session of type =auth_session_t=. It closes -the auth session and returns the value returned from =auth_close=. +the auth session using =auth_close= and returns the value returned +from closing. -=auth_usercheck= +=auth_usercheck= checks the user name against the passwd db. It also +checks the login class against the =login.conf= db, along with +confirming the login styles available. + +#+begin_quote +Validates the checks that the user exists, gets the user's login +class, verifies the auth type, and that the auth style can be used. + +It creates an auth session struct. + +If the password is provided it sets the service type to =response=, +and adds the adds the password to the auth data. Otherwise it +leaves it empty. +#+end_quote From there it calls a couple other functions, constructing and filling out an =auth_session_t= struct using the =auth_set*= -- cgit v1.2.3