From 6ec601eec5de284dc561fd8fc101a28a815453cf Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 6 May 2018 13:10:07 +0200 Subject: src/pam-freerdp.c: Fix indentation level. --- src/pam-freerdp2.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/pam-freerdp2.c b/src/pam-freerdp2.c index a6675ae..45ba346 100644 --- a/src/pam-freerdp2.c +++ b/src/pam-freerdp2.c @@ -266,32 +266,32 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv) /* At this point we should have the values, let's check the auth */ pid_t pid; switch (pid = fork()) { - case 0: { /* child */ - pam_sm_authenticate_helper (stdinpipe, username, rhost, ruser, rdomain); - break; - } - case -1: { /* fork'n error! */ - retval = PAM_SYSTEM_ERR; - break; - } - default: { - int forkret = 0; - int bytesout = 0; + case 0: { /* child */ + pam_sm_authenticate_helper (stdinpipe, username, rhost, ruser, rdomain); + break; + } + case -1: { /* fork'n error! */ + retval = PAM_SYSTEM_ERR; + break; + } + default: { + int forkret = 0; + int bytesout = 0; - bytesout += write(stdinpipe[1], password, strlen(password)); - bytesout += write(stdinpipe[1], "\n", 1); + bytesout += write(stdinpipe[1], password, strlen(password)); + bytesout += write(stdinpipe[1], "\n", 1); - close(stdinpipe[1]); + close(stdinpipe[1]); - if (waitpid(pid, &forkret, 0) < 0 || bytesout == 0) { - retval = PAM_SYSTEM_ERR; - } else if (forkret == 0) { - retval = PAM_SUCCESS; - } else { - retval = PAM_AUTH_ERR; + if (waitpid(pid, &forkret, 0) < 0 || bytesout == 0) { + retval = PAM_SYSTEM_ERR; + } else if (forkret == 0) { + retval = PAM_SUCCESS; + } else { + retval = PAM_AUTH_ERR; + } } } - } /* Return our status */ done: -- cgit v1.2.3