diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2010-02-12 23:32:17 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2010-02-12 23:32:17 +0000 |
commit | 206208b7800aa7a5d5f2b4a546c6ecdfad16bfe2 (patch) | |
tree | 4aaadd10d958eb4a40aa92eb92f7a33e90f5de3d /net | |
parent | 3c7eb55e2808dfba3d5a8969adb376b89eb7cd55 (diff) | |
download | ports-206208b7800aa7a5d5f2b4a546c6ecdfad16bfe2.tar.gz ports-206208b7800aa7a5d5f2b4a546c6ecdfad16bfe2.zip |
Notes
Diffstat (limited to 'net')
-rw-r--r-- | net/tac_plus4/files/patch-ab | 28 | ||||
-rw-r--r-- | net/tac_plus4/files/patch-do_acct.c | 78 | ||||
-rw-r--r-- | net/tac_plus4/files/patch-tacacs.h | 25 |
3 files changed, 127 insertions, 4 deletions
diff --git a/net/tac_plus4/files/patch-ab b/net/tac_plus4/files/patch-ab index addc15b045a9..f2b5564db74c 100644 --- a/net/tac_plus4/files/patch-ab +++ b/net/tac_plus4/files/patch-ab @@ -1,10 +1,30 @@ ---- tac_plus.h.orig Tue Dec 12 19:43:08 2006 -+++ tac_plus.h Sat Jun 30 02:07:03 2007 -@@ -731,6 +731,7 @@ int sendpass_fn(struct authen_data *data +--- tac_plus.h.orig 2009-07-27 20:11:53.000000000 -0400 ++++ tac_plus.h 2010-02-12 18:13:49.000000000 -0500 +@@ -86,6 +86,7 @@ + #ifdef FREEBSD + #define CONST_SYSERRLIST + #define NO_PWAGE ++#include <sys/param.h> + #endif + + #ifdef BSDI +@@ -138,7 +139,11 @@ + # include <sys/syslog.h> + #endif + ++#if defined(FREEBSD) && __FreeBSD_version >= 900007 ++#include <utmpx.h> ++#else + #include <utmp.h> ++#endif + + #include <unistd.h> + +@@ -655,6 +660,7 @@ int sendpass_fn(struct authen_data *data int enable_fn(struct authen_data *data); int default_v0_fn(struct authen_data *data); int skey_fn(struct authen_data *data); +int opie_fn(struct authen_data *data); #ifdef MAXSESS - extern void loguser(struct acct_rec *); + void loguser(struct acct_rec *); diff --git a/net/tac_plus4/files/patch-do_acct.c b/net/tac_plus4/files/patch-do_acct.c new file mode 100644 index 000000000000..d3cdfe996b32 --- /dev/null +++ b/net/tac_plus4/files/patch-do_acct.c @@ -0,0 +1,78 @@ +--- do_acct.c.orig 2010-01-23 16:17:36.000000000 -0500 ++++ do_acct.c 2010-02-12 18:19:44.000000000 -0500 +@@ -202,23 +202,42 @@ do_acct_syslog(struct acct_rec *rec) + int + wtmp_entry(char *line, char *name, char *host, time_t utime) + { ++#if defined(FREEBSD) && __FreeBSD_version >= 900007 ++#define HAVE_UTMPX_H 1 ++ struct utmpx entry; ++ struct timeval tv; ++#else + struct utmp entry; ++#endif + ++#ifndef HAVE_UTMPX_H + if (!wtmpfile) { + return(1); + } ++#endif + + memset(&entry, 0, sizeof entry); ++#ifdef HAVE_UTMPX_H ++ entry.ut_type = *name != '\0' ? USER_PROCESS : DEAD_PROCESS; ++ snprintf(entry.ut_id, sizeof entry.ut_id, "%xtac", getpid()); ++#endif + + if (strlen(line) < sizeof entry.ut_line) + strcpy(entry.ut_line, line); + else + memcpy(entry.ut_line, line, sizeof(entry.ut_line)); + ++#ifdef HAVE_UTMPX_H ++ if (strlen(name) < sizeof entry.ut_user) ++ strcpy(entry.ut_user, name); ++ else ++ memcpy(entry.ut_user, name, sizeof(entry.ut_user)); ++#else + if (strlen(name) < sizeof entry.ut_name) + strcpy(entry.ut_name, name); + else + memcpy(entry.ut_name, name, sizeof(entry.ut_name)); ++#endif + + #ifndef SOLARIS + if (strlen(host) < sizeof entry.ut_host) +@@ -226,13 +245,24 @@ wtmp_entry(char *line, char *name, char + else + memcpy(entry.ut_host, host, sizeof(entry.ut_host)); + #endif ++#ifdef HAVE_UTMPX_H ++ memset(&entry.ut_tv, 0, sizeof(entry.ut_tv)); ++ tv.tv_sec = utime; ++ memcpy(&entry.ut_tv, &tv, sizeof(entry.ut_tv)); ++#else + entry.ut_time = utime; ++#endif + + #ifdef FREEBSD ++#ifdef HAVE_UTMPX_H ++ pututxline(&entry); ++#else + wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND, 0644); ++#endif + #else + wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND | O_SYNC, 0644); + #endif ++#ifndef HAVE_UTMPX_H + if (wtmpfd < 0) { + report(LOG_ERR, "Can't open wtmp file %s -- %s", + wtmpfile, strerror(errno)); +@@ -251,6 +281,7 @@ wtmp_entry(char *line, char *name, char + } + + close(wtmpfd); ++#endif + + if (debug & DEBUG_ACCT_FLAG) { + report(LOG_DEBUG, "wtmp: %s, %s %s %d", line, name, host, utime); diff --git a/net/tac_plus4/files/patch-tacacs.h b/net/tac_plus4/files/patch-tacacs.h new file mode 100644 index 000000000000..7ecae966caa3 --- /dev/null +++ b/net/tac_plus4/files/patch-tacacs.h @@ -0,0 +1,25 @@ +--- tacacs.h.orig 2010-02-12 18:13:56.000000000 -0500 ++++ tacacs.h 2010-02-12 18:14:51.000000000 -0500 +@@ -83,6 +83,10 @@ XXX unknown + #define MSCHAP_DIGEST_LEN 49 + #endif /* MSCHAP */ + ++#ifdef FREEBSD ++#include <sys/param.h> ++#endif ++ + #if HAVE_STRING_H + # include <string.h> + #endif +@@ -124,7 +128,11 @@ XXX unknown + # include <sys/syslog.h> + #endif + ++#if defined(FREEBSD) && __FreeBSD_version >= 900007 ++#include <utmpx.h> ++#else + #include <utmp.h> ++#endif + + #include <unistd.h> + |