mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
pam: Add str_has_prefix() helper
To simplify the options parsing.
This commit is contained in:
@ -73,6 +73,13 @@ now (void)
|
||||
return (uint64_t) ts.tv_sec * USEC_PER_SEC + (uint64_t) ts.tv_nsec / NSEC_PER_USEC;
|
||||
}
|
||||
|
||||
static bool str_has_prefix (const char *s, const char *prefix)
|
||||
{
|
||||
if (s == NULL || prefix == NULL)
|
||||
return false;
|
||||
return (strncmp (s, prefix, strlen (prefix)) == 0);
|
||||
}
|
||||
|
||||
static gboolean send_info_msg(pam_handle_t *pamh, const char *msg)
|
||||
{
|
||||
const struct pam_message mymsg = {
|
||||
|
||||
Reference in New Issue
Block a user