e auth - fix missing stderr output logs i missed last commit

This commit is contained in:
Carsten Haitzler 2020-05-25 12:38:36 +01:00
parent 67bdd4d071
commit 8a641727da
1 changed files with 4 additions and 4 deletions

View File

@ -293,14 +293,14 @@ main(int argc, char **argv)
rd = read(0, pw + pos, 1); rd = read(0, pw + pos, 1);
if (rd < 0) if (rd < 0)
{ {
fprintf(stderr, "AUTH: Error. Can't read polkit cookie on stdin\n"); fprintf(stderr, "AUTH: POLKIT: Error. Can't read polkit cookie on stdin\n");
goto err; goto err;
} }
if (pw[pos] == ' ') if (pw[pos] == ' ')
{ {
memcpy(polkit_cookie, pw, pos); memcpy(polkit_cookie, pw, pos);
polkit_cookie[pos] = 0; polkit_cookie[pos] = 0;
printf("COOKIE: [%s]\n", polkit_cookie); fprintf(stderr, "AUTH: POLKIT: [%s]\n", polkit_cookie);
pos = 0; pos = 0;
break; break;
} }
@ -309,7 +309,7 @@ main(int argc, char **argv)
pos++; pos++;
if (pos > 4000) if (pos > 4000)
{ {
fprintf(stderr, "AUTH: Error. Polkit cookie too long\n"); fprintf(stderr, "AUTH: POLKIT: Error. Polkit cookie too long\n");
return -10; return -10;
} }
} }
@ -326,7 +326,7 @@ main(int argc, char **argv)
{ {
pw[pos] = 0; pw[pos] = 0;
polkit_uid = atoi(pw); polkit_uid = atoi(pw);
printf("AUTH: UID: [%u]\n", polkit_uid); fprintf(stderr, "AUTH: UID: [%u]\n", polkit_uid);
break; break;
} }
else else