Re: [PATCH] gensignkey: ensure host keys are flushed to disk

2015-01-04 Thread Matt Johnston
On Fri, Jan 02, 2015 at 10:13:13AM +0100, Peter Korsgaard wrote: No problem. Matt, how will we fix it? Unconditionally use O_RDONLY or some kind of fallback? Matt, what do you say? It would be good to get this fixed. Host key generation is basically completely broken by this. I've

Re: [PATCH] gensignkey: ensure host keys are flushed to disk

2015-01-04 Thread Peter Korsgaard
Matt == Matt Johnston m...@ucc.asn.au writes: On Fri, Jan 02, 2015 at 10:13:13AM +0100, Peter Korsgaard wrote: No problem. Matt, how will we fix it? Unconditionally use O_RDONLY or some kind of fallback? Matt, what do you say? It would be good to get this fixed. Host key

Re: [PATCH] gensignkey: ensure host keys are flushed to disk

2014-12-05 Thread Peter Korsgaard
DELOGET, == DELOGET, Emmanuel emmanuel.delo...@sfr.com writes: Hi, In any case, I have to apologize for all that fuzz - it seems I've been plain wrong on that case. I should have known better: test before you assert something. This way, I would have seen that opening a directory as

Re: [PATCH] gensignkey: ensure host keys are flushed to disk

2014-12-01 Thread Peter Korsgaard
DELOGET, == DELOGET, Emmanuel emmanuel.delo...@sfr.com writes: Hi, (this time from a subscribed address) Thanks for the patch, I've applied it with small changes. https://secure.ucc.asn.au/hg/dropbear/rev/fd2e8bbb0333 Emmanuel - thanks for the review. Dropbear already has

Re: [PATCH] gensignkey: ensure host keys are flushed to disk

2014-11-10 Thread DELOGET, Emmanuel
Hello, Le samedi 08 novembre 2014 à 22:26 +0800, Matt Johnston a écrit : On Tue, Oct 28, 2014 at 02:11:26PM +0100, Peter Korsgaard wrote: Otherwise we can end up with an empty host key, breaking logins. E.G.: Run dropbear -R and pull power before the host key is writting to disk.

Re: [PATCH] gensignkey: ensure host keys are flushed to disk

2014-11-08 Thread Matt Johnston
On Tue, Oct 28, 2014 at 02:11:26PM +0100, Peter Korsgaard wrote: Otherwise we can end up with an empty host key, breaking logins. E.G.: Run dropbear -R and pull power before the host key is writting to disk. After reboot we have: Hi Peter, Thanks for the patch, I've applied it with

Re: [PATCH] gensignkey: ensure host keys are flushed to disk

2014-10-28 Thread DELOGET, Emmanuel
Hello, These are only comments - I'm not Matt :) Le mardi 28 octobre 2014 à 14:11 +0100, Peter Korsgaard a écrit : From: Peter Korsgaard pe...@korsgaard.com Otherwise we can end up with an empty host key, breaking logins. E.G.: Run dropbear -R and pull power before the host key is

Re: [PATCH] gensignkey: ensure host keys are flushed to disk

2014-10-28 Thread Peter Korsgaard
DELOGET, == DELOGET, Emmanuel emmanuel.delo...@sfr.com writes: Hi (this time from an address subscribed to the list), out: if (fd = 0) { + fsync(fd); Instead of fsync, I think it sould be better to open the file with O_SYNC on the systems that allows it (and add a fsync