]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: check for errors from prep-options hooks
authorChris Webb <chris@arachsys.com>
Sun, 23 Apr 2023 16:05:07 +0000 (17:05 +0100)
committerChris Webb <chris@arachsys.com>
Sun, 23 Apr 2023 16:05:07 +0000 (17:05 +0100)
commit01ed0468bcc130154fcf380c73d0f98dbdfe0e4b
tree8834162f7784986abdd23a5497c82e59fa1ebdc6
parent7511ffb9d039a1d2d174e6915eff79b04690d6ac
libmount: check for errors from prep-options hooks

fix_optstr() in context_mount.c calls the MNT_STAGE_PREP_OPTIONS hooks
but discards returned errors. This suppresses error messages and can
make invalid option strings 'fail open' in surprising ways. Handle error
returns from these hooks correctly.

No other callers of mnt_context_call_hooks() discard the return value,
so other hooks aren't affected.

Signed-off-by: Chris Webb <chris@arachsys.com>
libmount/src/context_mount.c