diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-05-06 13:10:07 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-05-06 13:10:07 +0200 |
commit | 6ec601eec5de284dc561fd8fc101a28a815453cf (patch) | |
tree | 8c7ea6425a0bd32567655daefcd8eb44b030cb26 /src | |
parent | a1efd266f57494d2c15e0f340037c33237d17edd (diff) | |
download | libpam-freerdp2-6ec601eec5de284dc561fd8fc101a28a815453cf.tar.gz libpam-freerdp2-6ec601eec5de284dc561fd8fc101a28a815453cf.tar.bz2 libpam-freerdp2-6ec601eec5de284dc561fd8fc101a28a815453cf.zip |
src/pam-freerdp.c: Fix indentation level.
Diffstat (limited to 'src')
-rw-r--r-- | src/pam-freerdp2.c | 42 |
1 files 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: |