summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDante Catalfamo2021-05-30 17:30:52 -0400
committerDante Catalfamo2021-05-30 17:30:52 -0400
commit61288c6db0556983237a842a0bb394b8cf854ad2 (patch)
tree7537f8c6cd79e5d9c5ba2e8d1ae85b91e87d0526
parent530e3baf92291bd8985e8478c285a2ff196caaf5 (diff)
downloadblog-61288c6db0556983237a842a0bb394b8cf854ad2.tar.gz
blog-61288c6db0556983237a842a0bb394b8cf854ad2.tar.bz2
blog-61288c6db0556983237a842a0bb394b8cf854ad2.zip
bsd-auth: Begin adding links to the man pages
-rw-r--r--content/posts/WIP-how-bsd-authentication-works/index.org44
1 files changed, 39 insertions, 5 deletions
diff --git a/content/posts/WIP-how-bsd-authentication-works/index.org b/content/posts/WIP-how-bsd-authentication-works/index.org
index 284f60b..5a51d11 100644
--- a/content/posts/WIP-how-bsd-authentication-works/index.org
+++ b/content/posts/WIP-how-bsd-authentication-works/index.org
@@ -174,7 +174,7 @@
:CUSTOM_ID: auth_userokay
:END:
- =auth_userokay= is the highest level function, and easiest to use.
+ [[https://man.openbsd.org/authenticate.3#auth_userokay][=auth_userokay=]] is the highest level function, and easiest to use.
It takes four character arrays as arguments, =name=, =style=,
=type=, and =password=. It returns either a =0= for failure, of a
non-zero value for success.
@@ -316,7 +316,7 @@
#+end_src
@@html: </details> @@
- =auth_setdata= allocates and initializes a new =authdata= struct,
+ [[https://man.openbsd.org/auth_subr.3#auth_setdata~2][=auth_setdata=]] allocates and initializes a new =authdata= struct,
storing a copy of the data from =*ptr= and =len=. It then point the
=next= field on the last =authdata= struct in =*as= to its
location. It returns =0= on success.
@@ -419,13 +419,47 @@
#+end_src
@@html: </details> @@
- =auth_setitem= is used to set one of several different fields of
- =*as= to =*value=. Depending on the value of =item=, it can be the
+ [[https://man.openbsd.org/auth_subr.3#auth_setitem][=auth_setitem=]] is used to set one of several different fields of
+ =as= to =value=. Depending on the value of =item=, it can be the
=challenge=, =class=, =name=, =service=, =style=, or =interactive=
field. If =*value= is =NULL=, it clears that field. If =item= is
=AUTHV_ALL= and =*value= is =NULL=, all fields are cleared. It
returns =0= on success.
+ #+CAPTION: Taken from [[https://man.openbsd.org/auth_subr.3#auth_getitem][=auth_subr(3)=]]
+ #+begin_src text
+ AUTH_CHALLENGE
+ The latest challenge, if any, set for the session.
+
+ AUTH_CLASS
+ The class of the user, as defined by the /etc/login.conf file.
+ This value is not directly used by BSD Authentication, rather, it
+ is passed to the login scripts for their possible use.
+
+ AUTH_INTERACTIVE
+ If set to any value, then the session is tagged as interactive. If
+ not set, the session is not interactive. When the value is
+ requested it is always either NULL or “True”. The auth subroutines
+ may choose to provide additional information to standard output or
+ standard error when the session is interactive. There is no
+ functional change in the operation of the subroutines.
+
+ AUTH_NAME
+ The name of the user being authenticated. The name should include
+ the instance, if any, that is being requested.
+
+ AUTH_SERVICE
+ The service requesting the authentication. Initially it is set to
+ the default service which provides the traditional interactive
+ service.
+
+ AUTH_STYLE
+ The style of authentication being performed, as defined by the
+ /etc/login.conf file. The style determines which login script
+ should actually be used.
+ #+end_src
+
+
@@html: <details> <summary> @@
#+begin_src c
char *auth_getitem(auth_session_t *as, auth_item_t item)
@@ -456,7 +490,7 @@
#+end_src
@@html: </details> @@
- =auth_getitem= is used to return the value of the fields listed above.
+ [[https://man.openbsd.org/auth_subr.3#auth_getitem][=auth_getitem=]] is used to return the value of the fields listed above.
*** auth_item_t
:PROPERTIES: