diff options
author | cy <cy@FreeBSD.org> | 2011-09-01 13:08:54 +0800 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2011-09-01 13:08:54 +0800 |
commit | 4afede8d76d1e238ec2638e1d5feb294c61904e3 (patch) | |
tree | e1b8a69e87dbd88ae26487694d1115bc871ec1fd /security/krb5-appl | |
parent | bbd79d77a1d2a18296ac56b6d06122c4f86e1134 (diff) | |
download | freebsd-ports-gnome-4afede8d76d1e238ec2638e1d5feb294c61904e3.tar.gz freebsd-ports-gnome-4afede8d76d1e238ec2638e1d5feb294c61904e3.tar.zst freebsd-ports-gnome-4afede8d76d1e238ec2638e1d5feb294c61904e3.zip |
Fix build under 9.0-CURRENT.
Diffstat (limited to 'security/krb5-appl')
-rw-r--r-- | security/krb5-appl/Makefile | 6 | ||||
-rw-r--r-- | security/krb5-appl/files/patch-ba | 59 | ||||
-rw-r--r-- | security/krb5-appl/files/patch-bsd-krlogind.c | 26 | ||||
-rw-r--r-- | security/krb5-appl/files/patch-libpty-logwtmp.c | 16 | ||||
-rw-r--r-- | security/krb5-appl/files/patch-libpty-update_wtmp.c | 65 |
5 files changed, 159 insertions, 13 deletions
diff --git a/security/krb5-appl/Makefile b/security/krb5-appl/Makefile index 91bfed0a6bf3..025f1b97ddab 100644 --- a/security/krb5-appl/Makefile +++ b/security/krb5-appl/Makefile @@ -7,7 +7,7 @@ PORTNAME= krb5-appl PORTVERSION= 1.0.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= security MASTER_SITES= http://web.mit.edu/kerberos/dist/${PORTNAME}/${PORTVERSION:C/^[0-9]*\.[0-9]*/&X/:C/X\.[0-9]*$//:C/X//}/ PATCH_SITES= http://web.mit.edu/kerberos/advisories/ @@ -46,10 +46,6 @@ OPTIONS= KRB5_RENAME_FTP "Rename ftp to kftp" off \ .include <bsd.port.pre.mk> -.if ${OSVERSION} > 900007 -BROKEN= fails to build with new utmpx -.endif - .if defined(WITH_KRB5_DOC) BUILD_DEPENDS+= texi2dvi:${PORTSDIR}/print/texinfo \ dvips:${PORTSDIR}/print/dvipsk-tetex diff --git a/security/krb5-appl/files/patch-ba b/security/krb5-appl/files/patch-ba index e8e44ac0cd9b..15a341cdaf59 100644 --- a/security/krb5-appl/files/patch-ba +++ b/security/krb5-appl/files/patch-ba @@ -1,6 +1,33 @@ ---- bsd/login.c.orig Tue May 27 21:06:25 2003 -+++ bsd/login.c Tue Jul 29 20:52:25 2003 -@@ -1342,19 +1342,6 @@ +--- bsd/login.c.orig 2009-11-21 12:29:19.000000000 -0800 ++++ bsd/login.c 2011-08-31 21:56:02.581035877 -0700 +@@ -86,7 +86,12 @@ + #include <netdb.h> + + #include <time.h> ++#ifdef HAVE_UTMP_H + #include <utmp.h> ++#endif ++#ifdef HAVE_UTMPX_H ++#include <utmpx.h> ++#endif + #include <signal.h> + + #include <assert.h> +@@ -225,8 +230,13 @@ + #endif + #ifndef UT_NAMESIZE + /* linux defines it directly in <utmp.h> */ ++#ifdef HAVE_UTMP_H + #define UT_NAMESIZE sizeof(((struct utmp *)0)->ut_name) + #endif ++#ifdef HAVE_UTMPX_H ++#define UT_NAMESIZE sizeof(((struct utmpx *)0)->ut_user) ++#endif ++#endif + + #ifndef HAVE_SETPRIORITY + /* if we don't have it, punt it cleanly */ +@@ -964,19 +974,6 @@ setpriority(PRIO_PROCESS, 0, 0 + PRIO_OFFSET); } @@ -20,9 +47,9 @@ if (got_v5_tickets) { retval = krb5_verify_init_creds(kcontext, &my_creds, NULL, NULL, &xtra_creds, -@@ -1378,6 +1365,9 @@ +@@ -993,6 +990,9 @@ + } } - #endif /* KRB4_GET_TICKETS */ + if (lpass_ok) + break; @@ -30,7 +57,7 @@ bad_login: setpriority(PRIO_PROCESS, 0, 0 + PRIO_OFFSET); -@@ -1667,21 +1657,23 @@ +@@ -1250,21 +1250,23 @@ /* set up credential cache -- obeying KRB5_ENV_CCNAME set earlier */ /* (KRB5_ENV_CCNAME == "KRB5CCNAME" via osconf.h) */ @@ -67,11 +94,27 @@ } else if (forwarded_v5_tickets && rewrite_ccache) { if ((retval = krb5_cc_initialize (kcontext, ccache, me))) { syslog(LOG_ERR, -@@ -1762,6 +1754,7 @@ +@@ -1322,6 +1324,7 @@ if (ccname) setenv("KRB5CCNAME", ccname, 1); + krb5_cc_set_default_name(kcontext, ccname); setenv("HOME", pwd->pw_dir, 1); - setenv("PATH", LPATH, 1); + setenv("PATH", LPATH, 0); +@@ -1652,6 +1655,7 @@ + int quiet; + char *tty; + { ++#if !(defined(__FreeBSD_version)) || (defined(__FreeBSD_version) && (__FreeBSD_version <= 900007)) + #if defined(HAVE_LASTLOG_H) || (defined(BSD) && (BSD >= 199103)) + struct lastlog ll; + time_t lltime; +@@ -1692,6 +1696,7 @@ + (void)close(fd); + } + #endif ++#endif + } + + #undef UNKNOWN diff --git a/security/krb5-appl/files/patch-bsd-krlogind.c b/security/krb5-appl/files/patch-bsd-krlogind.c new file mode 100644 index 000000000000..a7afaf09e7c3 --- /dev/null +++ b/security/krb5-appl/files/patch-bsd-krlogind.c @@ -0,0 +1,26 @@ +--- bsd/krlogind.c.orig 2009-11-21 12:29:19.000000000 -0800 ++++ bsd/krlogind.c 2011-08-31 21:05:10.318698837 -0700 +@@ -236,6 +236,9 @@ + #ifdef HAVE_UTMP_H + #include <utmp.h> + #endif ++#ifdef HAVE_UTMPX_H ++#include <utmpx.h> ++#endif + + int non_privileged = 0; /* set when connection is seen to be from */ + /* a non-privileged port */ +@@ -275,8 +278,13 @@ + #define MAX_PROG_NAME 16 + + #ifndef UT_NAMESIZE /* linux defines it directly in <utmp.h> */ ++#ifdef HAVE_UTMP_H + #define UT_NAMESIZE sizeof(((struct utmp *)0)->ut_name) + #endif ++#ifdef HAVE_UTMPX_H ++#define UT_NAMESIZE sizeof(((struct utmpx *)0)->ut_user) ++#endif ++#endif + + #if HAVE_ARPA_NAMESER_H + #include <arpa/nameser.h> diff --git a/security/krb5-appl/files/patch-libpty-logwtmp.c b/security/krb5-appl/files/patch-libpty-logwtmp.c new file mode 100644 index 000000000000..b6af12eb74c6 --- /dev/null +++ b/security/krb5-appl/files/patch-libpty-logwtmp.c @@ -0,0 +1,16 @@ +--- libpty/logwtmp.c.orig 2009-11-05 12:15:06.000000000 -0800 ++++ libpty/logwtmp.c 2011-08-31 20:37:06.438225202 -0700 +@@ -104,8 +104,13 @@ + ut.ut_host[sizeof(ut.ut_host) - 1] = '\0'; + #endif + strncpy(ut.ut_line, tty, sizeof(ut.ut_line)); ++#ifdef HAVE_UTMPX_H ++ strncpy(ut.ut_user, user, sizeof(ut.ut_user)); ++ return ptyint_update_wtmpx(&utx); ++#else + strncpy(ut.ut_name, user, sizeof(ut.ut_name)); + return ptyint_update_wtmp(&ut); ++#endif + + #endif /* !HAVE_LOGWTMP */ + } diff --git a/security/krb5-appl/files/patch-libpty-update_wtmp.c b/security/krb5-appl/files/patch-libpty-update_wtmp.c new file mode 100644 index 000000000000..8aa80234fc9e --- /dev/null +++ b/security/krb5-appl/files/patch-libpty-update_wtmp.c @@ -0,0 +1,65 @@ +--- libpty/update_wtmp.c.orig 2009-11-05 12:15:06.000000000 -0800 ++++ libpty/update_wtmp.c 2011-08-31 20:51:26.695908790 -0700 +@@ -50,8 +50,13 @@ + ptyint_update_wtmpx(struct utmpx *ent) + { + #if !(defined(HAVE_UPDWTMPX) && defined(WTMPX_FILE)) ++#ifdef HAVE_UTMPX_H ++ struct utmpx ut; ++#endif ++#ifdef HAVE_UTMP_H + struct utmp ut; + #endif ++#endif + + #if defined(HAVE_UPDWTMPX) && defined(WTMPX_FILE) + updwtmpx(WTMPX_FILE, ent); +@@ -62,9 +67,17 @@ + getutmp(ent, &ut); + #else /* Emulate getutmp(). Yuck. */ + memset(&ut, 0, sizeof(ut)); ++#ifdef HAVE_UTMPX_H ++ strncpy(ut.ut_user, ent->ut_user, sizeof(ut.ut_user)); ++#else + strncpy(ut.ut_name, ent->ut_user, sizeof(ut.ut_name)); ++#endif + strncpy(ut.ut_line, ent->ut_line, sizeof(ut.ut_line)); ++#ifdef HAVE_UTMPX_H ++ ut.ut_tv.tv_sec = ent->ut_tv.tv_sec; ++#else + ut.ut_time = ent->ut_tv.tv_sec; ++#endif + #ifdef HAVE_STRUCT_UTMP_UT_HOST + strncpy(ut.ut_host, ent->ut_host, sizeof(ut.ut_host)); + ut.ut_host[sizeof(ut.ut_host) - 1] = '\0'; +@@ -88,7 +101,11 @@ + #endif + #endif /* !HAVE_GETUTMP */ + ++#ifdef HAVE_UTMP_H + return ptyint_update_wtmp(&ut); ++#else ++ return 0; ++#endif + #endif /* !(defined(WTMPX_FILE) && defined(HAVE_UPDWTMPX)) */ + } + +@@ -97,8 +114,13 @@ + #if !(defined(WTMPX_FILE) && defined(HAVE_UPDWTMPX)) \ + || !defined(HAVE_SETUTXENT) + ++#ifdef HAVE_UTMP_H + long + ptyint_update_wtmp(struct utmp *ent) ++#ifdef HAVE_SETUTXENT ++long ptyint_update_wtmpx(struct utmpx *utx); ++#endif ++ + { + #ifndef HAVE_UPDWTMP + int fd; +@@ -123,3 +145,4 @@ + } + + #endif ++#endif |