summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mount.cifs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mount.cifs.c b/mount.cifs.c
index af071c1..78a4811 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -1700,7 +1700,11 @@ del_mtab(char *mountpoint)
goto del_mtab_error;
}
- rename(mtabtmpfile, MOUNTED);
+ if (rename(mtabtmpfile, MOUNTED)) {
+ fprintf(stderr, "del_mtab: error %d when renaming mtab in place\n", errno);
+ rc = EX_FILEIO;
+ goto del_mtab_error;
+ }
del_mtab_exit:
unlock_mtab();