summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ssh/include
diff options
context:
space:
mode:
authorNobutomo Nakano <Nobutomo.Nakano@Sun.COM>2009-05-11 12:11:53 -0700
committerNobutomo Nakano <Nobutomo.Nakano@Sun.COM>2009-05-11 12:11:53 -0700
commit6f786ace10b9c0c7c5515e525fb660fbccfda6a3 (patch)
treea455902edb891743770d97ebb458821963392a26 /usr/src/cmd/ssh/include
parent1c7408c96b4914bcab86c14af29f1af003397b16 (diff)
downloadillumos-joyent-6f786ace10b9c0c7c5515e525fb660fbccfda6a3.tar.gz
6740240 ssh: password prompt is garbled on ja_JP.PCK/ja_JP.eucJP locale
Diffstat (limited to 'usr/src/cmd/ssh/include')
-rw-r--r--usr/src/cmd/ssh/include/bufaux.h17
-rw-r--r--usr/src/cmd/ssh/include/compat.h8
-rw-r--r--usr/src/cmd/ssh/include/g11n.h43
-rw-r--r--usr/src/cmd/ssh/include/packet.h14
4 files changed, 19 insertions, 63 deletions
diff --git a/usr/src/cmd/ssh/include/bufaux.h b/usr/src/cmd/ssh/include/bufaux.h
index a4bfe3bcee..aa673cccb1 100644
--- a/usr/src/cmd/ssh/include/bufaux.h
+++ b/usr/src/cmd/ssh/include/bufaux.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* $OpenBSD: bufaux.h,v 1.18 2002/04/20 09:14:58 markus Exp $ */
@@ -7,8 +7,6 @@
#ifndef _BUFAUX_H
#define _BUFAUX_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -49,18 +47,11 @@ int buffer_get_char(Buffer *);
void buffer_put_char(Buffer *, int);
void *buffer_get_string(Buffer *, u_int *);
-u_char *buffer_get_utf8_cstring(Buffer *);
-char *buffer_get_ascii_cstring(Buffer *);
+char *buffer_get_utf8_string(Buffer *, uint_t *);
void buffer_put_string(Buffer *, const void *, u_int);
void buffer_put_cstring(Buffer *, const char *);
-void buffer_put_utf8_cstring(Buffer *, const u_char *);
-void buffer_put_ascii_cstring(Buffer *, const char *);
-
-#if 0
-/* If these are needed, then get rid of the #if 0 and this comment */
-void buffer_put_utf8_string(Buffer *, const u_char *, u_int);
-void buffer_put_ascii_string(Buffer *, const char *, u_int);
-#endif
+void buffer_put_utf8_string(Buffer *, const char *, uint_t len);
+void buffer_put_utf8_cstring(Buffer *, const char *);
#define buffer_skip_string(b) \
do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while(0)
diff --git a/usr/src/cmd/ssh/include/compat.h b/usr/src/cmd/ssh/include/compat.h
index cd5d056f94..63b845017a 100644
--- a/usr/src/cmd/ssh/include/compat.h
+++ b/usr/src/cmd/ssh/include/compat.h
@@ -22,7 +22,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,8 +31,6 @@
/* $OpenBSD: compat.h,v 1.33 2002/09/27 10:42:09 mickey Exp $ */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -75,6 +73,8 @@ extern "C" {
#define SSH_BUG_GSSKEX_HOSTKEY 0x20000000
/* SSH_OLD_FORWARD_ADDR flag bumped up the SunSSH version to 1.2 */
#define SSH_OLD_FORWARD_ADDR 0x40000000
+/* SSH_BUG_STRING_ENCODING flag bumped up the SunSSH version to 1.4 */
+#define SSH_BUG_STRING_ENCODING 0x80000000
void enable_compat13(void);
void enable_compat20(void);
@@ -84,7 +84,7 @@ char *compat_cipher_proposal(char *);
extern int compat13;
extern int compat20;
-extern int datafellows;
+extern uint32_t datafellows;
#ifdef __cplusplus
}
diff --git a/usr/src/cmd/ssh/include/g11n.h b/usr/src/cmd/ssh/include/g11n.h
index 9fff281c7b..64acf8e630 100644
--- a/usr/src/cmd/ssh/include/g11n.h
+++ b/usr/src/cmd/ssh/include/g11n.h
@@ -18,15 +18,13 @@
*
* CDDL HEADER END
*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _G11N_H
#define _G11N_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -76,24 +74,6 @@ char *g11n_srvr_locale_negotiate(char *clnt_langtags, char **srvr_locales);
void g11n_freelist(char **list);
/*
- * Functions for validating ASCII and UTF-8 strings
- *
- * The error_str parameter is an optional pointer to a char variable
- * where to store a string suitable for use with error() or fatal() or
- * friends.
- *
- * The input string is expected to be a null-terminated string if the
- * len parameter is given a value of 0.
- *
- * The return value is 0 if success, EILSEQ or EINVAL.
- *
- */
-
-uint_t g11n_validate_ascii(const char *str, uint_t len, uchar_t **error_str);
-
-uint_t g11n_validate_utf8(const uchar_t *str, uint_t len, uchar_t **error_str);
-
-/*
* Functions for converting to ASCII or UTF-8 from the local codeset
* Functions for converting from ASCII or UTF-8 to the local codeset
*
@@ -101,24 +81,15 @@ uint_t g11n_validate_utf8(const uchar_t *str, uint_t len, uchar_t **error_str);
* where to store a string suitable for use with error() or fatal() or
* friends.
*
- * The err parameter is an optional pointer to an integer where 0
- * (success) or EILSEQ or EINVAL will be stored (failure).
- *
- * These functions return NULL if the conversion fails.
- *
*/
+extern char *g11n_convert_from_utf8(const char *str, uint_t *lenp,
+ char **error_str);
-uchar_t *g11n_convert_from_ascii(const char *str, int *err,
- uchar_t **error_str);
-
-uchar_t *g11n_convert_from_utf8(const uchar_t *str, int *err,
- uchar_t **error_str);
-
-char *g11n_convert_to_ascii(const uchar_t *str, int *err,
- uchar_t **error_str);
+extern char *g11n_convert_to_utf8(const char *str, uint_t *lenp, int native,
+ char **error_str);
-uchar_t *g11n_convert_to_utf8(const uchar_t *str, int *err,
- uchar_t **error_str);
+extern char *g11n_filter_string(char *);
+extern void g11n_test_langtag(const char *, int);
#ifdef __cplusplus
}
diff --git a/usr/src/cmd/ssh/include/packet.h b/usr/src/cmd/ssh/include/packet.h
index b7eb85fca7..26c3f8843e 100644
--- a/usr/src/cmd/ssh/include/packet.h
+++ b/usr/src/cmd/ssh/include/packet.h
@@ -11,7 +11,7 @@
* called by a name other than "ssh" or "Secure Shell".
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -59,16 +59,11 @@ void packet_put_bignum(BIGNUM * value);
void packet_put_bignum2(BIGNUM * value);
void packet_put_string(const void *buf, u_int len);
void packet_put_cstring(const char *str);
-void packet_put_ascii_cstring(const char *str);
-void packet_put_utf8_cstring(const u_char *str);
void packet_put_raw(const void *buf, u_int len);
void packet_send(void);
-#if 0
-/* If these are needed, then get rid of the #if 0 and this comment */
-void packet_put_utf8_string(const u_char *buf, u_int len);
-void packet_put_ascii_string(const char *str, u_int len);
-#endif
+void packet_put_utf8_string(const char *str, uint_t len);
+void packet_put_utf8_cstring(const char *str);
int packet_read(void);
void packet_read_expect(int type);
@@ -83,8 +78,7 @@ void packet_get_bignum(BIGNUM * value);
void packet_get_bignum2(BIGNUM * value);
void *packet_get_raw(u_int *length_ptr);
void *packet_get_string(u_int *length_ptr);
-char *packet_get_ascii_cstring();
-u_char *packet_get_utf8_cstring();
+char *packet_get_utf8_string(uint_t *length_ptr);
void packet_disconnect(const char *fmt,...) __attribute__((format(printf, 1, 2)));
void packet_send_debug(const char *fmt,...) __attribute__((format(printf, 1, 2)));