summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pam_tacplus.c21
-rw-r--r--support.c4
-rw-r--r--support.h4
3 files changed, 8 insertions, 21 deletions
diff --git a/pam_tacplus.c b/pam_tacplus.c
index 9644bc4..c573c83 100644
--- a/pam_tacplus.c
+++ b/pam_tacplus.c
@@ -32,10 +32,7 @@
#include <ctype.h>
#include <time.h>
#include <unistd.h>
-
-#ifndef __linux__
- #include <strings.h>
-#endif
+#include <strings.h>
#include "libtac.h"
#include "pam_tacplus.h"
@@ -46,9 +43,7 @@
#define PAM_SM_SESSION
/* #define PAM_SM_PASSWORD */
-#ifndef __linux__
- #include <security/pam_appl.h>
-#endif
+#include <security/pam_appl.h>
#include <security/pam_modules.h>
#ifdef HAVE_CONFIG_H
@@ -85,17 +80,13 @@ static short int task_id = 0;
int _pam_send_account(int tac_fd, int type, const char *user, char *tty,
char *r_addr, char *cmd) {
- char buf[40];
+ char buf[64];
struct tac_attrib *attr;
int retval;
-
+
attr=(struct tac_attrib *)_xcalloc(sizeof(struct tac_attrib));
-
-#ifdef _AIX
- sprintf(buf, "%d", time(0));
-#else
- sprintf(buf, "%lu", (long unsigned int)time(0));
-#endif
+
+ sprintf(buf, "%lu", (unsigned long)time(NULL));
if (type == TAC_PLUS_ACCT_FLAG_START) {
tac_add_attrib(&attr, "start_time", buf);
diff --git a/support.c b/support.c
index 23b01e5..0dacf7b 100644
--- a/support.c
+++ b/support.c
@@ -24,9 +24,7 @@
#define PAM_SM_SESSION
/* #define PAM_SM_PASSWORD */
-#ifndef __linux__
- #include <security/pam_appl.h>
-#endif
+#include <security/pam_appl.h>
#include <security/pam_modules.h>
#include "pam_tacplus.h"
diff --git a/support.h b/support.h
index 300c7ce..6e5da87 100644
--- a/support.h
+++ b/support.h
@@ -19,9 +19,7 @@
* See `CHANGES' file for revision history.
*/
-#ifndef __linux__
- #include <security/pam_appl.h>
-#endif
+#include <security/pam_appl.h>
#include <security/pam_modules.h>
/* support.c */