]> git.ipfire.org Git - thirdparty/systemd.git/commit
mount-util: add name_to_handle_at_loop() wrapper around name_to_handle_at()
authorLennart Poettering <lennart@poettering.net>
Mon, 20 Nov 2017 14:29:53 +0000 (15:29 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 21 Nov 2017 10:37:12 +0000 (11:37 +0100)
commitcbfb8679dd5812a43252b9665f472a6cfeb3768f
tree83451fd8bf3eeb0766c76ad730ca074a8e6695c5
parent172378e01bff23d27a1373f96913badbb30a61d8
mount-util: add name_to_handle_at_loop() wrapper around name_to_handle_at()

As it turns out MAX_HANDLE_SZ is a lie, the handle buffer we pass into
name_to_handle_at() might need to be larger than MAX_HANDLE_SZ, and we
thus need to invoke name_to_handle_at() in a loop, growing the buffer as
needed.

This adds a new wrapper name_to_handle_at_loop() around
name_to_handle_at() that does the necessary looping, and ports over all
users.

Fixes: #7082
src/basic/mount-util.c
src/basic/mount-util.h
src/libudev/libudev-monitor.c
src/tmpfiles/tmpfiles.c