goto ERROR;
// Disable systemctl to talk to systemd
- if (!pakfire_root_on_root(self->root)) {
+ if (!pakfire_root_is_root(self->root)) {
r = pakfire_env_set(self->env, "SYSTEMD_OFFLINE", "1");
if (r < 0)
goto ERROR;
return r;
// Change root (unless root is /)
- if (!pakfire_root_on_root(jail->root)) {
+ if (!pakfire_root_is_root(jail->root)) {
// Mount everything
r = pakfire_jail_mount(jail, ctx);
if (r)
NULL,
};
-int pakfire_root_on_root(pakfire_root* self) {
+int pakfire_root_is_root(pakfire_root* self) {
return (strcmp(self->path, "/") == 0);
}
static unsigned int pakfire_root_map_id(pakfire_root* self,
const struct pakfire_subid* subid, const unsigned int id) {
// Nothing to do if we are running on root
- if (pakfire_root_on_root(self))
+ if (pakfire_root_is_root(self))
return id;
// Map the ID
static unsigned int pakfire_root_unmap_id(pakfire_root* self,
const struct pakfire_subid* subid, const unsigned int id) {
// Nothing to do if we are running on root
- if (pakfire_root_on_root(self))
+ if (pakfire_root_is_root(self))
return id;
// Unmap the ID
}
// Lock the running kernel
- if (pakfire_root_on_root(self)) {
+ if (pakfire_root_is_root(self)) {
r = pakfire_root_lock_running_kernel(self);
if (r < 0)
return r;
// Safety check in case this is being launched on the host system
static int pakfire_root_safety_checks(pakfire_root* self) {
// Nothing to do if we are not working on root
- if (!pakfire_root_on_root(self))
+ if (!pakfire_root_is_root(self))
return 0;
// We must be root in order to operate in /
self->user.subuids.length = self->group.subgids.length = 1;
// Read SUBUID/SUBGIDs from file
- if (!pakfire_root_on_root(self)) {
+ if (!pakfire_root_is_root(self)) {
// Fetch SUBUIDs
r = pakfire_getsubuid(self->ctx, self, self->user.name, &self->user.subuids);
switch (r) {