/* Silently checks if User @name exists.
* Returns if the user exists and fallbacks to false on error.
*/
-int
+bool
virDoesUserExist(const char *name)
{
return virGetUserIDByName(name, NULL, true) == 0;
/* Silently checks if Group @name exists.
* Returns if the group exists and fallbacks to false on error.
*/
-int
+bool
virDoesGroupExist(const char *name)
{
return virGetGroupIDByName(name, NULL, true) == 0;
return 0;
}
-int
+bool
virDoesUserExist(const char *name ATTRIBUTE_UNUSED)
{
- return 0;
+ return false;
}
-int
+bool
virDoesGroupExist(const char *name ATTRIBUTE_UNUSED)
{
- return 0;
+ return false;
}
# ifdef WIN32
int virGetGroupID(const char *name,
gid_t *gid) ATTRIBUTE_RETURN_CHECK;
-int virDoesUserExist(const char *name);
-int virDoesGroupExist(const char *name);
+bool virDoesUserExist(const char *name);
+bool virDoesGroupExist(const char *name);
bool virIsDevMapperDevice(const char *dev_name) ATTRIBUTE_NONNULL(1);