Blame SOURCES/autofs-5.0.7-fix-check-mkdir_path-in-mount_bind-mount_mount.patch
|
|
4d476f |
autofs-5.0.7 - fix check mkdir_path() in mount_bind.c:mount_mount()
|
|
|
4d476f |
|
|
|
4d476f |
From: Ian Kent <raven@themaw.net>
|
|
|
4d476f |
|
|
|
4d476f |
|
|
|
4d476f |
---
|
|
|
4d476f |
modules/mount_bind.c | 7 ++++++-
|
|
|
4d476f |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
4d476f |
|
|
|
4d476f |
diff --git a/modules/mount_bind.c b/modules/mount_bind.c
|
|
|
4d476f |
index d6c6fe7..61a773c 100644
|
|
|
4d476f |
--- a/modules/mount_bind.c
|
|
|
4d476f |
+++ b/modules/mount_bind.c
|
|
|
4d476f |
@@ -209,7 +209,12 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
|
|
|
4d476f |
"failed to create local mount %s -> %s",
|
|
|
4d476f |
fullpath, what);
|
|
|
4d476f |
if (ap->flags & MOUNT_FLAG_GHOST && !status)
|
|
|
4d476f |
- mkdir_path(fullpath, 0555);
|
|
|
4d476f |
+ if (mkdir_path(fullpath, 0555) && errno != EEXIST) {
|
|
|
4d476f |
+ char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
|
|
|
4d476f |
+ error(ap->logopt,
|
|
|
4d476f |
+ MODPREFIX "mkdir_path %s failed: %s",
|
|
|
4d476f |
+ fullpath, estr);
|
|
|
4d476f |
+ }
|
|
|
4d476f |
else {
|
|
|
4d476f |
if (ap->type == LKP_INDIRECT)
|
|
|
4d476f |
rmdir_path(ap, fullpath, ap->dev);
|