ProxyAuth
Linux PAM to authenticate device via Bluetooth device
Classes | Macros | Functions
proxy_dbus.h File Reference
#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>
Include dependency graph for proxy_dbus.h:
This graph shows which files directly or indirectly include this file:

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_objset_lock_listener (struct server_data_t *server)
 
void check_lock_status (GMainContext *context)
 

Macro Definition Documentation

◆ GNOME_SESSION_DBUS_INTERFACE_PRESENCE

#define GNOME_SESSION_DBUS_INTERFACE_PRESENCE   "org.gnome.SessionManager.Presence"

Definition at line 12 of file proxy_dbus.h.

◆ GNOME_SESSION_DBUS_NAME

#define GNOME_SESSION_DBUS_NAME   "org.gnome.SessionManager"

Definition at line 10 of file proxy_dbus.h.

◆ GNOME_SESSION_DBUS_OBJ_PATH_PRESENCE

#define GNOME_SESSION_DBUS_OBJ_PATH_PRESENCE   "/org/gnome/SessionManager/Presence"

Definition at line 11 of file proxy_dbus.h.

Function Documentation

◆ check_lock_status()

void check_lock_status ( GMainContext *  context)

Definition at line 78 of file proxy_dbus.c.

◆ on_signal()

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

Parameters
proxy
sender_name
signal_name
parameters
user_dataa pointer to data that needs to be freed before terminating the program

Definition at line 20 of file proxy_dbus.c.

Here is the call graph for this function:

◆ set_lock_listener()

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)

Parameters
servera 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

Returns
an object that contains all the necessary data to listen for the lock status and the data that needs to be freed when program terminate

Definition at line 38 of file proxy_dbus.c.

Here is the call graph for this function:

◆ terminate()

void terminate ( struct dbus_obj data_obj)

Definition at line 3 of file proxy_dbus.c.

Here is the call graph for this function:

◆ terminate_server()

void terminate_server ( int  server,
int  client,
sdp_session_t *  session 
)

Definition at line 44 of file deauth.c.

Here is the call graph for this function: