ProxyAuth
Linux PAM to authenticate device via Bluetooth device
|
#include <stdio.h>
#include <glib.h>
#include <gio/gio.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/rfcomm.h>
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
Go to the source code of this file.
Classes | |
struct | server_data_t |
struct | dbus_obj |
Macros | |
#define | GNOME_SESSION_DBUS_NAME "org.gnome.SessionManager" |
#define | GNOME_SESSION_DBUS_OBJ_PATH_PRESENCE "/org/gnome/SessionManager/Presence" |
#define | GNOME_SESSION_DBUS_INTERFACE_PRESENCE "org.gnome.SessionManager.Presence" |
Functions | |
void | terminate_server (int server, int client, sdp_session_t *session) |
void | terminate (struct dbus_obj *data_obj) |
void | on_signal (GDBusProxy *proxy, gchar *sender_name, gchar *signal_name, GVariant *parameters, gpointer user_data) |
struct dbus_obj * | set_lock_listener (struct server_data_t *server) |
void | check_lock_status (GMainContext *context) |
#define GNOME_SESSION_DBUS_INTERFACE_PRESENCE "org.gnome.SessionManager.Presence" |
Definition at line 12 of file proxy_dbus.h.
#define GNOME_SESSION_DBUS_NAME "org.gnome.SessionManager" |
Definition at line 10 of file proxy_dbus.h.
#define GNOME_SESSION_DBUS_OBJ_PATH_PRESENCE "/org/gnome/SessionManager/Presence" |
Definition at line 11 of file proxy_dbus.h.
void check_lock_status | ( | GMainContext * | context | ) |
Definition at line 78 of file proxy_dbus.c.
void on_signal | ( | GDBusProxy * | proxy, |
gchar * | sender_name, | ||
gchar * | signal_name, | ||
GVariant * | parameters, | ||
gpointer | user_data | ||
) |
Terminate program if user is locked by actively "listening"/monitoring the changes in presence status
Signal Handler whenever the property of status changes
proxy | |
sender_name | |
signal_name | |
parameters | |
user_data | a pointer to data that needs to be freed before terminating the program |
Definition at line 20 of file proxy_dbus.c.
struct dbus_obj* set_lock_listener | ( | struct server_data_t * | server | ) |
Calls and sets all the necessary data to listen for the status of the user's session (i.e. is the session locked)
server | a struct that contains the server and client's fd and the Bluetooth's SDP server object |
NOTE: returns a reference to a struct dbus_obj that needs to be freed
Definition at line 38 of file proxy_dbus.c.
void terminate | ( | struct dbus_obj * | data_obj | ) |