2006-04-23 18:26:03 +00:00
|
|
|
/*
|
|
|
|
* Rlogin backend.
|
|
|
|
*/
|
|
|
|
|
2001-01-19 10:10:37 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2012-12-22 09:40:47 +00:00
|
|
|
#include <limits.h>
|
2001-02-05 13:04:00 +00:00
|
|
|
#include <ctype.h>
|
2001-01-19 10:10:37 +00:00
|
|
|
|
|
|
|
#include "putty.h"
|
|
|
|
|
2001-08-25 17:09:23 +00:00
|
|
|
#define RLOGIN_MAX_BACKLOG 4096
|
|
|
|
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
typedef struct Rlogin Rlogin;
|
|
|
|
struct Rlogin {
|
|
|
|
Socket *s;
|
2012-12-22 09:40:47 +00:00
|
|
|
int closed_on_socket_error;
|
2002-10-25 11:30:33 +00:00
|
|
|
int bufsize;
|
2003-01-14 18:43:45 +00:00
|
|
|
int firstbyte;
|
2005-06-14 14:48:17 +00:00
|
|
|
int cansize;
|
2002-10-25 11:30:33 +00:00
|
|
|
int term_width, term_height;
|
2018-09-12 09:10:51 +01:00
|
|
|
Frontend *frontend;
|
2011-02-18 19:12:20 +00:00
|
|
|
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
Conf *conf;
|
2011-02-18 19:12:20 +00:00
|
|
|
|
|
|
|
/* In case we need to read a username from the terminal before starting */
|
|
|
|
prompts_t *prompt;
|
2018-05-27 09:29:33 +01:00
|
|
|
|
2018-10-05 07:24:16 +01:00
|
|
|
Plug plug;
|
2018-09-11 16:23:38 +01:00
|
|
|
Backend backend;
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
};
|
2001-01-19 10:10:37 +00:00
|
|
|
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
static void c_write(Rlogin *rlogin, const void *buf, int len)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
2002-10-25 11:30:33 +00:00
|
|
|
int backlog = from_backend(rlogin->frontend, 0, buf, len);
|
|
|
|
sk_set_frozen(rlogin->s, backlog > RLOGIN_MAX_BACKLOG);
|
2001-01-19 10:10:37 +00:00
|
|
|
}
|
|
|
|
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
static void rlogin_log(Plug *plug, int type, SockAddr *addr, int port,
|
2005-01-16 14:29:34 +00:00
|
|
|
const char *error_msg, int error_code)
|
|
|
|
{
|
2018-10-05 07:24:16 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(plug, Rlogin, plug);
|
2015-11-22 11:49:14 +00:00
|
|
|
backend_socket_log(rlogin->frontend, type, addr, port,
|
2015-11-22 14:33:28 +00:00
|
|
|
error_msg, error_code,
|
|
|
|
rlogin->conf, !rlogin->firstbyte);
|
2005-01-16 14:29:34 +00:00
|
|
|
}
|
|
|
|
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
static void rlogin_closing(Plug *plug, const char *error_msg, int error_code,
|
2016-06-02 23:03:24 +01:00
|
|
|
int calling_back)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
2018-10-05 07:24:16 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(plug, Rlogin, plug);
|
2011-09-13 11:44:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* We don't implement independent EOF in each direction for Telnet
|
|
|
|
* connections; as soon as we get word that the remote side has
|
|
|
|
* sent us EOF, we wind up the whole connection.
|
|
|
|
*/
|
|
|
|
|
2002-10-25 11:30:33 +00:00
|
|
|
if (rlogin->s) {
|
|
|
|
sk_close(rlogin->s);
|
|
|
|
rlogin->s = NULL;
|
2012-12-22 09:40:47 +00:00
|
|
|
if (error_msg)
|
|
|
|
rlogin->closed_on_socket_error = TRUE;
|
2004-11-27 13:20:21 +00:00
|
|
|
notify_remote_exit(rlogin->frontend);
|
2001-07-31 14:23:21 +00:00
|
|
|
}
|
2001-03-13 10:22:45 +00:00
|
|
|
if (error_msg) {
|
2001-05-06 14:35:20 +00:00
|
|
|
/* A socket error has occurred. */
|
2002-10-26 12:58:13 +00:00
|
|
|
logevent(rlogin->frontend, error_msg);
|
2003-05-04 14:14:10 +00:00
|
|
|
connection_fatal(rlogin->frontend, "%s", error_msg);
|
2001-05-06 14:35:20 +00:00
|
|
|
} /* Otherwise, the remote side closed the connection normally. */
|
2001-03-13 10:22:45 +00:00
|
|
|
}
|
|
|
|
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
static void rlogin_receive(Plug *plug, int urgent, char *data, int len)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
2018-10-05 07:24:16 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(plug, Rlogin, plug);
|
2001-01-19 10:10:37 +00:00
|
|
|
if (urgent == 2) {
|
2001-05-06 14:35:20 +00:00
|
|
|
char c;
|
|
|
|
|
|
|
|
c = *data++;
|
|
|
|
len--;
|
2005-06-14 14:48:17 +00:00
|
|
|
if (c == '\x80') {
|
|
|
|
rlogin->cansize = 1;
|
2018-09-11 16:23:38 +01:00
|
|
|
backend_size(&rlogin->backend,
|
|
|
|
rlogin->term_width, rlogin->term_height);
|
2005-06-14 14:48:17 +00:00
|
|
|
}
|
2001-05-06 14:35:20 +00:00
|
|
|
/*
|
|
|
|
* We should flush everything (aka Telnet SYNCH) if we see
|
|
|
|
* 0x02, and we should turn off and on _local_ flow control
|
|
|
|
* on 0x10 and 0x20 respectively. I'm not convinced it's
|
|
|
|
* worth it...
|
|
|
|
*/
|
2001-02-01 14:09:00 +00:00
|
|
|
} else {
|
2001-05-06 14:35:20 +00:00
|
|
|
/*
|
|
|
|
* Main rlogin protocol. This is really simple: the first
|
|
|
|
* byte is expected to be NULL and is ignored, and the rest
|
|
|
|
* is printed.
|
|
|
|
*/
|
2003-01-14 18:43:45 +00:00
|
|
|
if (rlogin->firstbyte) {
|
2001-05-06 14:35:20 +00:00
|
|
|
if (data[0] == '\0') {
|
|
|
|
data++;
|
|
|
|
len--;
|
|
|
|
}
|
2003-01-14 18:43:45 +00:00
|
|
|
rlogin->firstbyte = 0;
|
2001-05-06 14:35:20 +00:00
|
|
|
}
|
2002-03-01 13:17:45 +00:00
|
|
|
if (len > 0)
|
2002-10-25 11:30:33 +00:00
|
|
|
c_write(rlogin, data, len);
|
2001-01-19 10:10:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
static void rlogin_sent(Plug *plug, int bufsize)
|
2001-09-07 22:39:01 +00:00
|
|
|
{
|
2018-10-05 07:24:16 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(plug, Rlogin, plug);
|
2002-10-25 11:30:33 +00:00
|
|
|
rlogin->bufsize = bufsize;
|
2001-09-07 22:39:01 +00:00
|
|
|
}
|
|
|
|
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
static void rlogin_startup(Rlogin *rlogin, const char *ruser)
|
2011-02-18 19:12:20 +00:00
|
|
|
{
|
|
|
|
char z = 0;
|
|
|
|
char *p;
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
|
2011-02-18 19:12:20 +00:00
|
|
|
sk_write(rlogin->s, &z, 1);
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
p = conf_get_str(rlogin->conf, CONF_localusername);
|
|
|
|
sk_write(rlogin->s, p, strlen(p));
|
2011-02-18 19:12:20 +00:00
|
|
|
sk_write(rlogin->s, &z, 1);
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
sk_write(rlogin->s, ruser, strlen(ruser));
|
2011-02-18 19:12:20 +00:00
|
|
|
sk_write(rlogin->s, &z, 1);
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
p = conf_get_str(rlogin->conf, CONF_termtype);
|
|
|
|
sk_write(rlogin->s, p, strlen(p));
|
2011-02-18 19:12:20 +00:00
|
|
|
sk_write(rlogin->s, "/", 1);
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
p = conf_get_str(rlogin->conf, CONF_termspeed);
|
|
|
|
sk_write(rlogin->s, p, strspn(p, "0123456789"));
|
2011-02-18 19:12:20 +00:00
|
|
|
rlogin->bufsize = sk_write(rlogin->s, &z, 1);
|
|
|
|
|
|
|
|
rlogin->prompt = NULL;
|
|
|
|
}
|
|
|
|
|
2018-10-05 07:03:46 +01:00
|
|
|
static const PlugVtable Rlogin_plugvt = {
|
2018-05-27 09:29:33 +01:00
|
|
|
rlogin_log,
|
|
|
|
rlogin_closing,
|
|
|
|
rlogin_receive,
|
|
|
|
rlogin_sent
|
|
|
|
};
|
|
|
|
|
2001-01-19 10:10:37 +00:00
|
|
|
/*
|
|
|
|
* Called to set up the rlogin connection.
|
|
|
|
*
|
|
|
|
* Returns an error message, or NULL on success.
|
|
|
|
*
|
2001-05-09 14:01:15 +00:00
|
|
|
* Also places the canonical host name into `realhost'. It must be
|
|
|
|
* freed by the caller.
|
2001-01-19 10:10:37 +00:00
|
|
|
*/
|
2018-09-12 09:10:51 +01:00
|
|
|
static const char *rlogin_init(Frontend *frontend, Backend **backend_handle,
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
Conf *conf,
|
2015-05-15 11:15:42 +01:00
|
|
|
const char *host, int port, char **realhost,
|
2004-06-20 17:07:38 +00:00
|
|
|
int nodelay, int keepalive)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
SockAddr *addr;
|
2003-05-04 14:18:18 +00:00
|
|
|
const char *err;
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
Rlogin *rlogin;
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
char *ruser;
|
|
|
|
int addressfamily;
|
|
|
|
char *loghost;
|
2001-01-19 10:10:37 +00:00
|
|
|
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
rlogin = snew(Rlogin);
|
2018-10-05 07:24:16 +01:00
|
|
|
rlogin->plug.vt = &Rlogin_plugvt;
|
2018-09-11 16:23:38 +01:00
|
|
|
rlogin->backend.vt = &rlogin_backend;
|
2002-10-25 11:30:33 +00:00
|
|
|
rlogin->s = NULL;
|
2012-12-22 09:40:47 +00:00
|
|
|
rlogin->closed_on_socket_error = FALSE;
|
2018-09-12 09:10:51 +01:00
|
|
|
rlogin->frontend = frontend;
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
rlogin->term_width = conf_get_int(conf, CONF_width);
|
|
|
|
rlogin->term_height = conf_get_int(conf, CONF_height);
|
2003-01-14 18:43:45 +00:00
|
|
|
rlogin->firstbyte = 1;
|
2005-06-14 14:48:17 +00:00
|
|
|
rlogin->cansize = 0;
|
2011-02-18 19:12:20 +00:00
|
|
|
rlogin->prompt = NULL;
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
rlogin->conf = conf_copy(conf);
|
2018-09-11 16:23:38 +01:00
|
|
|
*backend_handle = &rlogin->backend;
|
2002-10-22 16:11:33 +00:00
|
|
|
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
addressfamily = conf_get_int(conf, CONF_addressfamily);
|
2001-01-19 10:10:37 +00:00
|
|
|
/*
|
|
|
|
* Try to find host.
|
|
|
|
*/
|
2015-11-22 09:58:14 +00:00
|
|
|
addr = name_lookup(host, port, realhost, conf, addressfamily,
|
|
|
|
rlogin->frontend, "rlogin connection");
|
2003-08-07 16:04:33 +00:00
|
|
|
if ((err = sk_addr_error(addr)) != NULL) {
|
|
|
|
sk_addr_free(addr);
|
2001-01-19 10:10:37 +00:00
|
|
|
return err;
|
2003-08-07 16:04:33 +00:00
|
|
|
}
|
2001-01-19 10:10:37 +00:00
|
|
|
|
|
|
|
if (port < 0)
|
|
|
|
port = 513; /* default rlogin port */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Open socket.
|
|
|
|
*/
|
2002-10-25 11:30:33 +00:00
|
|
|
rlogin->s = new_connection(addr, *realhost, port, 1, 0,
|
2018-10-05 07:24:16 +01:00
|
|
|
nodelay, keepalive, &rlogin->plug, conf);
|
2003-01-04 16:21:17 +00:00
|
|
|
if ((err = sk_socket_error(rlogin->s)) != NULL)
|
2001-01-19 10:10:37 +00:00
|
|
|
return err;
|
|
|
|
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
loghost = conf_get_str(conf, CONF_loghost);
|
|
|
|
if (*loghost) {
|
2008-06-01 11:16:32 +00:00
|
|
|
char *colon;
|
|
|
|
|
|
|
|
sfree(*realhost);
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
*realhost = dupstr(loghost);
|
2014-01-25 15:58:54 +00:00
|
|
|
|
|
|
|
colon = host_strrchr(*realhost, ':');
|
|
|
|
if (colon)
|
2008-06-01 11:16:32 +00:00
|
|
|
*colon++ = '\0';
|
|
|
|
}
|
|
|
|
|
2011-02-18 19:12:20 +00:00
|
|
|
/*
|
|
|
|
* Send local username, remote username, terminal type and
|
|
|
|
* terminal speed - unless we don't have the remote username yet,
|
|
|
|
* in which case we prompt for it and may end up deferring doing
|
|
|
|
* anything else until the local prompt mechanism returns.
|
|
|
|
*/
|
2012-04-24 17:33:06 +00:00
|
|
|
if ((ruser = get_remote_username(conf)) != NULL) {
|
2011-02-18 19:12:20 +00:00
|
|
|
rlogin_startup(rlogin, ruser);
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
sfree(ruser);
|
2011-02-18 19:12:20 +00:00
|
|
|
} else {
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
rlogin->prompt = new_prompts(rlogin->frontend);
|
|
|
|
rlogin->prompt->to_server = TRUE;
|
|
|
|
rlogin->prompt->name = dupstr("Rlogin login name");
|
2011-10-02 11:50:45 +00:00
|
|
|
add_prompt(rlogin->prompt, dupstr("rlogin username: "), TRUE);
|
2018-05-18 07:22:57 +01:00
|
|
|
ret = get_userpass_input(rlogin->prompt, NULL);
|
2011-02-18 19:12:20 +00:00
|
|
|
if (ret >= 0) {
|
|
|
|
rlogin_startup(rlogin, rlogin->prompt->prompts[0]->result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-01-19 10:10:37 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2018-09-11 16:23:38 +01:00
|
|
|
static void rlogin_free(Backend *be)
|
2003-01-15 23:30:21 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(be, Rlogin, backend);
|
2003-01-15 23:30:21 +00:00
|
|
|
|
2011-02-18 19:12:20 +00:00
|
|
|
if (rlogin->prompt)
|
|
|
|
free_prompts(rlogin->prompt);
|
2003-01-15 23:30:21 +00:00
|
|
|
if (rlogin->s)
|
|
|
|
sk_close(rlogin->s);
|
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.
User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).
One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.
[originally from svn r9214]
2011-07-14 18:52:21 +00:00
|
|
|
conf_free(rlogin->conf);
|
2003-01-15 23:30:21 +00:00
|
|
|
sfree(rlogin);
|
|
|
|
}
|
|
|
|
|
2003-01-12 14:48:29 +00:00
|
|
|
/*
|
|
|
|
* Stub routine (we don't have any need to reconfigure this backend).
|
|
|
|
*/
|
2018-09-11 16:23:38 +01:00
|
|
|
static void rlogin_reconfig(Backend *be, Conf *conf)
|
2003-01-12 14:48:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2001-01-19 10:10:37 +00:00
|
|
|
/*
|
|
|
|
* Called to send data down the rlogin connection.
|
|
|
|
*/
|
2018-09-11 16:23:38 +01:00
|
|
|
static int rlogin_send(Backend *be, const char *buf, int len)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(be, Rlogin, backend);
|
2018-05-18 07:22:57 +01:00
|
|
|
bufchain bc;
|
2002-10-25 11:30:33 +00:00
|
|
|
|
|
|
|
if (rlogin->s == NULL)
|
2001-08-27 15:55:44 +00:00
|
|
|
return 0;
|
2001-01-19 10:10:37 +00:00
|
|
|
|
2018-05-18 07:22:57 +01:00
|
|
|
bufchain_init(&bc);
|
|
|
|
bufchain_add(&bc, buf, len);
|
|
|
|
|
2011-02-18 19:12:20 +00:00
|
|
|
if (rlogin->prompt) {
|
|
|
|
/*
|
|
|
|
* We're still prompting for a username, and aren't talking
|
|
|
|
* directly to the network connection yet.
|
|
|
|
*/
|
2018-05-18 07:22:57 +01:00
|
|
|
int ret = get_userpass_input(rlogin->prompt, &bc);
|
2011-02-18 19:12:20 +00:00
|
|
|
if (ret >= 0) {
|
|
|
|
rlogin_startup(rlogin, rlogin->prompt->prompts[0]->result);
|
|
|
|
/* that nulls out rlogin->prompt, so then we'll start sending
|
|
|
|
* data down the wire in the obvious way */
|
|
|
|
}
|
|
|
|
}
|
2001-08-25 17:09:23 +00:00
|
|
|
|
2018-05-18 07:22:57 +01:00
|
|
|
if (!rlogin->prompt) {
|
|
|
|
while (bufchain_size(&bc) > 0) {
|
|
|
|
void *data;
|
|
|
|
int len;
|
|
|
|
bufchain_prefix(&bc, &data, &len);
|
|
|
|
rlogin->bufsize = sk_write(rlogin->s, data, len);
|
|
|
|
bufchain_consume(&bc, len);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bufchain_clear(&bc);
|
|
|
|
|
2002-10-25 11:30:33 +00:00
|
|
|
return rlogin->bufsize;
|
2001-08-25 17:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Called to query the current socket sendability status.
|
|
|
|
*/
|
2018-09-11 16:23:38 +01:00
|
|
|
static int rlogin_sendbuffer(Backend *be)
|
2001-08-25 17:09:23 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(be, Rlogin, backend);
|
2002-10-25 11:30:33 +00:00
|
|
|
return rlogin->bufsize;
|
2001-01-19 10:10:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Called to set the size of the window
|
|
|
|
*/
|
2018-09-11 16:23:38 +01:00
|
|
|
static void rlogin_size(Backend *be, int width, int height)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(be, Rlogin, backend);
|
2001-01-22 17:24:38 +00:00
|
|
|
char b[12] = { '\xFF', '\xFF', 0x73, 0x73, 0, 0, 0, 0, 0, 0, 0, 0 };
|
2001-01-19 10:10:37 +00:00
|
|
|
|
2002-10-25 11:30:33 +00:00
|
|
|
rlogin->term_width = width;
|
|
|
|
rlogin->term_height = height;
|
2002-10-23 12:41:35 +00:00
|
|
|
|
2005-06-14 14:48:17 +00:00
|
|
|
if (rlogin->s == NULL || !rlogin->cansize)
|
2001-09-25 20:07:55 +00:00
|
|
|
return;
|
2002-10-23 12:41:35 +00:00
|
|
|
|
2002-10-25 11:30:33 +00:00
|
|
|
b[6] = rlogin->term_width >> 8;
|
|
|
|
b[7] = rlogin->term_width & 0xFF;
|
|
|
|
b[4] = rlogin->term_height >> 8;
|
|
|
|
b[5] = rlogin->term_height & 0xFF;
|
|
|
|
rlogin->bufsize = sk_write(rlogin->s, b, 12);
|
2001-01-19 10:10:37 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Send rlogin special codes.
|
|
|
|
*/
|
Rework special-commands system to add an integer argument.
In order to list cross-certifiable host keys in the GUI specials menu,
the SSH backend has been inventing new values on the end of the
Telnet_Special enumeration, starting from the value TS_LOCALSTART.
This is inelegant, and also makes it awkward to break up special
handlers (e.g. to dispatch different specials to different SSH
layers), since if all you know about a special is that it's somewhere
in the TS_LOCALSTART+n space, you can't tell what _general kind_ of
thing it is. Also, if I ever need another open-ended set of specials
in future, I'll have to remember which TS_LOCALSTART+n codes are in
which set.
So here's a revamp that causes every special to take an extra integer
argument. For all previously numbered specials, this argument is
passed as zero and ignored, but there's a new main special code for
SSH host key cross-certification, in which the integer argument is an
index into the backend's list of available keys. TS_LOCALSTART is now
a thing of the past: if I need any other open-ended sets of specials
in future, I can add a new top-level code with a nicely separated
space of arguments.
While I'm at it, I've removed the legacy misnomer 'Telnet_Special'
from the code completely; the enum is now SessionSpecialCode, the
struct containing full details of a menu entry is SessionSpecial, and
the enum values now start SS_ rather than TS_.
2018-09-24 09:35:52 +01:00
|
|
|
static void rlogin_special(Backend *be, SessionSpecialCode code, int arg)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
2001-01-19 10:10:37 +00:00
|
|
|
/* Do nothing! */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2003-04-04 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* Return a list of the special codes that make sense in this
|
|
|
|
* protocol.
|
|
|
|
*/
|
Rework special-commands system to add an integer argument.
In order to list cross-certifiable host keys in the GUI specials menu,
the SSH backend has been inventing new values on the end of the
Telnet_Special enumeration, starting from the value TS_LOCALSTART.
This is inelegant, and also makes it awkward to break up special
handlers (e.g. to dispatch different specials to different SSH
layers), since if all you know about a special is that it's somewhere
in the TS_LOCALSTART+n space, you can't tell what _general kind_ of
thing it is. Also, if I ever need another open-ended set of specials
in future, I'll have to remember which TS_LOCALSTART+n codes are in
which set.
So here's a revamp that causes every special to take an extra integer
argument. For all previously numbered specials, this argument is
passed as zero and ignored, but there's a new main special code for
SSH host key cross-certification, in which the integer argument is an
index into the backend's list of available keys. TS_LOCALSTART is now
a thing of the past: if I need any other open-ended sets of specials
in future, I can add a new top-level code with a nicely separated
space of arguments.
While I'm at it, I've removed the legacy misnomer 'Telnet_Special'
from the code completely; the enum is now SessionSpecialCode, the
struct containing full details of a menu entry is SessionSpecial, and
the enum values now start SS_ rather than TS_.
2018-09-24 09:35:52 +01:00
|
|
|
static const SessionSpecial *rlogin_get_specials(Backend *be)
|
2003-04-04 20:21:05 +00:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2018-09-11 16:23:38 +01:00
|
|
|
static int rlogin_connected(Backend *be)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(be, Rlogin, backend);
|
2006-08-27 08:03:19 +00:00
|
|
|
return rlogin->s != NULL;
|
2001-05-06 14:35:20 +00:00
|
|
|
}
|
2001-01-19 10:10:37 +00:00
|
|
|
|
2018-09-11 16:23:38 +01:00
|
|
|
static int rlogin_sendok(Backend *be)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
/* Rlogin *rlogin = FROMFIELD(be, Rlogin, backend); */
|
2001-05-06 14:35:20 +00:00
|
|
|
return 1;
|
|
|
|
}
|
2001-01-19 10:10:37 +00:00
|
|
|
|
2018-09-11 16:23:38 +01:00
|
|
|
static void rlogin_unthrottle(Backend *be, int backlog)
|
2001-08-25 17:09:23 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(be, Rlogin, backend);
|
2002-10-25 11:30:33 +00:00
|
|
|
sk_set_frozen(rlogin->s, backlog > RLOGIN_MAX_BACKLOG);
|
2001-08-25 17:09:23 +00:00
|
|
|
}
|
|
|
|
|
2018-09-11 16:23:38 +01:00
|
|
|
static int rlogin_ldisc(Backend *be, int option)
|
2001-05-06 14:35:20 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
/* Rlogin *rlogin = FROMFIELD(be, Rlogin, backend); */
|
2001-01-24 14:08:20 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-11 16:23:38 +01:00
|
|
|
static void rlogin_provide_ldisc(Backend *be, Ldisc *ldisc)
|
2002-10-26 10:16:19 +00:00
|
|
|
{
|
|
|
|
/* This is a stub. */
|
|
|
|
}
|
|
|
|
|
2018-09-11 16:23:38 +01:00
|
|
|
static void rlogin_provide_logctx(Backend *be, LogContext *logctx)
|
2002-10-26 12:58:13 +00:00
|
|
|
{
|
|
|
|
/* This is a stub. */
|
|
|
|
}
|
|
|
|
|
2018-09-11 16:23:38 +01:00
|
|
|
static int rlogin_exitcode(Backend *be)
|
2001-12-29 15:31:42 +00:00
|
|
|
{
|
Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.
All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.
A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00
|
|
|
Rlogin *rlogin = FROMFIELD(be, Rlogin, backend);
|
2003-03-31 12:10:08 +00:00
|
|
|
if (rlogin->s != NULL)
|
|
|
|
return -1; /* still connected */
|
2012-12-22 09:40:47 +00:00
|
|
|
else if (rlogin->closed_on_socket_error)
|
|
|
|
return INT_MAX; /* a socket error counts as an unclean exit */
|
2003-03-31 12:10:08 +00:00
|
|
|
else
|
|
|
|
/* If we ever implement RSH, we'll probably need to do this properly */
|
|
|
|
return 0;
|
2001-12-29 15:31:42 +00:00
|
|
|
}
|
|
|
|
|
2004-12-29 12:32:25 +00:00
|
|
|
/*
|
|
|
|
* cfg_info for rlogin does nothing at all.
|
|
|
|
*/
|
2018-09-11 16:23:38 +01:00
|
|
|
static int rlogin_cfg_info(Backend *be)
|
2004-12-29 12:32:25 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-10-05 07:03:46 +01:00
|
|
|
const struct BackendVtable rlogin_backend = {
|
2001-01-19 10:10:37 +00:00
|
|
|
rlogin_init,
|
2003-01-15 23:30:21 +00:00
|
|
|
rlogin_free,
|
2003-01-12 14:48:29 +00:00
|
|
|
rlogin_reconfig,
|
2001-01-19 10:10:37 +00:00
|
|
|
rlogin_send,
|
2001-08-25 17:09:23 +00:00
|
|
|
rlogin_sendbuffer,
|
2001-01-19 10:10:37 +00:00
|
|
|
rlogin_size,
|
|
|
|
rlogin_special,
|
2003-04-04 20:21:05 +00:00
|
|
|
rlogin_get_specials,
|
2006-08-27 08:03:19 +00:00
|
|
|
rlogin_connected,
|
2001-12-29 15:31:42 +00:00
|
|
|
rlogin_exitcode,
|
2001-01-19 10:10:37 +00:00
|
|
|
rlogin_sendok,
|
2001-01-24 14:08:20 +00:00
|
|
|
rlogin_ldisc,
|
2002-10-26 10:16:19 +00:00
|
|
|
rlogin_provide_ldisc,
|
2002-10-26 12:58:13 +00:00
|
|
|
rlogin_provide_logctx,
|
2001-08-25 17:09:23 +00:00
|
|
|
rlogin_unthrottle,
|
2004-12-29 12:32:25 +00:00
|
|
|
rlogin_cfg_info,
|
2015-09-25 11:46:28 +01:00
|
|
|
NULL /* test_for_upstream */,
|
2007-06-30 21:56:44 +00:00
|
|
|
"rlogin",
|
|
|
|
PROT_RLOGIN,
|
2007-07-01 15:47:31 +00:00
|
|
|
513
|
2001-01-19 10:10:37 +00:00
|
|
|
};
|