Only the non-privileged libvirtd instance uses $HOME. So avoid
running the code for migrating to XDG directories unless using
a non-privileged libvirtd
int ret = -1;
mode_t old_umask;
+ VIR_DEBUG("Checking if user profile needs migrating");
+
if (!(home = virGetUserDirectory()))
goto cleanup;
goto cleanup;
if (!virFileIsDir(old_base) || virFileExists(config_dir)) {
+ VIR_DEBUG("No old profile in '%s' / "
+ "new profile directory already present '%s'",
+ old_base, config_dir);
ret = 0;
goto cleanup;
}
goto cleanup;
}
+ VIR_DEBUG("Profile migrated from %s to %s", old_base, config_dir);
ret = 0;
cleanup:
exit(EXIT_FAILURE);
}
- if (migrateProfile() < 0)
+ if (!privileged &&
+ migrateProfile() < 0)
exit(EXIT_FAILURE);
if (config->host_uuid &&