Merge pull request #33475 from poettering/name-to-handle-at-fid
teach inode_same() the concept of name_to_handle_at() FIDs to properly detect inode identities
This commit is contained in:
@@ -1815,3 +1815,13 @@ int make_fsmount(
|
||||
|
||||
return TAKE_FD(mnt_fd);
|
||||
}
|
||||
|
||||
char* umount_and_unlink_and_free(char *p) {
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
||||
PROTECT_ERRNO;
|
||||
(void) umount2(p, 0);
|
||||
(void) unlink(p);
|
||||
return mfree(p);
|
||||
}
|
||||
|
||||
@@ -100,6 +100,9 @@ static inline char *umount_and_free(char *p) {
|
||||
}
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(char*, umount_and_free);
|
||||
|
||||
char* umount_and_unlink_and_free(char *p);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(char*, umount_and_unlink_and_free);
|
||||
|
||||
int bind_mount_in_namespace(PidRef *target, const char *propagate_path, const char *incoming_path, const char *src, const char *dest, bool read_only, bool make_file_or_directory);
|
||||
int mount_image_in_namespace(PidRef *target, const char *propagate_path, const char *incoming_path, const char *src, const char *dest, bool read_only, bool make_file_or_directory, const MountOptions *options, const ImagePolicy *image_policy);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user