(from the freebsd-current mailing list) Dnia 06.06.2010 b. f. <bf1...@googlemail.com> napisaĆ/a: > Is anybody planning to update the base system heimdal, which has been > largely untouched since May 2008? In addition to the many other > bug-fixes and improvements in the current version 1.3.3 (see, for > example:
I decided to give it a try. My first steup is to make it compile on FreeBSD. As you know, as of recently FreeBSD-current has no <utmp.h> I have hacked up a small patch to fix this: --- appl/ftp/ftpd/logwtmp.c 2010-05-26 23:53:13.000000000 +0200 +++ appl/ftp/ftpd/logwtmp.c 2010-06-12 22:32:57.373647840 +0200 @@ -104,16 +104,16 @@ static void ftpd_logwtmp_wtmp(char *line, char *name, char *host) { +#ifdef HAVE_UTMP_H static int init = 0; static int fd; -#ifdef WTMPX_FILE - static int fdx; -#endif struct utmp ut; -#ifdef WTMPX_FILE +#endif +#ifdef HAVE_UTMPX_H struct utmpx utx; #endif +#ifdef HAVE_UTMP_H memset(&ut, 0, sizeof(struct utmp)); #ifdef HAVE_STRUCT_UTMP_UT_TYPE if(name[0]) @@ -130,8 +130,9 @@ strncpy(ut.ut_host, host, sizeof(ut.ut_host)); #endif ut.ut_time = time(NULL); +#endif -#ifdef WTMPX_FILE +#ifdef HAVE_UTMPX_H strncpy(utx.ut_line, line, sizeof(utx.ut_line)); strncpy(utx.ut_user, name, sizeof(utx.ut_user)); strncpy(utx.ut_host, host, sizeof(utx.ut_host)); @@ -140,6 +141,7 @@ if (utx.ut_syslen > sizeof(utx.ut_host)) utx.ut_syslen = sizeof(utx.ut_host); #endif +#endif { struct timeval tv; @@ -152,21 +154,18 @@ utx.ut_type = USER_PROCESS; else utx.ut_type = DEAD_PROCESS; -#endif +#ifdef HAVE_UTMPX_H + pututxline(&utx); +#else if(!init){ fd = open(WTMP_FILE, O_WRONLY|O_APPEND, 0); -#ifdef WTMPX_FILE - fdx = open(WTMPX_FILE, O_WRONLY|O_APPEND, 0); -#endif init = 1; } if(fd >= 0) { write(fd, &ut, sizeof(struct utmp)); /* XXX */ -#ifdef WTMPX_FILE - write(fdx, &utx, sizeof(struct utmpx)); -#endif } +#endif } #endif /* !HAVE_ASL_H */ -- << Marcin Cieslak // sa...@saper.info >> _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"