diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-29 21:21:47 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-29 21:21:47 +0000 |
commit | afb5bb43c6ba0aea58dcdf3a1a971e724a553f0e (patch) | |
tree | 92c6b71ee86f81985de076226facca800cff3738 | |
parent | bde108150a758535a27eb83964b07988bf438e25 (diff) |
Move esetenv() to misc.c since it is not specific to kerberized
telnet.
-rw-r--r-- | lib/libtelnet/kerberos.c | 12 | ||||
-rw-r--r-- | lib/libtelnet/misc.c | 13 |
2 files changed, 13 insertions, 12 deletions
diff --git a/lib/libtelnet/kerberos.c b/lib/libtelnet/kerberos.c index 2a35d5d5a2a..deeb90d43ac 100644 --- a/lib/libtelnet/kerberos.c +++ b/lib/libtelnet/kerberos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kerberos.c,v 1.7 2001/06/28 14:22:16 hin Exp $ */ +/* $OpenBSD: kerberos.c,v 1.8 2001/06/29 21:21:46 millert Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -116,16 +116,6 @@ static int auth_done; /* XXX */ static int pack_cred(CREDENTIALS *cred, unsigned char *buf); static int unpack_cred(unsigned char *buf, int len, CREDENTIALS *cred); -/* This is stolen from libroken; it's the only thing actually needed from - * libroken. - */ -void -esetenv(const char *var, const char *val, int rewrite) -{ - if (setenv ((char *)var, (char *)val, rewrite)) - errx (1, "failed setting environment variable %s", var); -} - static int check_krb4_tickets() { int ret; diff --git a/lib/libtelnet/misc.c b/lib/libtelnet/misc.c index af6e3115eed..3730c555cf6 100644 --- a/lib/libtelnet/misc.c +++ b/lib/libtelnet/misc.c @@ -34,7 +34,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/4/93"; */ /* from: static char rcsid[] = "$NetBSD: misc.c,v 1.5 1996/02/24 01:15:25 jtk Exp $"; */ -static char rcsid[] = "$OpenBSD: misc.c,v 1.4 2001/05/25 10:23:07 hin Exp $"; +static char rcsid[] = "$OpenBSD: misc.c,v 1.5 2001/06/29 21:21:46 millert Exp $"; #endif /* not lint */ /* $KTH: misc.c,v 1.15 2000/01/25 23:24:58 assar Exp $ */ @@ -42,6 +42,7 @@ static char rcsid[] = "$OpenBSD: misc.c,v 1.4 2001/05/25 10:23:07 hin Exp $"; #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <err.h> #include "misc.h" #include "auth.h" #include "encrypt.h" @@ -93,3 +94,13 @@ printd(const unsigned char *data, int cnt) ++data; } } + +/* This is stolen from libroken; it's the only thing actually needed from + * libroken. + */ +void +esetenv(const char *var, const char *val, int rewrite) +{ + if (setenv ((char *)var, (char *)val, rewrite)) + errx (1, "failed setting environment variable %s", var); +} |