summaryrefslogtreecommitdiffstats
path: root/content/posts/WIP-how-bsd-authentication-works/index.org
diff options
context:
space:
mode:
Diffstat (limited to 'content/posts/WIP-how-bsd-authentication-works/index.org')
-rw-r--r--content/posts/WIP-how-bsd-authentication-works/index.org21
1 files changed, 19 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 1a92943..f24693d 100644
--- a/content/posts/WIP-how-bsd-authentication-works/index.org
+++ b/content/posts/WIP-how-bsd-authentication-works/index.org
@@ -295,6 +295,14 @@
=auth_clrenv= removes all lines containing =BI_SETENV= and
=BI_UNSETENV= from =as->spool=. This is explained under the
=auth_call= section.
+
+** auth_setenv
+ #+begin_src c
+ void auth_setenv(auth_session_t *as)
+ #+end_src
+
+ =auth_setenv= scans through =as->spool=, modifying the environment
+ according to =BI_SETENV= and =BI_UNSETENV= instructions.
* auth_open
#+begin_src c
@@ -717,8 +725,17 @@
=as->rmlist= linked list.
* auth_close
- =auth_close= is the function responsible for cleaning up the session
- and taking care of the values returned though the back channel.
+ #+begin_src c
+ int auth_close(auth_session_t *as)
+ #+end_src
+
+ =auth_close= is responsible for setting the environment variables,
+ removing any files requested by the authentication module, and
+ freeing =as=.
+
+ First it saves the state in a variable =s=
+
+<<here>>
It first sets the environment variables returned through the back
channel by passing the auth session to =auth_setenv=. It then goes