diff options
Diffstat (limited to 'content/posts/WIP-how-bsd-authentication-works/index.org')
-rw-r--r-- | content/posts/WIP-how-bsd-authentication-works/index.org | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/content/posts/WIP-how-bsd-authentication-works/index.org b/content/posts/WIP-how-bsd-authentication-works/index.org index b1343c1..ffe58cb 100644 --- a/content/posts/WIP-how-bsd-authentication-works/index.org +++ b/content/posts/WIP-how-bsd-authentication-works/index.org @@ -216,7 +216,7 @@ =next= field on the last =authdata= struct in =*as= to its location. It returns =0= on success. -** auth_setitem +** auth_setitem / auth_getitem #+begin_src c int auth_setitem(auth_session_t *as, auth_item_t item, char *value) #+end_src @@ -228,6 +228,12 @@ =AUTHV_ALL= and =*value= is =NULL=, all fields are cleared. It returns =0= on success. + #+begin_src c + char *auth_getitem(auth_session_t *as, auth_item_t item) + #+end_src + + =auth_getitem= is used to return the value of the fields listed above. + *** auth_item_t =auth_item_t= is an enum defined in =/include/bsd_auth.h=. @@ -334,7 +340,11 @@ #+END_SRC =auth_verify= creates an auth session using =auth_open= if =as= is - =NULL=. It then sets the user name and style of the session, if the + =NULL=. + + The =state= of the session is set to 0. + + It then sets the =name= and =style= of the session, if the respective arguments are non-=NULL=. It then copies its variable arguments to the auth session's =va_list ap=, which is used inside of =auth_call=. |