|
ProxyAuth
Linux PAM to authenticate device via Bluetooth device
|
#include <ctype.h>#include <stdio.h>#include <stdlib.h>#include <string.h>

Go to the source code of this file.
Macros | |
| #define | BT_MAC_LEN 17 |
| #define | BT_MAX_CONN 7 |
| #define | LOG 1 |
Functions | |
| int | verify_bt_addr (char *address, FILE *log_fp) |
| int | is_dev_trusted (FILE *log_fp, char *dev, char **trusted_devices, int num_of_devices) |
| void | free_device_list (char **device_list, int num_of_devices) |
| #define BT_MAC_LEN 17 |
Definition at line 9 of file pam_bt_misc.h.
| #define BT_MAX_CONN 7 |
Definition at line 10 of file pam_bt_misc.h.
| #define LOG 1 |
Definition at line 11 of file pam_bt_misc.h.
| void free_device_list | ( | char ** | device_list, |
| int | num_of_devices | ||
| ) |
Free the list of bluetooth MAC addresses from memory
| device_list | the list of bluetooth MAC addresses |
| num_of_devices | the cardinality of device array - represents the number of bluetooth devices stored in the array |
Definition at line 55 of file pam_bt_misc.c.
| int is_dev_trusted | ( | FILE * | log_fp, |
| char * | dev, | ||
| char ** | trusted_devices, | ||
| int | num_of_devices | ||
| ) |
Return 1 iff the given address is one of the trusted devices the user trusts
| log_fp | the handle of the log file |
| trusted_devices | the array of trusted bluetooth MAC addresses of the user |
| num_of_devices | the number of devices the user trusts |
Definition at line 46 of file pam_bt_misc.c.
| int verify_bt_addr | ( | char * | address, |
| FILE * | log_fp | ||
| ) |
Return 1 iff the address is a valid Bluetooth Address
NOTE: Bluetooth Address is a 48 bit address. The function will treat address as a string expecting:
| address | the bluetooth address |
| log_fp | the file handle for the log file |
Definition at line 5 of file pam_bt_misc.c.