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:
Peter Krempa 2015-06-08 09:32:24 +02:00
parent 568aba8811
commit 679576cf8c

View File

@ -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