summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Krawczyk <pawel.krawczyk@hush.com>2015-06-20 16:07:47 +0000
committerPaweł Krawczyk <pawel.krawczyk@hush.com>2015-06-20 16:07:47 +0000
commitf9374378ec13ab1630d612b12669efd26f09067e (patch)
tree8749554f5d8cb053e4f643ad0b5e02f755ef9a5b
parentf519a6b3a7b5694e3cba8240fe3a2638c0738246 (diff)
downloadpam_tacplus-f9374378ec13ab1630d612b12669efd26f09067e.tar.gz
pam_tacplus-f9374378ec13ab1630d612b12669efd26f09067e.zip
tac_login is a static array so it's never NULL
-rw-r--r--libtac/lib/acct_s.c2
-rw-r--r--libtac/lib/authen_s.c6
-rw-r--r--libtac/lib/author_s.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/libtac/lib/acct_s.c b/libtac/lib/acct_s.c
index 929378a..53afa87 100644
--- a/libtac/lib/acct_s.c
+++ b/libtac/lib/acct_s.c
@@ -78,7 +78,7 @@ int tac_acct_send(int fd, int type, const char *user, char *tty,
tb.flags=(u_char) type;
tb.authen_method=tac_authen_method;
tb.priv_lvl=tac_priv_lvl;
- if (tac_login == NULL || !*tac_login) {
+ if (!*tac_login) {
/* default to PAP */
tb.authen_type = TAC_PLUS_AUTHEN_TYPE_PAP;
} else {
diff --git a/libtac/lib/authen_s.c b/libtac/lib/authen_s.c
index 87dcb74..d495931 100644
--- a/libtac/lib/authen_s.c
+++ b/libtac/lib/authen_s.c
@@ -51,7 +51,7 @@ int tac_authen_send(int fd, const char *user, char *pass, char *tty,
th=_tac_req_header(TAC_PLUS_AUTHEN, 0);
/* set some header options */
- if (tac_login != NULL && !strcmp(tac_login,"login")) {
+ if (!strcmp(tac_login,"login")) {
th->version = TAC_PLUS_VER_0;
} else {
th->version = TAC_PLUS_VER_1;
@@ -62,7 +62,7 @@ int tac_authen_send(int fd, const char *user, char *pass, char *tty,
__FUNCTION__, user, tty, r_addr, \
(tac_encryption) ? "yes" : "no"))
- if (tac_login != NULL && !strcmp(tac_login,"chap")) {
+ if (!strcmp(tac_login,"chap")) {
chal_len = strlen(chal);
mdp_len = sizeof(u_char) + strlen(pass) + chal_len;
mdp = (u_char *) xcalloc(1, mdp_len);
@@ -90,7 +90,7 @@ int tac_authen_send(int fd, const char *user, char *pass, char *tty,
/* fill the body of message */
tb.action = TAC_PLUS_AUTHEN_LOGIN;
tb.priv_lvl = tac_priv_lvl;
- if (tac_login == NULL || !*tac_login) {
+ if (!*tac_login) {
/* default to PAP */
tb.authen_type = TAC_PLUS_AUTHEN_TYPE_PAP;
} else {
diff --git a/libtac/lib/author_s.c b/libtac/lib/author_s.c
index 56f1a97..7c18400 100644
--- a/libtac/lib/author_s.c
+++ b/libtac/lib/author_s.c
@@ -63,7 +63,7 @@ int tac_author_send(int fd, const char *user, char *tty, char *r_addr,
tb.authen_method = tac_authen_method;
tb.priv_lvl = tac_priv_lvl;
- if (tac_login == NULL) {
+ if (!*tac_login) {
/* default to PAP */
tb.authen_type = TAC_PLUS_AUTHEN_TYPE_PAP;
} else {