diff options
author | 2015-08-31 02:53:56 +0000 | |
---|---|---|
committer | 2015-08-31 02:53:56 +0000 | |
commit | 9b9d2a55a62c8e82206c25f94fcc7f4e2765250e (patch) | |
tree | 4e1fa28e81f1f4b2467c7facbde18ea61addb735 /lib/libc/gen/authenticate.c | |
parent | spaces snuck in (diff) | |
download | wireguard-openbsd-9b9d2a55a62c8e82206c25f94fcc7f4e2765250e.tar.xz wireguard-openbsd-9b9d2a55a62c8e82206c25f94fcc7f4e2765250e.zip |
Add framework for resolving (pun intended) libc namespace issues, using
wrapper .h files and asm labels to let internal calls resolve directly and
not be overridable or use the PLT. Then, apply that framework to most of
the functions in stdio.h, string.h, err.h, and wchar.h. Delete the
should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.
tests clean on i386, amd64, sparc64, powerpc, and mips64
naming feedback from kettenis@ and millert@
ok kettenis@
Diffstat (limited to 'lib/libc/gen/authenticate.c')
-rw-r--r-- | lib/libc/gen/authenticate.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/gen/authenticate.c b/lib/libc/gen/authenticate.c index 37c178540a2..4ab4a600b64 100644 --- a/lib/libc/gen/authenticate.c +++ b/lib/libc/gen/authenticate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authenticate.c,v 1.21 2015/08/27 13:33:24 dlg Exp $ */ +/* $OpenBSD: authenticate.c,v 1.22 2015/08/31 02:53:57 guenther Exp $ */ /*- * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. @@ -193,7 +193,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) else { if ((pwd = getpwuid(getuid())) == NULL) { syslog(LOG_ERR, "no such user id %u", getuid()); - _warnx("cannot approve who we don't recognize"); + warnx("cannot approve who we don't recognize"); return (0); } name = pwd->pw_name; @@ -207,7 +207,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) if (strlen(name) >= PATH_MAX) { syslog(LOG_ERR, "username to login %.*s...", PATH_MAX, name); - _warnx("username too long"); + warnx("username too long"); return (0); } if (pwd == NULL && (approve = strchr(name, '.')) != NULL) { @@ -217,7 +217,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) } lc = login_getclass(pwd ? pwd->pw_class : NULL); if (lc == NULL) { - _warnx("unable to classify user"); + warnx("unable to classify user"); return (0); } } @@ -234,7 +234,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) login_close(lc); syslog(LOG_ERR, "approval path too long %.*s...", PATH_MAX, type); - _warnx("approval script path too long"); + warnx("approval script path too long"); return (0); } } @@ -246,7 +246,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) if (close_lc_on_exit) login_close(lc); syslog(LOG_ERR, "Invalid %s script: %s", s, approve); - _warnx("invalid path to approval script"); + warnx("invalid path to approval script"); free(approve); return (0); } @@ -255,7 +255,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) if (close_lc_on_exit) login_close(lc); syslog(LOG_ERR, "%m"); - _warn(NULL); + warn(NULL); if (approve) free(approve); return (0); @@ -264,7 +264,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) auth_setstate(as, AUTH_OKAY); if (auth_setitem(as, AUTHV_NAME, name) < 0) { syslog(LOG_ERR, "%m"); - _warn(NULL); + warn(NULL); goto out; } if (auth_check_expire(as) < 0) /* is this account expired */ |