From 532d964aea327c4ff77fac5c3979c7d302f97d76 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 12 Apr 2014 18:59:45 +0200 Subject: [PATCH] error-check renaming of uid mapping database for pedantry. found by coverity. --- src/compat/convert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compat/convert.c b/src/compat/convert.c index 921335c..ba18da0 100644 --- a/src/compat/convert.c +++ b/src/compat/convert.c @@ -240,7 +240,10 @@ convert( config_t *box ) goto err4; } db->close( db, 0 ); - rename( iumname, diumname ); + if (rename( iumname, diumname )) { + sys_error( "Cannot rename %s to %s", iumname, diumname ); + goto err4; + } } else { if (!(fp = fopen( uvname, "w" ))) { sys_error( "Cannot create %s", uvname );