summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDante Catalfamo2021-05-28 16:00:14 -0400
committerDante Catalfamo2021-05-28 16:00:14 -0400
commitd71cd194393a9615674b1a7c2433cfd290f6d8f0 (patch)
treee4f4442b43ac20fccc6855c66e3aef8431e4d5cc
parent93f94dfe79a2ad5fd558b1822ab70cfe9dac4fe6 (diff)
downloadblog-d71cd194393a9615674b1a7c2433cfd290f6d8f0.tar.gz
blog-d71cd194393a9615674b1a7c2433cfd290f6d8f0.tar.bz2
blog-d71cd194393a9615674b1a7c2433cfd290f6d8f0.zip
bsd-auth: add func def for last function mentioned so far
-rw-r--r--content/posts/WIP-how-bsd-authentication-works/index.org17
1 files changed, 17 insertions, 0 deletions
diff --git a/content/posts/WIP-how-bsd-authentication-works/index.org b/content/posts/WIP-how-bsd-authentication-works/index.org
index b2e3da1..678ef6b 100644
--- a/content/posts/WIP-how-bsd-authentication-works/index.org
+++ b/content/posts/WIP-how-bsd-authentication-works/index.org
@@ -2106,6 +2106,23 @@
:CUSTOM_ID: _auth_validuser
:END:
+ @@html: <details> <summary> @@
+ #+begin_src c
+ int _auth_validuser(const char *name)
+ #+end_src
+ @@html: </summary> @@
+ #+begin_src c
+ {
+ /* User name must be specified and may not start with a '-'. */
+ if (*name == '\0' || *name == '-') {
+ syslog(LOG_ERR, "invalid user name %s", name);
+ return 0;
+ }
+ return 1;
+ }
+ #+end_src
+ @@html: </details> @@
+
* COMMENT note :noexport: