on_refresh_credentials (GdmSessionWorker *worker,
                        DBusMessage      *message)
{
        int error_code;

        if (worker->priv->state != GDM_SESSION_WORKER_STATE_REAUTHORIZED) {
                g_debug ("GdmSessionWorker: ignoring spurious refreshing credentials for user while in state %s", get_state_name (worker->priv->state));
                return;
        }

        g_debug ("GdmSessionWorker: refreshing credentials");

        error_code = pam_setcred (worker->priv->pam_handle, PAM_REFRESH_CRED);
        if (error_code != PAM_SUCCESS) {
                g_debug ("GdmSessionWorker: %s", pam_strerror (worker->priv->pam_handle, error_code));
        }
}
on_refresh_credentials (GdmSessionWorker *worker,
                        DBusMessage      *message)
{
        int error_code;

        if (worker->priv->state != GDM_SESSION_WORKER_STATE_REAUTHORIZED) {
                g_debug ("GdmSessionWorker: ignoring spurious refreshing credentials for user while in state %s", get_state_name (worker->priv->state));
                return;
        }

        g_debug ("GdmSessionWorker: refreshing credentials");

        error_code = pam_setcred (worker->priv->pam_handle, PAM_REFRESH_CRED);
        if (error_code != PAM_SUCCESS) {
                g_debug ("GdmSessionWorker: %s", pam_strerror (worker->priv->pam_handle, error_code));
        }
}