summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-07-02 19:22:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-07-02 19:22:35 +0000
commitadf9057e8e5d9b01ad93c03f8febd4119a51339e (patch)
tree1065db57f7240dd7de7b3a976ede939e958a6218 /lib
parent1e28adab099984a75f106496c93034ef893cb5b6 (diff)
Convert warn/warnx -> _warn/_warnx
Should not really spew to stderr from libc but right now there is no other way to get a sensible error message to the user.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/auth_subr.c12
-rw-r--r--lib/libc/gen/authenticate.c14
2 files changed, 13 insertions, 13 deletions
diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c
index f9f70c09ce3..bfce363263a 100644
--- a/lib/libc/gen/auth_subr.c
+++ b/lib/libc/gen/auth_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth_subr.c,v 1.5 2001/06/24 21:18:14 millert Exp $ */
+/* $OpenBSD: auth_subr.c,v 1.6 2001/07/02 19:22:34 millert Exp $ */
/*-
* Copyright (c) 1995,1996,1997 Berkeley Software Design, Inc.
@@ -319,7 +319,7 @@ auth_setenv(auth_session_t *as)
for (; isblank(*line); ++line)
;
if (*line != '\0' && setenv(name, line, 1))
- warn("setenv(%s, %s)", name, line);
+ _warn("setenv(%s, %s)", name, line);
}
} else
if (!strncasecmp(line, BI_UNSETENV, sizeof(BI_UNSETENV)-1)) {
@@ -787,13 +787,13 @@ auth_call(auth_session_t *as, char *path, ...)
if (secure_path(path) < 0) {
syslog(LOG_ERR, "%s: path not secure", path);
- warnx("invalid script: %s", path);
+ _warnx("invalid script: %s", path);
goto fail;
}
if (socketpair(PF_LOCAL, SOCK_STREAM, 0, pfd) < 0) {
syslog(LOG_ERR, "unable to create backchannel %m");
- warnx("internal resource failure");
+ _warnx("internal resource failure");
goto fail;
}
@@ -802,7 +802,7 @@ auth_call(auth_session_t *as, char *path, ...)
close(pfd[0]);
close(pfd[1]);
syslog(LOG_ERR, "%s: %m", path);
- warnx("internal resource failure");
+ _warnx("internal resource failure");
goto fail;
case 0:
#define COMM_FD 3
@@ -834,7 +834,7 @@ auth_call(auth_session_t *as, char *path, ...)
close(pfd[0]);
if (waitpid(pid, &status, 0) < 0) {
syslog(LOG_ERR, "%s: waitpid: %m", path);
- warnx("internal failure");
+ _warnx("internal failure");
goto fail;
}
diff --git a/lib/libc/gen/authenticate.c b/lib/libc/gen/authenticate.c
index e21b74fe541..238400c1804 100644
--- a/lib/libc/gen/authenticate.c
+++ b/lib/libc/gen/authenticate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authenticate.c,v 1.3 2001/06/24 21:18:15 millert Exp $ */
+/* $OpenBSD: authenticate.c,v 1.4 2001/07/02 19:22:34 millert Exp $ */
/*-
* Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
@@ -185,7 +185,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 %d", getuid());
- warnx("cannot approve who we don't recognize");
+ _warnx("cannot approve who we don't recognize");
return (0);
}
name = pwd->pw_name;
@@ -198,7 +198,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type)
if (strlen(name) >= MAXPATHLEN) {
syslog(LOG_ERR, "username to login %.*s...",
MAXPATHLEN, name);
- warnx("username too long");
+ _warnx("username too long");
return (0);
}
if (pwd == NULL && (approve = strchr(name, '.')) != NULL) {
@@ -208,7 +208,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);
}
}
@@ -229,7 +229,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");
return (0);
}
@@ -237,14 +237,14 @@ 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");
- warnx(NULL);
+ _warn(NULL);
return (0);
}
auth_setstate(as, AUTH_OKAY);
if (auth_setitem(as, AUTHV_NAME, name) < 0) {
syslog(LOG_ERR, "%m");
- warnx(NULL);
+ _warn(NULL);
goto out;
}
if (auth_check_expire(as)) /* is this account expired */