summaryrefslogtreecommitdiffstats
path: root/content/posts/how-bsd-authentication-works/index.org
diff options
context:
space:
mode:
authorDante Catalfamo2020-07-03 20:19:56 -0400
committerDante Catalfamo2020-07-03 20:19:56 -0400
commit2052394aad4702e90fb28f4cfa499b33559e33d2 (patch)
treebec5b7087f8749bc66968701cc2cf1493075cbb3 /content/posts/how-bsd-authentication-works/index.org
parent4bcbb7541f0e08ec24ec38a895e29d32a1e60dd7 (diff)
downloadblog-2052394aad4702e90fb28f4cfa499b33559e33d2.tar.gz
blog-2052394aad4702e90fb28f4cfa499b33559e33d2.tar.bz2
blog-2052394aad4702e90fb28f4cfa499b33559e33d2.zip
give auth_open its own paragraph
Diffstat (limited to 'content/posts/how-bsd-authentication-works/index.org')
-rw-r--r--content/posts/how-bsd-authentication-works/index.org14
1 files changed, 10 insertions, 4 deletions
diff --git a/content/posts/how-bsd-authentication-works/index.org b/content/posts/how-bsd-authentication-works/index.org
index b047b29..46b804a 100644
--- a/content/posts/how-bsd-authentication-works/index.org
+++ b/content/posts/how-bsd-authentication-works/index.org
@@ -195,6 +195,13 @@
};
#+END_SRC
+* auth_open
+
+ The =auth_open= function is used by several functions to create a
+ new auth session. It allocates an =auth_session_t= struct on the
+ heap, sets its default =service= to =login=, and it's =fd= to =-1=,
+ and returns the pointer.
+
* auth_usercheck
#+BEGIN_SRC c
@@ -205,10 +212,9 @@
checks the login class against the =login.conf= db, along with
confirming the login styles available.
- If the password is non-=NULL=, then it calls =auth_open=, which
- allocates and returns the pointer to an =auth_session_t=, and sets its
- default =service= to =login=, and it's =fd= to =-1=. After that's
- returned, =auth_usercheck= calls (with =as= as the session struct)
+ If the password is non-=NULL=, then it creates a new session using
+ =auth_open=. With the new session, =auth_usercheck= calls (with =as=
+ as the session struct)
#+BEGIN_SRC c
auth_setitem(as, AUTHV_SERVICE, "response");