summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-07-03 16:32:25 +0200
committerAnand Avati <avati@redhat.com>2012-07-11 19:34:52 -0700
commitf671ce6c6fa619b5cea2559495b4b21920f5de73 (patch)
treec7e4b2469e67cdd554b2b112085d6108be899856 /rpc
parent7f2788675ba99193b7f18b3b9efbbbe3b5d0b2e5 (diff)
glusterfsd: don't ignore tmpfile write failure (2x)
In both glusterfs_volfile_reconfigure and mgmt_getspec_cbk, we fwrite to a temporary file, fflush the stream, and then rewind and read from it. However, if either the fwrite or fflush were to fail, we would have ignored a write failure and would then read and process corrupt or incomplete input. In each case, add a test of ferror so that we don't ignore the write failure. Found by inspection. Change-Id: I8e84deb7d020a907870c9da2dde5c7371ce6ddb7 BUG: 789278 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3648 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'rpc')
0 files changed, 0 insertions, 0 deletions