> that appeared to work.  then, i try to telnet in from another machine.
> it just hangs after this:
> 
> Connected to 192.168.1.10.
> Escape character is '^]'.

I have good news and bad news.

The good news is, I know what the problem is, and had actually been trying
to remember *what* it was that was affected by my dd changes a while ago.

It has to do with the behaviour of 'dd' with incomplete blocks.  If you do: 

 echo abcdefg | dd bs=4 count=1 

The other behaviour is that you *are not* guaranteed to get 'abcd',
becuase the *shell pipe* might *block* it, that is, the shell might
send 'ab' in the first block, which 'dd' counts as a block, and goes
on it's merry way, saying, "I sent the block, what more do you want?"

I changed 'dd' to keep trying until it gets the full block or EOF.

UN-fortunately, the bad news is, the telnetd does:

/bin/dd count=1 > /dev/null 2>&1

In order to throw away some junk at the beginning.

I changed 'dd' to make it keep trying if it didn't have a full block,
which broke the telnetd usage of 'throw away one block however unfull'.

My intention at that time was to make a flag for dd, so you can choose the
behaviour you want.  Then I forgot, and couldn't remember what the deal
was.  So, the good news is, you reminded me what I broke.

The bad news is, to fix it, I have to dive back into the source for 'dd'.

There are 2 things since which change the situation:

(1) Now I have Lua, which probably could replace dd in this usage.

(2) You can probably just keep hitting return until the buffer fills
    and it lets you in.  Try holding down the enter key.  It defaults
    to a 512 byte buffer, but there is some overhead I think, so you
    probably don't have to hit it 512 times...

-Tom


Reply via email to