From 65f11276c9f79a6443cedae4f9a8c1f88a5816eb Mon Sep 17 00:00:00 2001 From: Dante Catalfamo Date: Mon, 2 Nov 2020 17:10:08 -0500 Subject: auth_getvalue added --- .../posts/WIP-how-bsd-authentication-works/index.org | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'content/posts/WIP-how-bsd-authentication-works') diff --git a/content/posts/WIP-how-bsd-authentication-works/index.org b/content/posts/WIP-how-bsd-authentication-works/index.org index 6126207..87339b4 100644 --- a/content/posts/WIP-how-bsd-authentication-works/index.org +++ b/content/posts/WIP-how-bsd-authentication-works/index.org @@ -306,7 +306,17 @@ ** auth_getvalue - <> + #+BEGIN_SRC c + char *auth_getvalue(auth_session_t *as, char *what) + #+END_SRC + + =auth_getvalue= scans =as->spool= looking for lines beginning with + =BI_VALUE=. It then checks if the next word is equal to =what=. + + When it finds the desired line, it duplicates the string, converts + escape sequences in the value, and returns the newly created + string. + * auth_open #+begin_src c @@ -652,11 +662,6 @@ =okay= is then returned to the caller. - - # Write about =auth_getvalue= - - <> - ** _auth_next_arg #+BEGIN_SRC c static char *_auth_next_arg(auth_session_t *as) -- cgit v1.2.3