diff options
| author | Ted Gould <ted@gould.cx> | 2012-08-21 18:42:14 -0500 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2012-08-21 18:42:14 -0500 |
| commit | 17e1cb79e748146b54d96d3f8d99588d285d3cc8 (patch) | |
| tree | ef72c431700c25e7753a52539b9f682b80bcbb0c /src/pam-freerdp.c | |
| parent | febcb8d261da4263085794d959185bd3af6a91f3 (diff) | |
| parent | 6c4d1fb57188c7fa7be10d607581823d40d83f48 (diff) | |
| download | libpam-freerdp2-17e1cb79e748146b54d96d3f8d99588d285d3cc8.tar.gz libpam-freerdp2-17e1cb79e748146b54d96d3f8d99588d285d3cc8.tar.bz2 libpam-freerdp2-17e1cb79e748146b54d96d3f8d99588d285d3cc8.zip | |
Adding an auth helper
Diffstat (limited to 'src/pam-freerdp.c')
| -rw-r--r-- | src/pam-freerdp.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c index 9fc43ed..5295098 100644 --- a/src/pam-freerdp.c +++ b/src/pam-freerdp.c @@ -130,15 +130,13 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv) case 0: { /* child */ dup2(stdinpipe[0], 0); - char * args[7]; + char * args[5]; - args[0] = XFREERDP; - args[1] = "--plugin"; - args[2] = "rdpsnd.so"; - args[3] = "--no-nla"; - args[4] = "-f"; - args[5] = "--from-stdin"; - args[6] = NULL; + args[0] = AUTH_CHECK; + args[1] = rhost; + args[2] = ruser; + args[3] = rdomain; + args[4] = NULL; struct passwd * pwdent = getpwnam(username); if (pwdent == NULL) { @@ -164,14 +162,8 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv) int forkret = 0; int bytesout = 0; - bytesout += write(stdinpipe[1], ruser, strlen(ruser)); - bytesout += write(stdinpipe[1], " ", 1); bytesout += write(stdinpipe[1], password, strlen(password)); - bytesout += write(stdinpipe[1], " ", 1); - bytesout += write(stdinpipe[1], rdomain, strlen(rdomain)); - bytesout += write(stdinpipe[1], " ", 1); - bytesout += write(stdinpipe[1], rhost, strlen(rhost)); - bytesout += write(stdinpipe[1], " ", 1); + bytesout += write(stdinpipe[1], "\n", 1); close(stdinpipe[1]); |
