mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00: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
|
# rpc/virnetserverclient.h
|
||||||
virNetServerClientGetSASLSession;
|
virNetServerClientGetSASLSession;
|
||||||
|
virNetServerClientHasSASLSession;
|
||||||
virNetServerClientSetSASLSession;
|
virNetServerClientSetSASLSession;
|
||||||
|
|
||||||
|
|
||||||
|
@ -863,6 +863,15 @@ virNetSASLSessionPtr virNetServerClientGetSASLSession(virNetServerClientPtr clie
|
|||||||
virObjectUnlock(client);
|
virObjectUnlock(client);
|
||||||
return sasl;
|
return sasl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool virNetServerClientHasSASLSession(virNetServerClientPtr client)
|
||||||
|
{
|
||||||
|
bool has = false;
|
||||||
|
virObjectLock(client);
|
||||||
|
has = !!client->sasl;
|
||||||
|
virObjectUnlock(client);
|
||||||
|
return has;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@ int virNetServerClientGetTLSKeySize(virNetServerClientPtr client);
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef WITH_SASL
|
# ifdef WITH_SASL
|
||||||
|
bool virNetServerClientHasSASLSession(virNetServerClientPtr client);
|
||||||
void virNetServerClientSetSASLSession(virNetServerClientPtr client,
|
void virNetServerClientSetSASLSession(virNetServerClientPtr client,
|
||||||
virNetSASLSessionPtr sasl);
|
virNetSASLSessionPtr sasl);
|
||||||
virNetSASLSessionPtr virNetServerClientGetSASLSession(virNetServerClientPtr client);
|
virNetSASLSessionPtr virNetServerClientGetSASLSession(virNetServerClientPtr client);
|
||||||
|
Loading…
Reference in New Issue
Block a user