mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
daemon: fix logic bug with virAsprintf
Regression introduced in commit 7033c5f2
, due to improper conversion
from snprintf to virAsprintf.
* daemon/remote.c (remoteDispatchAuthList): Check return value
correctly.
This commit is contained in:
parent
d2728cc245
commit
15a280bb6d
@ -2052,7 +2052,7 @@ remoteDispatchAuthList(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
} else if (callerUid == 0) {
|
||||
char *ident;
|
||||
if (virAsprintf(&ident, "pid:%lld,uid:%d",
|
||||
(long long) callerPid, callerUid) == 0) {
|
||||
(long long) callerPid, callerUid) >= 0) {
|
||||
VIR_INFO("Bypass polkit auth for privileged client %s",
|
||||
ident);
|
||||
if (virNetServerClientSetIdentity(client, ident) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user