All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] Changes to port_user
@ 2004-01-22 14:40 Dan Shearer
  2004-01-22 15:43 ` Dan Shearer
  2004-01-22 16:20 ` Jeff Dike
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Shearer @ 2004-01-22 14:40 UTC (permalink / raw)
  To: user-mode-linux-devel

I've done some minor work in drivers/port_user.c, including replacing
the binding to INADDR_ANY with a gethostbyname(passed_ip), so you
can specify which single IP to listen on. I'll post when I'm sure its
ok.

Now what I'm trying to do is replace in.telnetd with something else, for
the moment netcat as a simple case, or something that gives the same
effect. That involves understanding the significance of port_helper and
kernel/helper.c, which I don't yet.

Here's what I've noticed so far:

	When port_task_proc is run for a new incoming connection (an irq
	raised), port_accept calls port_connection, which is over in
	userspace (port_user.c)

	port_connection calls run_helper from kernel/helper.c, which
	starts in.telnetd in a new thread with clone(), supplying
	port-helper as the login program for telnetd but I'm not too
	sure what it does. telnetd behaves as if it were being run from
	inetd, being passed an input and an output descriptor, one
	connected to the UML (I don't know the mechanism for this yet)
	and the other to the network port.

Now, I just want raw data to go from the kernel to the port and back
again. So should I:

	a) just shortcircuit this by hooking the inbound and outbound
	descriptors up, or

	b) drop netcat in instead of telnetd (which I have tried but it
	isn't quite working yet.)

There may be architectural reasons why I shouldn't do (a).

Comments?

-- 
Dan Shearer
dan@shearer.org


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Changes to port_user
  2004-01-22 14:40 [uml-devel] Changes to port_user Dan Shearer
@ 2004-01-22 15:43 ` Dan Shearer
  2004-01-22 18:13   ` Jeff Dike
  2004-01-22 16:20 ` Jeff Dike
  1 sibling, 1 reply; 7+ messages in thread
From: Dan Shearer @ 2004-01-22 15:43 UTC (permalink / raw)
  To: user-mode-linux-devel

On Fri, Jan 23, 2004 at 01:10:20AM +1030, Dan Shearer wrote:
> Now, I just want raw data to go from the kernel to the port and back
> again. So should I:
> 
> 	a) just shortcircuit this by hooking the inbound and outbound
> 	descriptors up, or

I'm starting to get it, chan_kern is the place to start to understand
what happens when a read or write irq goes off. I don't think there is a
short-circuit mechanism for hooking up the internal fd for a tty
directly to an fd within a channel driver without breaking this design.
So what if I modified port_task_proc to copy the incoming data in the
appropriate direction? I'll give that a try next.

Jeff, please, what does "winch" stand for?

And also, if I submit some patches that just contain brief source
comments about how things work will you accept them? I notice you don't
use them much.

-- 
Dan Shearer
dan@shearer.org


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Changes to port_user
  2004-01-22 14:40 [uml-devel] Changes to port_user Dan Shearer
  2004-01-22 15:43 ` Dan Shearer
@ 2004-01-22 16:20 ` Jeff Dike
  2004-02-15 15:24   ` roland
  1 sibling, 1 reply; 7+ messages in thread
From: Jeff Dike @ 2004-01-22 16:20 UTC (permalink / raw)
  To: Dan Shearer; +Cc: user-mode-linux-devel

On Fri, Jan 23, 2004 at 01:10:20AM +1030, Dan Shearer wrote:
> I've done some minor work in drivers/port_user.c, including replacing
> the binding to INADDR_ANY with a gethostbyname(passed_ip), so you
> can specify which single IP to listen on. 

Cool, that's needed doing for a while.
 
> Now what I'm trying to do is replace in.telnetd with something else, for
> the moment netcat as a simple case, or something that gives the same
> effect. 

If you want to be able to telnet to the port, then you need something which
speaks telnet, hence you need telnetd.

If you can connect with something else and have terminal stuff continue
to work, and replace the telnetd dependency with something that works more
widely out of the box, then I'm all for it.

> That involves understanding the significance of port_helper and
> kernel/helper.c, which I don't yet.

What happens is that UML runs telnetd with the port helper as its "login"
program (problem - not every telnetd out there supports -L, even if it is
installed, which it often isn't).

When there's a connection, UML gets a descriptor with the telnet on the
other end.  It needs to get telnetd talking on that to do the telnet
protocol and another descriptor coming out of telnetd with actual characters
that the user typed.  So, it does this as follows:
	it execs telnetd with stdin, stderr, stdout duped from the portal
file descriptor
	telnetd also gets a unix socket on descriptor 3
	port_helper gets the desired telnetd output descriptor on its
stdin/stdout
	it passes this back to UML over the unix socket on descriptor 3
which it inherited from telnetd

				Jeff


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Changes to port_user
  2004-01-22 15:43 ` Dan Shearer
@ 2004-01-22 18:13   ` Jeff Dike
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Dike @ 2004-01-22 18:13 UTC (permalink / raw)
  To: Dan Shearer; +Cc: user-mode-linux-devel

On Fri, Jan 23, 2004 at 02:13:02AM +1030, Dan Shearer wrote:
> Jeff, please, what does "winch" stand for?

SIGWINCH.

> And also, if I submit some patches that just contain brief source
> comments about how things work will you accept them? 

Yup.

				Jeff


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Changes to port_user
  2004-01-22 16:20 ` Jeff Dike
@ 2004-02-15 15:24   ` roland
  2004-02-15 16:20     ` Ulf Bartelt
  0 siblings, 1 reply; 7+ messages in thread
From: roland @ 2004-02-15 15:24 UTC (permalink / raw)
  To: Jeff Dike, Dan Shearer; +Cc: user-mode-linux-devel

hi!

> If you want to be able to telnet to the port, then you need something which
> speaks telnet, hence you need telnetd.

> > Now what I'm trying to do is replace in.telnetd with something else, for
> > the moment netcat as a simple case, or something that gives the same
> > effect.

mhhh - as security oriented person i would like to admit:
should such "new technology" like uml really "support" unencrypted remote logins and should it support exposing "non encrypted
communication ports" to the outside world ?

telnet is ancient and IMHO it should be replaced by something more secure like ssh. sshd is installed by default on all major
distro`s and it has an "inetd" mode, too.
maybe telnetd can easily be replaced sshd ?

just my 10 eurocents....

regards
roland



----- Original Message ----- 
From: "Jeff Dike" <jdike@addtoit.com>
To: "Dan Shearer" <dan@shearer.org>
Cc: <user-mode-linux-devel@lists.sourceforge.net>
Sent: Thursday, January 22, 2004 5:20 PM
Subject: Re: [uml-devel] Changes to port_user


> On Fri, Jan 23, 2004 at 01:10:20AM +1030, Dan Shearer wrote:
> > I've done some minor work in drivers/port_user.c, including replacing
> > the binding to INADDR_ANY with a gethostbyname(passed_ip), so you
> > can specify which single IP to listen on.
>
> Cool, that's needed doing for a while.
>
> > Now what I'm trying to do is replace in.telnetd with something else, for
> > the moment netcat as a simple case, or something that gives the same
> > effect.
>
> If you want to be able to telnet to the port, then you need something which
> speaks telnet, hence you need telnetd.
>
> If you can connect with something else and have terminal stuff continue
> to work, and replace the telnetd dependency with something that works more
> widely out of the box, then I'm all for it.
>
> > That involves understanding the significance of port_helper and
> > kernel/helper.c, which I don't yet.
>
> What happens is that UML runs telnetd with the port helper as its "login"
> program (problem - not every telnetd out there supports -L, even if it is
> installed, which it often isn't).
>
> When there's a connection, UML gets a descriptor with the telnet on the
> other end.  It needs to get telnetd talking on that to do the telnet
> protocol and another descriptor coming out of telnetd with actual characters
> that the user typed.  So, it does this as follows:
> it execs telnetd with stdin, stderr, stdout duped from the portal
> file descriptor
> telnetd also gets a unix socket on descriptor 3
> port_helper gets the desired telnetd output descriptor on its
> stdin/stdout
> it passes this back to UML over the unix socket on descriptor 3
> which it inherited from telnetd
>
> Jeff
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
>



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Changes to port_user
  2004-02-15 15:24   ` roland
@ 2004-02-15 16:20     ` Ulf Bartelt
  2004-02-15 16:39       ` roland
  0 siblings, 1 reply; 7+ messages in thread
From: Ulf Bartelt @ 2004-02-15 16:20 UTC (permalink / raw)
  To: uml-devel

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

Am So, den 15.02.2004 schrieb roland um 16:24:
> mhhh - as security oriented person i would like to admit:
> should such "new technology" like uml really "support" unencrypted remote logins and should it support exposing "non encrypted
> communication ports" to the outside world ?

I *am* allowed to duplicate the keys to my home or car and throw them
arround like sweets on "karneval". No modern software shall keep me away
from "doing the wrong thing".

> telnet is ancient and IMHO it should be replaced by something more secure like ssh. sshd is installed by default on all major
> distro`s and it has an "inetd" mode, too.
> maybe telnetd can easily be replaced sshd ?

In near to 100% of all cases I'll prefer ssh(d).

I dont want to be forced to do the right thing, I want to be well
informed and decide on my own.

> just my 10 eurocents....

Added mine now... ;-)


[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Changes to port_user
  2004-02-15 16:20     ` Ulf Bartelt
@ 2004-02-15 16:39       ` roland
  0 siblings, 0 replies; 7+ messages in thread
From: roland @ 2004-02-15 16:39 UTC (permalink / raw)
  To: Ulf Bartelt, uml-devel

> telnet is ancient and IMHO it should be replaced by something more secure like ssh. sshd is installed by default on all major
> distro`s and it has an "inetd" mode, too.
> maybe telnetd can easily be replaced sshd ?

>In near to 100% of all cases I'll prefer ssh(d).
>I dont want to be forced to do the right thing, I want to be well
>informed and decide on my own.


ok, so let me correct my statement:

telnet is ancient and IMHO there should be made an option to use something more secure like ssh. for good security, this option
could be made the "default".

:D

regards
roland




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-02-15 16:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-22 14:40 [uml-devel] Changes to port_user Dan Shearer
2004-01-22 15:43 ` Dan Shearer
2004-01-22 18:13   ` Jeff Dike
2004-01-22 16:20 ` Jeff Dike
2004-02-15 15:24   ` roland
2004-02-15 16:20     ` Ulf Bartelt
2004-02-15 16:39       ` roland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.