summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorDante Catalfamo2020-10-29 16:39:28 -0400
committerDante Catalfamo2020-10-29 16:39:28 -0400
commit68fbc7c7e9a4a0b32ce2da3ac5475a5dfb5aa7d5 (patch)
treefe4e24da94ed483714fa6c19c5d151c6ed095f59 /content
parente40a9a890db25513f20afca9c195be1e8af01ac2 (diff)
downloadblog-68fbc7c7e9a4a0b32ce2da3ac5475a5dfb5aa7d5.tar.gz
blog-68fbc7c7e9a4a0b32ce2da3ac5475a5dfb5aa7d5.tar.bz2
blog-68fbc7c7e9a4a0b32ce2da3ac5475a5dfb5aa7d5.zip
bsd-auth: work on auth_verify, auth_getitem
Diffstat (limited to 'content')
-rw-r--r--content/posts/WIP-how-bsd-authentication-works/index.org14
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=.