diff options
author | Stanislav Sedov <stas@FreeBSD.org> | 2012-03-22 08:48:42 +0000 |
---|---|---|
committer | Stanislav Sedov <stas@FreeBSD.org> | 2012-03-22 08:48:42 +0000 |
commit | ae77177087c655fc883075af4f425b37e032cd05 (patch) | |
tree | 5518cb944fa25f627a797b58451ccf506b720fcf /crypto/heimdal/appl/telnet/telnet/utilities.c | |
parent | 5730afc9b6405f9325dfbbf7164dd6c818191ff5 (diff) | |
parent | 813b7899c1cf9c5cd1b72c0fb7c6c740aab26929 (diff) | |
download | src-ae77177087c655fc883075af4f425b37e032cd05.tar.gz src-ae77177087c655fc883075af4f425b37e032cd05.zip |
- Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
o kgetcred(1) allows one to manually get a ticket for a particular service.
o kf(1) securily forwards ticket to another host through an authenticated
and encrypted stream.
o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
and other user kerberos operations. klist and kswitch are just symlinks
to kcc(1) now.
o kswitch(1) allows you to easily switch between kerberos credentials if
you're running KCM.
o hxtool(1) is a certificate management tool to use with PKINIT.
o string2key(1) maps a password into key.
o kdigest(8) is a userland tool to access the KDC's digest interface.
o kimpersonate(8) creates a "fake" ticket for a service.
We also now install manpages for some lirbaries that were not installed
before, libheimntlm and libhx509.
- The new HEIMDAL version no longer supports Kerberos 4. All users are
recommended to switch to Kerberos 5.
- Weak ciphers are now disabled by default. To enable DES support (used
by telnet(8)), use "allow_weak_crypto" option in krb5.conf.
- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
disabled due to the function they use (krb5_get_err_text(3)) being
deprecated. I plan to work on this next.
- Heimdal's KDC now require sqlite to operate. We use the bundled version
and install it as libheimsqlite. If some other FreeBSD components will
require it in the future we can rename it to libbsdsqlite and use for these
components as well.
- This is not a latest Heimdal version, the new one was released while I was
working on the update. I will update it to 1.5.2 soon, as it fixes some
important bugs and security issues.
Notes
Notes:
svn path=/head/; revision=233294
Diffstat (limited to 'crypto/heimdal/appl/telnet/telnet/utilities.c')
-rw-r--r-- | crypto/heimdal/appl/telnet/telnet/utilities.c | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/crypto/heimdal/appl/telnet/telnet/utilities.c b/crypto/heimdal/appl/telnet/telnet/utilities.c index d62d572a5fe4..0ac31c9ebd9d 100644 --- a/crypto/heimdal/appl/telnet/telnet/utilities.c +++ b/crypto/heimdal/appl/telnet/telnet/utilities.c @@ -37,7 +37,7 @@ #include "telnet_locl.h" -RCSID("$Id: utilities.c 10587 2001-08-29 00:45:23Z assar $"); +RCSID("$Id$"); FILE *NetTrace = 0; /* Not in bss, since needs to stay */ int prettydump; @@ -248,8 +248,20 @@ optionstatus(void) } +static void __attribute__((format (printf, 3, 4))) +qprintf(int quote, FILE *f, const char *fmt, ...) + +{ + va_list va; + if (quote) + fprintf(f, "\" "); + va_start(va, fmt); + vfprintf(f, fmt, va); + va_end(va); +} + void -printsub(int direction, unsigned char *pointer, int length) +printsub(int direction, unsigned char *pointer, size_t length) { int i; unsigned char buf[512]; @@ -295,7 +307,9 @@ printsub(int direction, unsigned char *pointer, int length) fprintf(NetTrace, "TERMINAL-TYPE "); switch (pointer[1]) { case TELQUAL_IS: - fprintf(NetTrace, "IS \"%.*s\"", length-2, (char *)pointer+2); + fprintf(NetTrace, "IS \"%.*s\"", + (int)(length-2), + (char *)pointer+2); break; case TELQUAL_SEND: fprintf(NetTrace, "SEND"); @@ -315,7 +329,7 @@ printsub(int direction, unsigned char *pointer, int length) switch (pointer[1]) { case TELQUAL_IS: fprintf(NetTrace, " IS "); - fprintf(NetTrace, "%.*s", length-2, (char *)pointer+2); + fprintf(NetTrace, "%.*s", (int)(length-2), (char *)pointer+2); break; default: if (pointer[1] == 1) @@ -696,7 +710,7 @@ printsub(int direction, unsigned char *pointer, int length) fprintf(NetTrace, "X-DISPLAY-LOCATION "); switch (pointer[1]) { case TELQUAL_IS: - fprintf(NetTrace, "IS \"%.*s\"", length-2, (char *)pointer+2); + fprintf(NetTrace, "IS \"%.*s\"", (int)(length-2), (char *)pointer+2); break; case TELQUAL_SEND: fprintf(NetTrace, "SEND"); @@ -726,57 +740,44 @@ printsub(int direction, unsigned char *pointer, int length) fprintf(NetTrace, "INFO "); env_common: { - int noquote = 2; + int quote = 0; for (i = 2; i < length; i++ ) { switch (pointer[i]) { - case NEW_ENV_VALUE: -#ifdef OLD_ENVIRON - /* case NEW_ENV_OVAR: */ - if (pointer[0] == TELOPT_OLD_ENVIRON) { - fprintf(NetTrace, "\" VAR " + noquote); - } else -#endif /* OLD_ENVIRON */ - fprintf(NetTrace, "\" VALUE " + noquote); - noquote = 2; + case NEW_ENV_VAR: + qprintf(quote, NetTrace, "VAR "); + quote = 0; break; - case NEW_ENV_VAR: -#ifdef OLD_ENVIRON - /* case OLD_ENV_VALUE: */ - if (pointer[0] == TELOPT_OLD_ENVIRON) { - fprintf(NetTrace, "\" VALUE " + noquote); - } else -#endif /* OLD_ENVIRON */ - fprintf(NetTrace, "\" VAR " + noquote); - noquote = 2; + case NEW_ENV_VALUE: + qprintf(quote, NetTrace, "VALUE"); + quote = 0; break; case ENV_ESC: - fprintf(NetTrace, "\" ESC " + noquote); - noquote = 2; + qprintf(quote, NetTrace, "ESC "); + quote = 0; break; case ENV_USERVAR: - fprintf(NetTrace, "\" USERVAR " + noquote); - noquote = 2; + qprintf(quote, NetTrace, "USERVAR "); + quote = 0; break; default: if (isprint(pointer[i]) && pointer[i] != '"') { - if (noquote) { + if (!quote) { putc('"', NetTrace); - noquote = 0; + quote = 1; } putc(pointer[i], NetTrace); } else { - fprintf(NetTrace, "\" %03o " + noquote, - pointer[i]); - noquote = 2; + qprintf(quote, NetTrace, "%03o ", pointer[i]); + quote = 0; } break; } } - if (!noquote) + if (quote) putc('"', NetTrace); break; } |