8 Commits

Author SHA1 Message Date
Ryan McCabe
95a10ca43e Make the packet authentication code more resilient in the face
of transient failures.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-23 15:36:23 -04:00
Masatake YAMATO
99d6fa5746 fence-virtd: Use perror only if the last system call returns an error.
Fix wrong usage of perror. perror is called when data filled
by read system call is shorter than expected. It is not an error
of system call.  In such case perror should not be used.
Similar code can be found in place where write system call is used.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2015-02-08 01:31:36 +09:00
Masatake YAMATO
59b49215ab fence-virtd: Fix printing wrong system call in perror
perror("read") is called after write system call.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2015-02-08 01:31:03 +09:00
Ryan McCabe
85ecac5cff fence-virt: Fix possible fd leak
Fix a fd leak that could occur if reading /dev/urandom failed.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:20:08 -04:00
Lon Hohberger
d72630b973 Fix crash when we fail to read key file.
If hashing is requested and we have no key data, immediately fail.

Resolves: rhbz#758392

Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-08 14:51:01 -05:00
Lon Hohberger
f7ccaa261a Fix static analysis errors
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2011-09-20 11:40:39 -04:00
Lon Hohberger
082eb8be09 Fix missing carriage returns on debug prints
Signed-off-by: Lon Hohberger <lhh@redhat.com>
2009-08-20 14:24:12 -04:00
Lon Hohberger
55357fcd85 initial checkin
Signed-off-by: Lon Hohberger <lhh@redhat.com>
2009-07-28 10:46:53 -04:00