summaryrefslogtreecommitdiff
path: root/libtac/lib
diff options
context:
space:
mode:
authorJeroen Nijhof <jeroen@jeroennijhof.nl>2012-09-08 11:32:32 +0200
committerJeroen Nijhof <jeroen@jeroennijhof.nl>2012-09-08 11:32:32 +0200
commit1e3880cd56e43bd48e9fef111fa1bd6a0f4af059 (patch)
tree12d6d8e8bd0d0305bf0e95f3ebb736f11d4cf78e /libtac/lib
parent201ea4be22313377317654b658b81474fc33fecc (diff)
downloadpam_tacplus-1e3880cd56e43bd48e9fef111fa1bd6a0f4af059.tar.gz
pam_tacplus-1e3880cd56e43bd48e9fef111fa1bd6a0f4af059.zip
Bumped version to 1.3.8 and renamed rem_addr to r_addr
Diffstat (limited to 'libtac/lib')
-rw-r--r--libtac/lib/acct_s.c12
-rw-r--r--libtac/lib/authen_s.c16
-rw-r--r--libtac/lib/author_s.c12
3 files changed, 20 insertions, 20 deletions
diff --git a/libtac/lib/acct_s.c b/libtac/lib/acct_s.c
index c1de720..fe86cdb 100644
--- a/libtac/lib/acct_s.c
+++ b/libtac/lib/acct_s.c
@@ -47,11 +47,11 @@ char *tac_acct_flag2str(int flag) {
* LIBTAC_STATUS_ASSEMBLY_ERR (pending impl)
*/
int tac_acct_send(int fd, int type, const char *user, char *tty,
- char *rem_addr, struct tac_attrib *attr) {
+ char *r_addr, struct tac_attrib *attr) {
HDR *th;
struct acct tb;
- u_char user_len, port_len, rem_addr_len;
+ u_char user_len, port_len, r_addr_len;
struct tac_attrib *a;
int i = 0; /* arg count */
int pkt_len = 0;
@@ -68,13 +68,13 @@ int tac_acct_send(int fd, int type, const char *user, char *tty,
th->encryption=tac_encryption ? TAC_PLUS_ENCRYPTED_FLAG : TAC_PLUS_UNENCRYPTED_FLAG;
TACDEBUG((LOG_DEBUG, "%s: user '%s', tty '%s', rem_addr '%s', encrypt: %s, type: %s", \
- __FUNCTION__, user, tty, rem_addr, \
+ __FUNCTION__, user, tty, r_addr, \
(tac_encryption) ? "yes" : "no", \
tac_acct_flag2str(type)))
user_len=(u_char) strlen(user);
port_len=(u_char) strlen(tty);
- rem_addr_len=(u_char) strlen(rem_addr);
+ r_addr_len=(u_char) strlen(r_addr);
tb.flags=(u_char) type;
tb.authen_method=tac_authen_method;
@@ -94,7 +94,7 @@ int tac_acct_send(int fd, int type, const char *user, char *tty,
tb.authen_service=tac_authen_service;
tb.user_len=user_len;
tb.port_len=port_len;
- tb.rem_addr_len=rem_addr_len;
+ tb.r_addr_len=r_addr_len;
/* allocate packet */
pkt=(u_char *) xcalloc(1, TAC_ACCT_REQ_FIXED_FIELDS_SIZE);
@@ -139,7 +139,7 @@ int tac_acct_send(int fd, int type, const char *user, char *tty,
/* fill user and port fields */
PUTATTR(user, user_len)
PUTATTR(tty, port_len)
- PUTATTR(rem_addr, rem_addr_len)
+ PUTATTR(r_addr, r_addr_len)
/* fill attributes */
a = attr;
diff --git a/libtac/lib/authen_s.c b/libtac/lib/authen_s.c
index 0cbf606..6a9a70c 100644
--- a/libtac/lib/authen_s.c
+++ b/libtac/lib/authen_s.c
@@ -35,12 +35,12 @@
* LIBTAC_STATUS_ASSEMBLY_ERR
*/
int tac_authen_send(int fd, const char *user, char *pass, char *tty,
- char *rem_addr) {
+ char *r_addr) {
HDR *th; /* TACACS+ packet header */
struct authen_start tb; /* message body */
int user_len, port_len, chal_len, mdp_len, token_len, bodylength, w;
- int rem_addr_len;
+ int r_addr_len;
int pkt_len = 0;
int ret = 0;
char *chal = "1234123412341234";
@@ -60,7 +60,7 @@ int tac_authen_send(int fd, const char *user, char *pass, char *tty,
th->encryption = tac_encryption ? TAC_PLUS_ENCRYPTED_FLAG : TAC_PLUS_UNENCRYPTED_FLAG;
TACDEBUG((LOG_DEBUG, "%s: user '%s', tty '%s', rem_addr '%s', encrypt: %s", \
- __FUNCTION__, user, tty, rem_addr, \
+ __FUNCTION__, user, tty, r_addr, \
(tac_encryption) ? "yes" : "no"))
if ((tac_login != NULL) && (strcmp(tac_login,"chap") == 0)) {
@@ -85,7 +85,7 @@ int tac_authen_send(int fd, const char *user, char *pass, char *tty,
/* get size of submitted data */
user_len = strlen(user);
port_len = strlen(tty);
- rem_addr_len = strlen(rem_addr);
+ r_addr_len = strlen(r_addr);
token_len = strlen(token);
/* fill the body of message */
@@ -106,12 +106,12 @@ int tac_authen_send(int fd, const char *user, char *pass, char *tty,
tb.service = tac_authen_service;
tb.user_len = user_len;
tb.port_len = port_len;
- tb.rem_addr_len = rem_addr_len; /* may be e.g Caller-ID in future */
+ tb.r_addr_len = r_addr_len; /* may be e.g Caller-ID in future */
tb.data_len = token_len;
/* fill body length in header */
bodylength = sizeof(tb) + user_len
- + port_len + rem_addr_len + token_len;
+ + port_len + r_addr_len + token_len;
th->datalength = htonl(bodylength);
@@ -136,8 +136,8 @@ int tac_authen_send(int fd, const char *user, char *pass, char *tty,
pkt_len += user_len;
bcopy(tty, pkt+pkt_len, port_len); /* tty */
pkt_len += port_len;
- bcopy(rem_addr, pkt+pkt_len, rem_addr_len); /* rem addr */
- pkt_len += rem_addr_len;
+ bcopy(r_addr, pkt+pkt_len, r_addr_len); /* rem addr */
+ pkt_len += r_addr_len;
bcopy(token, pkt+pkt_len, token_len); /* password */
pkt_len += token_len;
diff --git a/libtac/lib/author_s.c b/libtac/lib/author_s.c
index 7148e80..489d8ee 100644
--- a/libtac/lib/author_s.c
+++ b/libtac/lib/author_s.c
@@ -33,12 +33,12 @@
* LIBTAC_STATUS_WRITE_TIMEOUT (pending impl)
* LIBTAC_STATUS_ASSEMBLY_ERR (pending impl)
*/
-int tac_author_send(int fd, const char *user, char *tty, char *rem_addr,
+int tac_author_send(int fd, const char *user, char *tty, char *r_addr,
struct tac_attrib *attr) {
HDR *th;
struct author tb;
- u_char user_len, port_len, rem_addr_len;
+ u_char user_len, port_len, r_addr_len;
struct tac_attrib *a;
int i = 0; /* attributes count */
int pkt_len = 0; /* current packet length */
@@ -56,11 +56,11 @@ int tac_author_send(int fd, const char *user, char *tty, char *rem_addr,
TACDEBUG((LOG_DEBUG, "%s: user '%s', tty '%s', rem_addr '%s', encrypt: %s", \
__FUNCTION__, user, \
- tty, rem_addr, tac_encryption ? "yes" : "no"))
+ tty, r_addr, tac_encryption ? "yes" : "no"))
user_len = (u_char) strlen(user);
port_len = (u_char) strlen(tty);
- rem_addr_len = (u_char) strlen(rem_addr);
+ r_addr_len = (u_char) strlen(r_addr);
tb.authen_method = tac_authen_method;
tb.priv_lvl = tac_priv_lvl;
@@ -79,7 +79,7 @@ int tac_author_send(int fd, const char *user, char *tty, char *rem_addr,
tb.service = tac_authen_service;
tb.user_len = user_len;
tb.port_len = port_len;
- tb.rem_addr_len = rem_addr_len;
+ tb.r_addr_len = r_addr_len;
/* allocate packet */
pkt = (u_char *) xcalloc(1, TAC_AUTHOR_REQ_FIXED_FIELDS_SIZE);
@@ -125,7 +125,7 @@ int tac_author_send(int fd, const char *user, char *tty, char *rem_addr,
/* fill user and port fields */
PUTATTR(user, user_len)
PUTATTR(tty, port_len)
- PUTATTR(rem_addr, rem_addr_len)
+ PUTATTR(r_addr, r_addr_len)
/* fill attributes */
a = attr;