diff options
author | Dante Catalfamo | 2021-05-28 16:00:14 -0400 |
---|---|---|
committer | Dante Catalfamo | 2021-05-28 16:00:14 -0400 |
commit | d71cd194393a9615674b1a7c2433cfd290f6d8f0 (patch) | |
tree | e4f4442b43ac20fccc6855c66e3aef8431e4d5cc | |
parent | 93f94dfe79a2ad5fd558b1822ab70cfe9dac4fe6 (diff) | |
download | blog-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.org | 17 |
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: |