mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
virneserverclient: Introduce virNetServerClientHasSASLSession
We do have a similar method, serving the same purpose, for TLS, but we lack one for SASL. So introduce one, in order for other modules to be able to find out, if a SASL session is active, or better said, that a SASL session exists at all. Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
9b45c9f049
commit
bde2cb6136
@ -27,6 +27,7 @@ virNetSASLSessionServerStep;
|
||||
|
||||
# rpc/virnetserverclient.h
|
||||
virNetServerClientGetSASLSession;
|
||||
virNetServerClientHasSASLSession;
|
||||
virNetServerClientSetSASLSession;
|
||||
|
||||
|
||||
|
@ -863,6 +863,15 @@ virNetSASLSessionPtr virNetServerClientGetSASLSession(virNetServerClientPtr clie
|
||||
virObjectUnlock(client);
|
||||
return sasl;
|
||||
}
|
||||
|
||||
bool virNetServerClientHasSASLSession(virNetServerClientPtr client)
|
||||
{
|
||||
bool has = false;
|
||||
virObjectLock(client);
|
||||
has = !!client->sasl;
|
||||
virObjectUnlock(client);
|
||||
return has;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -91,6 +91,7 @@ int virNetServerClientGetTLSKeySize(virNetServerClientPtr client);
|
||||
# endif
|
||||
|
||||
# ifdef WITH_SASL
|
||||
bool virNetServerClientHasSASLSession(virNetServerClientPtr client);
|
||||
void virNetServerClientSetSASLSession(virNetServerClientPtr client,
|
||||
virNetSASLSessionPtr sasl);
|
||||
virNetSASLSessionPtr virNetServerClientGetSASLSession(virNetServerClientPtr client);
|
||||
|
Loading…
Reference in New Issue
Block a user