aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2024-04-23 11:05:42 +0200
committerKarel Zak <kzak@redhat.com>2024-04-23 11:05:42 +0200
commitec691b31026e5ce82b9802697092f554cafb13b2 (patch)
treeb9d5be3fee1710d544e4c7f9546db8abf073222c
parent60546acc885243c94a7aa95e00e9105fa88a8fe6 (diff)
parent97f7bfc0fdf74b6a6e220ba9d2f620386e660b29 (diff)
downloadutil-linux-ec691b31026e5ce82b9802697092f554cafb13b2.tar.gz
Merge branch 'PR/libmount-utab-access' of github.com:karelzak/util-linux-work
* 'PR/libmount-utab-access' of github.com:karelzak/util-linux-work: libmount: Fix access check for utab in context
-rw-r--r--libmount/src/context.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libmount/src/context.c b/libmount/src/context.c
index 952287a26a..5206c1d587 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -367,8 +367,7 @@ const char *mnt_context_get_writable_tabpath(struct libmnt_context *cxt)
{
assert(cxt);
- context_init_paths(cxt, 1);
- return cxt->utab_path;
+ return mnt_context_utab_writable(cxt) ? cxt->utab_path : NULL;
}