diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/posts/WIP-how-bsd-authentication-works/index.org | 28 |
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 |