summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-09-15 07:13:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-09-15 07:13:52 +0000
commit42a3e69c05af72afbc1d37574fba7729b828289b (patch)
treebecf08be7a11e201542de4de93b8cd0f8650f9e1 /lib
parentb74ef7bac5077f29fc1c12e8b5ccaf0e2f1f8fdc (diff)
check return value for setenv(3) for failure, and deal appropriately
Diffstat (limited to 'lib')
-rw-r--r--lib/libtelnet/kerberos.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libtelnet/kerberos.c b/lib/libtelnet/kerberos.c
index 0f1c73ab857..b08e1bbbfcc 100644
--- a/lib/libtelnet/kerberos.c
+++ b/lib/libtelnet/kerberos.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: kerberos.c,v 1.4 2000/07/11 15:52:13 deraadt Exp $ */
-/* $Id: kerberos.c,v 1.4 2000/07/11 15:52:13 deraadt Exp $ */
+/* $OpenBSD: kerberos.c,v 1.5 2000/09/15 07:13:44 deraadt Exp $ */
+/* $Id: kerberos.c,v 1.5 2000/09/15 07:13:44 deraadt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -320,11 +320,10 @@ kerberos4_is(Authenticator *ap, unsigned char *data, int cnt)
char ts[MAXPATHLEN];
struct passwd *pw = getpwnam(UserNameRequested);
- if(pw){
+ if (pw) {
snprintf(ts, sizeof(ts),
- "%s%u",
- TKT_ROOT,
- (unsigned)pw->pw_uid);
+ "%s%u", TKT_ROOT, (unsigned)pw->pw_uid);
+ /* XXX allocation failure? */
setenv("KRBTKFILE", ts, 1);
}
Data(ap, KRB_ACCEPT, NULL, 0);