Skip to content

Commit

Permalink
Drop nanosleep
Browse files Browse the repository at this point in the history
Bug: #39
  • Loading branch information
Jnchi committed Jun 7, 2019
1 parent be0505d commit bbffc3b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pam_aad.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <uuid/uuid.h>

Expand All @@ -20,7 +19,6 @@
#define HOST "https://login.microsoftonline.com/"
#define RESOURCE "https://graph.microsoft.com/"
#define SUBJECT "Your one-time passcode for signing in via Azure Active Directory"
#define TTW 5 /* time to wait in seconds */
#define USER_AGENT "azure_authenticator_pam/1.0"
#define USER_PROMPT "An email with a one-time passcode was sent to your email." \
"\nEnter the code at https://aka.ms/devicelogin, then press enter.\n"
Expand Down Expand Up @@ -192,9 +190,6 @@ static void auth_bearer_request(struct ret_data *data,
post_body = sdscat(post_body, "&grant_type=device_code");

for (;;) {
nanosleep((const struct timespec[]) { {
TTW, 0 }
}, NULL);
json_data = curl(endpoint, post_body, NULL, debug);

if (json_object_get(json_data, "access_token")) {
Expand Down

0 comments on commit bbffc3b

Please sign in to comment.