]> git.ipfire.org Git - thirdparty/systemd.git/commit
path-util: fix breakage in path_is_mount_point
authorDave Reisner <dreisner@archlinux.org>
Thu, 18 Dec 2014 23:10:46 +0000 (18:10 -0500)
committerDave Reisner <dreisner@archlinux.org>
Thu, 18 Dec 2014 23:34:12 +0000 (18:34 -0500)
commite40872fc538f3216fd4d00aa969785b999a357bf
tree95aa5c0413900a650838c7189e5f4955d6d60af8
parent65eb4378c3e1de25383d8cd606909e64c71edc80
path-util: fix breakage in path_is_mount_point

This fixes 2 problems introduced by 6feeeab0bc:

1) If name_to_handle_at returns ENOSYS for the child, we'll wrongly
return -ENOSYS when it returns the same for the parent. Immediately
jump to the fallback logic when we get ENOSYS.

2) If name_to_handle_at returns EOPNOTSUPP for the child but suceeds
for the parent, we'll be comparing an uninitialized value (mount_id) to
an initialized value (mount_id_parent). Initialize the mount_id
variables to invalid mount_ids to avoid this.
src/shared/path-util.c