mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 13:35:17 +00:00
util: Remove invalid parameter checks from virAuthGet{Username|Password}
Now that the virAuthGet*Path helpers make the checks, we can remove them from here. Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
This commit is contained in:
parent
3dc6b00f0d
commit
efd8261541
@ -210,14 +210,8 @@ virAuthGetUsername(virConnectPtr conn,
|
|||||||
if (virAuthGetConfigFilePath(conn, &path) < 0)
|
if (virAuthGetConfigFilePath(conn, &path) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!auth || !auth->cb) {
|
|
||||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
|
||||||
_("Missing or invalid auth pointer"));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return virAuthGetUsernamePath(path, auth, servicename,
|
return virAuthGetUsernamePath(path, auth, servicename,
|
||||||
defaultUsername, hostname);
|
defaultUsername, hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -292,11 +286,5 @@ virAuthGetPassword(virConnectPtr conn,
|
|||||||
if (virAuthGetConfigFilePath(conn, &path) < 0)
|
if (virAuthGetConfigFilePath(conn, &path) < 0)
|
||||||
return NULL;
|
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);
|
return virAuthGetPasswordPath(path, auth, servicename, username, hostname);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user