X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=net%2Fipsec-tools%2Fpatches%2F002-patch8-utmp.patch;fp=net%2Fipsec-tools%2Fpatches%2F002-patch8-utmp.patch;h=0000000000000000000000000000000000000000;hb=8f2692bad1dbdeca2462a257aa097606061f4dd9;hp=16dc9237c97f1e0553e1c2c2a1b7d605ac70f559;hpb=cfa1a1ef9e3fcd68a291ce28ac71edbb5efc231f;p=packages.git diff --git a/net/ipsec-tools/patches/002-patch8-utmp.patch b/net/ipsec-tools/patches/002-patch8-utmp.patch deleted file mode 100644 index 16dc9237c..000000000 --- a/net/ipsec-tools/patches/002-patch8-utmp.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- a/src/racoon/isakmp_cfg.c -+++ b/src/racoon/isakmp_cfg.c -@@ -38,7 +38,7 @@ - #include - #include - --#include -+#include - #if defined(__APPLE__) && defined(__MACH__) - #include - #endif -@@ -1661,7 +1661,8 @@ isakmp_cfg_accounting_system(port, raddr - int inout; - { - int error = 0; -- struct utmpx ut; -+ struct utmp ut; -+ char term[UT_LINESIZE]; - char addr[NI_MAXHOST]; - - if (usr == NULL || usr[0]=='\0') { -@@ -1670,34 +1671,37 @@ isakmp_cfg_accounting_system(port, raddr - return -1; - } - -- memset(&ut, 0, sizeof ut); -- gettimeofday((struct timeval *)&ut.ut_tv, NULL); -- snprintf(ut.ut_id, sizeof ut.ut_id, TERMSPEC, port); -+ sprintf(term, TERMSPEC, port); - - switch (inout) { - case ISAKMP_CFG_LOGIN: -- ut.ut_type = USER_PROCESS; -- strncpy(ut.ut_user, usr, sizeof ut.ut_user); -+ strncpy(ut.ut_name, usr, UT_NAMESIZE); -+ ut.ut_name[UT_NAMESIZE - 1] = '\0'; -+ -+ strncpy(ut.ut_line, term, UT_LINESIZE); -+ ut.ut_line[UT_LINESIZE - 1] = '\0'; - - GETNAMEINFO_NULL(raddr, addr); -- strncpy(ut.ut_host, addr, sizeof ut.ut_host); -+ strncpy(ut.ut_host, addr, UT_HOSTSIZE); -+ ut.ut_host[UT_HOSTSIZE - 1] = '\0'; -+ -+ ut.ut_time = time(NULL); - - plog(LLV_INFO, LOCATION, NULL, - "Accounting : '%s' logging on '%s' from %s.\n", -- ut.ut_user, ut.ut_id, addr); -- -- pututxline(&ut); -+ ut.ut_name, ut.ut_line, ut.ut_host); - -+ login(&ut); -+ - break; - case ISAKMP_CFG_LOGOUT: -- ut.ut_type = DEAD_PROCESS; - - plog(LLV_INFO, LOCATION, NULL, - "Accounting : '%s' unlogging from '%s'.\n", -- usr, ut.ut_id); -- -- pututxline(&ut); -+ usr, term); - -+ logout(term); -+ - break; - default: - plog(LLV_ERROR, LOCATION, NULL, "Unepected inout\n");