diff --git a/src/util/virauth.c b/src/util/virauth.c index 7e7098317d..a04abb613b 100644 --- a/src/util/virauth.c +++ b/src/util/virauth.c @@ -210,14 +210,8 @@ virAuthGetUsername(virConnectPtr conn, if (virAuthGetConfigFilePath(conn, &path) < 0) return NULL; - if (!auth || !auth->cb) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("Missing or invalid auth pointer")); - return NULL; - } - return virAuthGetUsernamePath(path, auth, servicename, - defaultUsername, hostname); + defaultUsername, hostname); } @@ -292,11 +286,5 @@ virAuthGetPassword(virConnectPtr conn, if (virAuthGetConfigFilePath(conn, &path) < 0) return NULL; - if (!auth || !auth->cb) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("Missing or invalid auth pointer")); - return NULL; - } - return virAuthGetPasswordPath(path, auth, servicename, username, hostname); }