diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-09-15 07:13:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-09-15 07:13:52 +0000 |
commit | 42a3e69c05af72afbc1d37574fba7729b828289b (patch) | |
tree | becf08be7a11e201542de4de93b8cd0f8650f9e1 /lib | |
parent | b74ef7bac5077f29fc1c12e8b5ccaf0e2f1f8fdc (diff) |
check return value for setenv(3) for failure, and deal appropriately
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libtelnet/kerberos.c | 11 |
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); |