diff options
| author | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2012-06-08 20:00:13 +0200 |
|---|---|---|
| committer | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2012-06-08 20:00:13 +0200 |
| commit | b8dcd8f5c3f4cd582c88bbfd93d0909277eca3f0 (patch) | |
| tree | cbfbcca22919ae058812d7085d10a9f23234f701 | |
| parent | 0a9f299095dac79ed9728af663302d5569d968e9 (diff) | |
| download | pam_tacplus-b8dcd8f5c3f4cd582c88bbfd93d0909277eca3f0.tar.gz pam_tacplus-b8dcd8f5c3f4cd582c88bbfd93d0909277eca3f0.zip | |
Moved debug message after active_server validation
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | pam_tacplus.c | 8 |
2 files changed, 7 insertions, 5 deletions
@@ -1,5 +1,7 @@ 1.3.7 -* attrib.c: Explicity setting *attr to NULL after free(), +* pam_tacplus.c: moved debug message after active_server validation, avoiding + null pointer exception +* attrib.c: explicity setting *attr to NULL after free(), thanks to Anthony Low <anthonyl@xkl.com> 1.3.6 diff --git a/pam_tacplus.c b/pam_tacplus.c index 5a7040f..350e042 100644 --- a/pam_tacplus.c +++ b/pam_tacplus.c @@ -441,12 +441,9 @@ int pam_sm_acct_mgmt (pam_handle_t * pamh, int flags, solution is found ;) */ ctrl = _pam_parse (argc, argv); - if (ctrl & PAM_TAC_DEBUG) { + if (ctrl & PAM_TAC_DEBUG) syslog (LOG_DEBUG, "%s: called (pam_tacplus v%hu.%hu.%hu)" , __FUNCTION__, PAM_TAC_VMAJ, PAM_TAC_VMIN, PAM_TAC_VPAT); - syslog (LOG_DEBUG, "%s: active server is [%s]", __FUNCTION__, - tac_ntop(active_server->ai_addr, active_server->ai_addrlen)); - } if ((user = _pam_get_user(pamh)) == NULL) return PAM_USER_UNKNOWN; @@ -472,6 +469,9 @@ int pam_sm_acct_mgmt (pam_handle_t * pamh, int flags, _pam_log (LOG_ERR, "user not authenticated by TACACS+"); return PAM_AUTH_ERR; } + if (ctrl & PAM_TAC_DEBUG) + syslog (LOG_DEBUG, "%s: active server is [%s]", __FUNCTION__, + tac_ntop(active_server->ai_addr, active_server->ai_addrlen)); /* checks for specific data required by TACACS+, which should be supplied in command line */ |
