summaryrefslogtreecommitdiff
path: root/libtac/lib/connect.c
diff options
context:
space:
mode:
authorJeroen Nijhof <jeroen@jeroennijhof.nl>2012-07-25 11:37:30 +0200
committerJeroen Nijhof <jeroen@jeroennijhof.nl>2012-07-25 11:37:30 +0200
commit1891a3d7aca2cefd6495266c236a71296994c2a4 (patch)
tree1a3d9710b7812aaa361005dddfb0cb3151130757 /libtac/lib/connect.c
parentf56d9e4acba1e49db2659b95fb6b3c8f8fd70f0f (diff)
downloadpam_tacplus-1891a3d7aca2cefd6495266c236a71296994c2a4.tar.gz
pam_tacplus-1891a3d7aca2cefd6495266c236a71296994c2a4.zip
tac_encryption fully handled by libtac
Diffstat (limited to 'libtac/lib/connect.c')
-rw-r--r--libtac/lib/connect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libtac/lib/connect.c b/libtac/lib/connect.c
index ef4d706..1494976 100644
--- a/libtac/lib/connect.c
+++ b/libtac/lib/connect.c
@@ -153,7 +153,11 @@ int tac_connect_single(struct addrinfo *server, char *key) {
retval = fd;
/* set current tac_secret */
- tac_secret = key;
+ tac_encryption = 0;
+ if (key != NULL && strcmp(key, "") != 0) {
+ tac_encryption = 1;
+ tac_secret = key;
+ }
free(ip);