trans_tcp,
} transport;
#ifndef WIN32
- const char *daemonPath;
+ const char *daemonPath = NULL;
#endif
/* We handle *ALL* URIs here. The caller has rejected any
VIR_DEBUG("Proceeding with sockname %s", sockname);
}
- if (!(daemonPath = remoteFindDaemonPath())) {
+ if ((flags & VIR_DRV_OPEN_REMOTE_AUTOSTART) &&
+ !(daemonPath = remoteFindDaemonPath())) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to locate libvirtd daemon in %s "
"(to override, set $LIBVIRTD_PATH to the "
getuid() > 0) {
VIR_DEBUG("Auto-spawn user daemon instance");
rflags |= VIR_DRV_OPEN_REMOTE_USER;
- if (!autostart ||
- STRNEQ(autostart, "0"))
+ if (!virIsSUID() &&
+ (!autostart ||
+ STRNEQ(autostart, "0")))
rflags |= VIR_DRV_OPEN_REMOTE_AUTOSTART;
}
if (getuid() > 0) {
VIR_DEBUG("Auto-spawn user daemon instance");
rflags |= VIR_DRV_OPEN_REMOTE_USER;
- if (!autostart ||
- STRNEQ(autostart, "0"))
+ if (!virIsSUID() &&
+ (!autostart ||
+ STRNEQ(autostart, "0")))
rflags |= VIR_DRV_OPEN_REMOTE_AUTOSTART;
}
#endif