Commit d2c30309 authored by Guido Gunther's avatar Guido Gunther

auth: Drop pin length limitation

There was no real reason to limit it here again anyway since
it was limited in the lock screen logic before.

Closes: #233, #234Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent a2285112
Pipeline #50643 passed with stages
in 19 minutes and 10 seconds
......@@ -10,9 +10,6 @@
#include <security/pam_appl.h>
#define PIN_LENGTH 6
typedef struct
{
pam_handle_t *pamh;
......@@ -44,7 +41,7 @@ pam_conversation_cb(int num_msg, const struct pam_message **msg,
switch (msg[i]->msg_style) {
case PAM_PROMPT_ECHO_OFF:
case PAM_PROMPT_ECHO_ON:
pam_resp[i].resp = g_strndup(pin, phosh_auth_get_pin_length ());
pam_resp[i].resp = g_strdup(pin);
ret = PAM_SUCCESS;
break;
case PAM_ERROR_MSG: /* TBD */
......@@ -187,10 +184,3 @@ phosh_auth_authenticate_async_finish (PhoshAuth *self,
g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
return g_task_propagate_boolean (G_TASK (result), error);
}
guint
phosh_auth_get_pin_length (void)
{
return PIN_LENGTH;
}
......@@ -14,7 +14,6 @@ G_DECLARE_FINAL_TYPE (PhoshAuth, phosh_auth, PHOSH, AUTH, GObject)
GObject *phosh_auth_new (void);
guint phosh_auth_get_pin_length (void);
void phosh_auth_authenticate_async_start (PhoshAuth *self,
const gchar *number,
GCancellable *cancellable,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment