diff options
author | Dante Catalfamo | 2020-10-31 14:01:46 -0400 |
---|---|---|
committer | Dante Catalfamo | 2020-10-31 14:01:46 -0400 |
commit | 1576df8aa182a2536d21a186edc401847ae43250 (patch) | |
tree | ce410ff48bd76125e78e39a00d5c8f8401771506 /content | |
parent | 5064e2bb192682bd81cebb97056b56fb07d4dd3f (diff) | |
download | blog-1576df8aa182a2536d21a186edc401847ae43250.tar.gz blog-1576df8aa182a2536d21a186edc401847ae43250.tar.bz2 blog-1576df8aa182a2536d21a186edc401847ae43250.zip |
Add auth_setenv
Diffstat (limited to 'content')
-rw-r--r-- | content/posts/WIP-how-bsd-authentication-works/index.org | 21 |
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 |