comparison gensignkey.c @ 982:fd2e8bbb0333

Make sure hostkeys are flushed to disk to avoid empty files if the power fails. Based on patch from Peter Korsgaard
author Matt Johnston <matt@ucc.asn.au>
date Sat, 08 Nov 2014 22:15:16 +0800
parents 6e6ae84d3dba
children 2b62f26cf808
comparison
equal deleted inserted replaced
981:b2fc6607b530 982:fd2e8bbb0333
39 39
40 ret = DROPBEAR_SUCCESS; 40 ret = DROPBEAR_SUCCESS;
41 41
42 out: 42 out:
43 if (fd >= 0) { 43 if (fd >= 0) {
44 fsync(fd);
44 m_close(fd); 45 m_close(fd);
45 } 46 }
46 return ret; 47 return ret;
47 } 48 }
48 49