Re: "generating new host key..."

2010-09-07 Thread Damien Miller
On Wed, 8 Sep 2010, Damien Miller wrote: > On Tue, 7 Sep 2010, Todd T. Fries wrote: > > > I am not sure of a better way than what you've proposed, but the logic > > does make perfect sense to me. > > > > As a shortened version of what you proposed: > > > > [snip] > > my, that is complicated. I

Re: "generating new host key..."

2010-09-07 Thread Theo de Raadt
> > I am not sure of a better way than what you've proposed, but the logic > > does make perfect sense to me. > > > > As a shortened version of what you proposed: > > > > [snip] > > my, that is complicated. Is there anything we could do in ssh-keygen to > make this simpler? I thought I asked yo

Re: "generating new host key..."

2010-09-07 Thread Damien Miller
On Tue, 7 Sep 2010, Todd T. Fries wrote: > I am not sure of a better way than what you've proposed, but the logic > does make perfect sense to me. > > As a shortened version of what you proposed: > > [snip] my, that is complicated. Is there anything we could do in ssh-keygen to make this simple

Re: "generating new host key..."

2010-09-07 Thread Alexander Hall
On 09/08/10 01:12, Ted Unangst wrote: > On Tue, Sep 7, 2010 at 6:47 PM, Alexander Hall wrote: > > This isn't C. :) No... but it does work. :-) [ ] == false [ 1 ] == true also, $ which true false /usr/bin/true /usr/bin/false while those should be available to /etc/rc, I'd prefer not using th

Re: "generating new host key..."

2010-09-07 Thread Ted Unangst
On Tue, Sep 7, 2010 at 6:47 PM, Alexander Hall wrote: This isn't C. :) > first=1 first=true >first= first=false > [ $first ] || echo $first || echo

Re: "generating new host key..."

2010-09-07 Thread Alexander Hall
On 09/08/10 00:47, Alexander Hall wrote: > I also want to kill the IMO useless "ssh-keygen: " part of the output, > if noone opposes. I oppose. Disregard that.

Re: "generating new host key..."

2010-09-07 Thread Alexander Hall
My shot at it. - Errors at their own line, no need for temp file. - Parentheses as a simple way to keep variables local. Remove and/or rename variables at will. I also want to kill the IMO useless "ssh-keygen: " part of the output, if noone opposes. /Alexander ( first=1 for type in dsa ecdsa

Re: traceroute support for RFC 5837

2010-09-07 Thread Matthew Dempsky
On Tue, Sep 07, 2010 at 04:40:38PM +0200, Claudio Jeker wrote: > + if (objhdr.ieo_ctype & 0x02) { > + /* interface name */ > + if (olen < buf[0]) { > + printf("|)"); > +

Re: "generating new host key..."

2010-09-07 Thread Dan Harnett
On Tue, Sep 07, 2010 at 12:21:56PM -0500, Todd T. Fries wrote: > Neither of the above solutions provide the same output. > > Sorry, the requirement is to `notice' we are on a new line if an error occurs, > and only do the final echo if we are not on a new line at the end. Another loop that should

Re: "generating new host key..."

2010-09-07 Thread Dan Harnett
On Tue, Sep 07, 2010 at 12:21:56PM -0500, Todd T. Fries wrote: > Neither of the above solutions provide the same output. > > Sorry, the requirement is to `notice' we are on a new line if an error occurs, > and only do the final echo if we are not on a new line at the end. Another shot at this usi

Re: "generating new host key..."

2010-09-07 Thread Todd T. Fries
Penned by Martin Pelik??n on 20100907 18:55.00, we have: | 2010/9/7, TeXitoi : | > My proposition, avoiding function: | > | > ssh_keys=TOPRINT | > | > for key in rsa1 dsa rsa ecdsa; do | > if [ "$ssh_key" = TOPRINT ]; then | > echo -n "

Re: "generating new host key..."

2010-09-07 Thread Martin Pelikán
2010/9/7, TeXitoi : > My proposition, avoiding function: > > ssh_keys=TOPRINT > > for key in rsa1 dsa rsa ecdsa; do > if [ "$ssh_key" = TOPRINT ]; then > echo -n "ssh-keygen: generating new host key:" > ssh_key=PRINTED > fi > done > > if [ "$ssh_keys"

Re: "generating new host key..."

2010-09-07 Thread TeXitoi
"Todd T. Fries" writes: > Penned by Christian Weisgerber on 20100907 16:55.45, we have: > | > | ssh_keys=0 > | if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then > | if [ $((ssh_keys++)) -eq 0 ]; then > | echo -n "ssh-keygen: generating new host key:&

Re: "generating new host key..."

2010-09-07 Thread Todd T. Fries
a ECDSA ecdsa if [ $ssh_keys -gt 0 ]; then echo fi Penned by Christian Weisgerber on 20100907 16:55.45, we have: | Theo has suggested that it would be nicer if the "generating new | host key" output was all on one line. | | Basically we want "ssh-keygen: generating new host key:&q

"generating new host key..."

2010-09-07 Thread Christian Weisgerber
Theo has suggested that it would be nicer if the "generating new host key" output was all on one line. Basically we want "ssh-keygen: generating new host key:" to start the line, followed by the algorith name as each key is generated. In the unlikely event that an error happens, ssh-keygen will co

traceroute support for RFC 5837

2010-09-07 Thread Claudio Jeker
Since traceroute is capable to handle ICMP extensions as described in RFC 4884. RFC 5837 "Extending ICMP for Interface and Next-Hop Identification" adds a way to include more information about incomming/outgoing interface into the ICMP. While there I tried to cleanup the MPLS output a bit to make

open(2) can return EBUSY

2010-09-07 Thread Mats Erik Andersson
Hello, when a character device like /dev/cua00 is locked using fcntl(2) with F_SETLK in one application, a second desire to open the same device in a second application: open("/dev/cua00", O_RDWR | O_NOCTTY | O_NONBLOCK) will return an error with "errno == EBUSY". This happens at least with