summaryrefslogtreecommitdiff
path: root/libexec/login_passwd
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2021-01-02 20:32:21 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2021-01-02 20:32:21 +0000
commitee592ec268059c4cd41bcd0e069b5074528e202a (patch)
tree37e18c62cba10833c65e701175f5eebab0110255 /libexec/login_passwd
parent6d05241341af64893f27e73d357f662846796ec2 (diff)
Check auth_mkvalue(3) return value for NULL (malloc failure).
For constant strings we don't actually need to use auth_mkvalue(3). Problem reported by Ross L Richardson.
Diffstat (limited to 'libexec/login_passwd')
-rw-r--r--libexec/login_passwd/login_passwd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libexec/login_passwd/login_passwd.c b/libexec/login_passwd/login_passwd.c
index 92790494489..df83a825d76 100644
--- a/libexec/login_passwd/login_passwd.c
+++ b/libexec/login_passwd/login_passwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_passwd.c,v 1.18 2020/05/15 17:25:39 millert Exp $ */
+/* $OpenBSD: login_passwd.c,v 1.19 2021/01/02 20:32:20 millert Exp $ */
/*-
* Copyright (c) 1995 Berkeley Software Design, Inc. All rights reserved.
@@ -49,7 +49,6 @@
#include <util.h>
#include <login_cap.h>
-#include <bsd_auth.h>
int
main(int argc, char *argv[])
@@ -121,7 +120,7 @@ main(int argc, char *argv[])
}
if (wheel != NULL && strcmp(wheel, "yes") != 0) {
fprintf(back, BI_VALUE " errormsg %s\n",
- auth_mkvalue("you are not in group wheel"));
+ "you are not in group wheel");
fprintf(back, BI_REJECT "\n");
exit(1);
}