1 diff -urN build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0/src/racoon/isakmp_cfg.c build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0a/src/racoon/isakmp_cfg.c
2 --- a/src/racoon/isakmp_cfg.c 2010-09-21 16:14:17.000000000 +0300
3 +++ b/src/racoon/isakmp_cfg.c 2011-07-13 11:52:16.000000000 +0300
5 #include <sys/socket.h>
10 #if defined(__APPLE__) && defined(__MACH__)
19 + char term[UT_LINESIZE];
20 char addr[NI_MAXHOST];
22 if (usr == NULL || usr[0]=='\0') {
23 @@ -1670,34 +1671,37 @@
27 - memset(&ut, 0, sizeof ut);
28 - gettimeofday((struct timeval *)&ut.ut_tv, NULL);
29 - snprintf(ut.ut_id, sizeof ut.ut_id, TERMSPEC, port);
30 + sprintf(term, TERMSPEC, port);
33 case ISAKMP_CFG_LOGIN:
34 - ut.ut_type = USER_PROCESS;
35 - strncpy(ut.ut_user, usr, sizeof ut.ut_user);
36 + strncpy(ut.ut_name, usr, UT_NAMESIZE);
37 + ut.ut_name[UT_NAMESIZE - 1] = '\0';
39 + strncpy(ut.ut_line, term, UT_LINESIZE);
40 + ut.ut_line[UT_LINESIZE - 1] = '\0';
42 GETNAMEINFO_NULL(raddr, addr);
43 - strncpy(ut.ut_host, addr, sizeof ut.ut_host);
44 + strncpy(ut.ut_host, addr, UT_HOSTSIZE);
45 + ut.ut_host[UT_HOSTSIZE - 1] = '\0';
47 + ut.ut_time = time(NULL);
49 plog(LLV_INFO, LOCATION, NULL,
50 "Accounting : '%s' logging on '%s' from %s.\n",
51 - ut.ut_user, ut.ut_id, addr);
54 + ut.ut_name, ut.ut_line, ut.ut_host);
59 case ISAKMP_CFG_LOGOUT:
60 - ut.ut_type = DEAD_PROCESS;
62 plog(LLV_INFO, LOCATION, NULL,
63 "Accounting : '%s' unlogging from '%s'.\n",
73 plog(LLV_ERROR, LOCATION, NULL, "Unepected inout\n");