mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
util: Properly return error from virGetUserID and virGetGroupID stubs
The stubs for the two functions that are compiled on platforms that don't have HAVE_GETPWUID_R and friends defined do not return error but report an error message. The calling code then assumes that the @uid or @gid arguments were filled, which is not the case in the stubs.
This commit is contained in:
parent
568aba8811
commit
679576cf8c
@ -1316,7 +1316,7 @@ int virGetUserID(const char *name ATTRIBUTE_UNUSED,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("virGetUserID is not available"));
|
||||
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -1326,7 +1326,7 @@ int virGetGroupID(const char *name ATTRIBUTE_UNUSED,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("virGetGroupID is not available"));
|
||||
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
x
Reference in New Issue
Block a user