summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorAlessandro Bono <alessandro.bono369@gmail.com>2022-09-01 10:26:29 +0200
committerAlessandro Bono <alessandro.bono369@gmail.com>2022-10-29 12:39:54 +0200
commitd56f175bc2c38518960ebd6c7feaa84004af0b91 (patch)
tree836dc98baab234b8127c5ad193cabd8f894e3ac9 /daemon
parent0c38efe8d97f20bb004e9f9177113a73856ff54b (diff)
downloadgdm-d56f175bc2c38518960ebd6c7feaa84004af0b91.tar.gz
gdm-session-auditor: Add missing guards in public functions
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm-session-auditor.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/daemon/gdm-session-auditor.c b/daemon/gdm-session-auditor.c
index 5f569a9b..63f1666b 100644
--- a/daemon/gdm-session-auditor.c
+++ b/daemon/gdm-session-auditor.c
@@ -274,6 +274,8 @@ gdm_session_auditor_new (const char *hostname,
void
gdm_session_auditor_report_password_changed (GdmSessionAuditor *auditor)
{
+ g_return_if_fail (GDM_IS_SESSION_AUDITOR (auditor));
+
if (GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_password_changed != NULL) {
GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_password_changed (auditor);
}
@@ -282,6 +284,8 @@ gdm_session_auditor_report_password_changed (GdmSessionAuditor *auditor)
void
gdm_session_auditor_report_password_change_failure (GdmSessionAuditor *auditor)
{
+ g_return_if_fail (GDM_IS_SESSION_AUDITOR (auditor));
+
if (GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_password_change_failure != NULL) {
GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_password_change_failure (auditor);
}
@@ -290,6 +294,8 @@ gdm_session_auditor_report_password_change_failure (GdmSessionAuditor *auditor)
void
gdm_session_auditor_report_user_accredited (GdmSessionAuditor *auditor)
{
+ g_return_if_fail (GDM_IS_SESSION_AUDITOR (auditor));
+
if (GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_user_accredited != NULL) {
GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_user_accredited (auditor);
}
@@ -298,6 +304,8 @@ gdm_session_auditor_report_user_accredited (GdmSessionAuditor *auditor)
void
gdm_session_auditor_report_login (GdmSessionAuditor *auditor)
{
+ g_return_if_fail (GDM_IS_SESSION_AUDITOR (auditor));
+
if (GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_login != NULL) {
GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_login (auditor);
}
@@ -308,6 +316,8 @@ gdm_session_auditor_report_login_failure (GdmSessionAuditor *auditor,
int error_code,
const char *error_message)
{
+ g_return_if_fail (GDM_IS_SESSION_AUDITOR (auditor));
+
if (GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_login_failure != NULL) {
GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_login_failure (auditor, error_code, error_message);
}
@@ -316,6 +326,8 @@ gdm_session_auditor_report_login_failure (GdmSessionAuditor *auditor,
void
gdm_session_auditor_report_logout (GdmSessionAuditor *auditor)
{
+ g_return_if_fail (GDM_IS_SESSION_AUDITOR (auditor));
+
if (GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_logout != NULL) {
GDM_SESSION_AUDITOR_GET_CLASS (auditor)->report_logout (auditor);
}