summaryrefslogtreecommitdiffstats
path: root/content/posts/WIP-how-bsd-authentication-works
diff options
context:
space:
mode:
authorDante Catalfamo2020-10-28 17:21:11 -0400
committerDante Catalfamo2020-10-28 17:21:11 -0400
commitf5d17175232744e6d20ee76333c4e6c2437398a4 (patch)
tree258d362a70c3bf0b852dd11261fc8cc961273707 /content/posts/WIP-how-bsd-authentication-works
parent08387a0d2f6c9afcf139286b054a79f1a94b5c98 (diff)
downloadblog-f5d17175232744e6d20ee76333c4e6c2437398a4.tar.gz
blog-f5d17175232744e6d20ee76333c4e6c2437398a4.tar.bz2
blog-f5d17175232744e6d20ee76333c4e6c2437398a4.zip
More work on auth_subr components
Diffstat (limited to 'content/posts/WIP-how-bsd-authentication-works')
-rw-r--r--content/posts/WIP-how-bsd-authentication-works/index.org28
1 files changed, 22 insertions, 6 deletions
diff --git a/content/posts/WIP-how-bsd-authentication-works/index.org b/content/posts/WIP-how-bsd-authentication-works/index.org
index 4126284..fdf2e99 100644
--- a/content/posts/WIP-how-bsd-authentication-works/index.org
+++ b/content/posts/WIP-how-bsd-authentication-works/index.org
@@ -37,8 +37,9 @@
This one is pretty difficult, since there seems to be very little
information about how BSD Auth works apart from the source code
- itself. This is my best attempt to understand the flow of BSD Auth
- from what I've read.
+ itself and the man pages, which I found to be a little confusing.
+ This is my best attempt to understand the flow of BSD Auth from what
+ I've read.
* BSD Auth Modules
@@ -196,18 +197,33 @@
#+END_SRC
** auth_setdata
+ #+begin_src c
+ int auth_setdata(auth_session_t *as, void *ptr, size_t len)
+ #+end_src
+
+ =auth_setdata= allocates and initializes a new =authdata= struct,
+ storing a copy of the data from =*ptr= and =len=. It then point the
+ =next= field on the last =authdata= struct in =*as= to its
+ location.
** auth_setitem
+ #+begin_src c
+ int auth_setitem(auth_session_t *as, auth_item_t item, char *value)
+ #+end_src
** auth_setoption
** auth_setstate
* 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.
+ #+begin_src c
+ auth_session_t *auth_open(void)
+ #+end_src
+
+ =auth_open= 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=, it's =fd= to =-1=, and returns the
+ pointer.
* auth_usercheck