ProxyAuth
Linux PAM to authenticate device via Bluetooth device
|
Go to the source code of this file.
Macros | |
#define | BLUEZ_DBUS_NAME "org.bluez" |
#define | BLUEZ_DBUS_OBJ_PATH "/" |
#define | DBUS_INTERFACE_NAME "org.freedesktop.DBus.ObjectManager" |
#define | DBUS_METHOD_NAME "GetManagedObjects" |
#define | DBUS_METHOD_RETURN_TYPE "(a{oa{sa{sv}}})" |
Functions | |
char * | check_is_paired (GVariant *properties) |
char ** | process_dbus_bt_list (GVariant *result, int *num_of_paired) |
char ** | get_paired_devices (int *num_of_paired) |
#define BLUEZ_DBUS_NAME "org.bluez" |
Definition at line 9 of file pam_bt_pair.h.
#define BLUEZ_DBUS_OBJ_PATH "/" |
Definition at line 10 of file pam_bt_pair.h.
#define DBUS_INTERFACE_NAME "org.freedesktop.DBus.ObjectManager" |
Definition at line 11 of file pam_bt_pair.h.
#define DBUS_METHOD_NAME "GetManagedObjects" |
Definition at line 12 of file pam_bt_pair.h.
#define DBUS_METHOD_RETURN_TYPE "(a{oa{sa{sv}}})" |
Definition at line 13 of file pam_bt_pair.h.
char* check_is_paired | ( | GVariant * | properties | ) |
Return Bluetooth address if the device is paired. Else return NULL
properties | An 'object' that holds a specific bluetooth device's metadata |
Definition at line 3 of file pam_bt_pair.c.
char** get_paired_devices | ( | int * | num_of_paired | ) |
Return a list of Bluetooth addresses that is currently paired (connected) to the host
Approach: Use dbus to list all the bluetooth devices and see the connected property The paired property only indicates if the device has been paired with the host before and not if it is currently paired
num_of_paired | the number of devices paired to the host NOTE: the value is set within the helper function that the function will call |
Definition at line 86 of file pam_bt_pair.c.
char** process_dbus_bt_list | ( | GVariant * | result, |
int * | num_of_paired | ||
) |
Return a list of paired devices
num_of_paired | the number of devices that are paired NOTE: The number is set in this function |
result | The object returned by request to DBUS for all managed bluetooth object |
Definition at line 43 of file pam_bt_pair.c.