From: Karel Zak Date: Wed, 6 Jan 2021 14:17:19 +0000 (+0100) Subject: docs: update TODO (add item about mnt_context_get_excode() ) X-Git-Tag: v2.37-rc1~198 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79acb5bf1ea0715162a8e345591c344b011d58b4;p=thirdparty%2Futil-linux.git docs: update TODO (add item about mnt_context_get_excode() ) - add item about https://github.com/karelzak/util-linux/issues/1208 - remove old CAP_SYS_ADMIN note (in last versions mount(8) drops suid if necessary). Addresses: https://github.com/karelzak/util-linux/issues/1208 Signed-off-by: Karel Zak --- diff --git a/Documentation/TODO b/Documentation/TODO index be7b409fbc..3bd758a0e3 100644 --- a/Documentation/TODO +++ b/Documentation/TODO @@ -64,6 +64,13 @@ bash completion libmount (mount/umount) ----------------------- + - mnt_context_get_excode() does not return error messages from /sbin/[u]mount. + external helpers. It is disadvantages in same cases (non-terminal progarms). + The solution is to use pipe(), keep output from helper in memory and return it later + by mnt_context_get_excode() (or mnt_context_get_helper_output(), etc.). This feature + should be optional and disabled by default. + see: https://github.com/karelzak/util-linux/issues/1208 + - add --onlyonce to force mount(8) to check if mountpoint is already used. Now "already mounted" detection is used for --all only. The problem is if you call "mount " more than once for in fstab defined tmpfs (or network @@ -71,15 +78,6 @@ libmount (mount/umount) of the FS is created. https://github.com/karelzak/util-linux/issues/448 (... just idea, maybe wrong idea) - - support CAP_SYS_ADMIN; for mount(2) syscall the CAP_SYS_ADMIN is good - enough. Unfortunately, mount(8) does more things like check for filesystem - type (but it's usually done by udev, so root perms are unnecessary), create - loop devices, write to /run/mount/utab or /etc/mtab, etc. - - It would be nice to improve libmount to check for CAP_SYS_ADMIN if suid not - set and allow using it for simple tasks where no another operation is - necessary. - partx ----- diff --git a/libmount/src/context.c b/libmount/src/context.c index 6196c7156b..71d8939b08 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -2723,6 +2723,9 @@ int mnt_context_get_generic_excode(int rc, char *buf, size_t bufsz, char *fmt, . * and mnt_context_get_helper_status(). Note that mount(8) and umount(8) utils * always return code from helper without extra care about it. * + * The current implementation does not read error message from external + * helper into @buf. + * * If the argument @buf is not NULL then error message is generated (if * anything failed). *