chiark / gitweb /
path: follow symbolic link for parent path (2)
[elogind.git] / src / shared / path-util.c
index 3256deeec1e3535f25da63c48ba3a978fb49674d..fae5d20ebb0f6528a2312a33f05d1455c0e85481 100644 (file)
@@ -489,7 +489,7 @@ int path_is_mount_point(const char *t, bool allow_symlink) {
                 return r;
 
         h.handle.handle_bytes = MAX_HANDLE_SZ;
-        r = name_to_handle_at(AT_FDCWD, parent, &h.handle, &mount_id_parent, 0);
+        r = name_to_handle_at(AT_FDCWD, parent, &h.handle, &mount_id_parent, AT_SYMLINK_FOLLOW);
         if (r < 0) {
                 /* The parent can't do name_to_handle_at() but the
                  * directory we are interested in can? If so, it must
@@ -519,7 +519,7 @@ fallback:
         if (r < 0)
                 return r;
 
-        r = lstat(parent, &b);
+        r = stat(parent, &b);
         if (r < 0)
                 return -errno;