return rc;
}
- if (cxt->helper) {
- rc = exec_helper(cxt);
-
- if (mnt_context_helper_executed(cxt)
- && mnt_context_get_helper_status(cxt) == 0)
- return -MNT_ERR_APPLYFLAGS;
-
- return rc;
- }
+ if (cxt->helper)
+ return exec_helper(cxt);
if (try_type) {
ol = mnt_context_get_optlist(cxt);
if (!mnt_context_switch_ns(cxt, ns_old))
return -MNT_ERR_NAMESPACE;
+ DBG(CXT, ul_debugobj(cxt, "mnt_context_do_mount() done [rc=%d]", res));
return res;
}
mnt_context_deinit_hooksets(cxt);
if (!mnt_context_switch_ns(cxt, ns_old))
- return -MNT_ERR_NAMESPACE;
+ rc = -MNT_ERR_NAMESPACE;
+ DBG(CXT, ul_debugobj(cxt, "mnt_context_mount() done [rc=%d]", rc));
return rc;
}
/* For generic options srings ro/rw is expected at the begining */
if ((!map || map == ls->linux_map)
- && (what == MNT_OL_FLTR_DFLT || what == MNT_OL_FLTR_ALL)) {
+ && (what == MNT_OL_FLTR_DFLT ||
+ what == MNT_OL_FLTR_ALL ||
+ what == MNT_OL_FLTR_HELPERS)) {
+
rc = mnt_buffer_append_option(&buf, "rw", 2, NULL, 0);
if (rc)
goto fail;
/* convert 'rw' at the beginning to 'ro' if necessary */
if (str && is_rdonly && xx_wanted
- && (what == MNT_OL_FLTR_DFLT || what == MNT_OL_FLTR_ALL)) {
+ && (what == MNT_OL_FLTR_DFLT ||
+ what == MNT_OL_FLTR_ALL ||
+ what == MNT_OL_FLTR_HELPERS)) {
+
str[0] = 'r';
str[1] = 'o';
}
rc = mnt_optlist_get_optstr(ol, &str, NULL, MNT_OL_FLTR_UNKNOWN);
if (!rc)
printf("Unknown: %s\n", str);
+
+ rc = mnt_optlist_get_optstr(ol, &str, NULL, MNT_OL_FLTR_HELPERS);
+ if (!rc)
+ rc = mnt_optlist_get_optstr(ol, &str, NULL, MNT_OL_FLTR_HELPERS);
+ if (!rc)
+ printf("Helpers: %s\n", str);
done:
mnt_unref_optlist(ol);
return rc;