- use localtime also in logs (#143687)
This commit is contained in:
parent
2850547ca3
commit
78ec8a7d82
55
vsftpd-2.0.1-use_localtime.patch
Normal file
55
vsftpd-2.0.1-use_localtime.patch
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
--- vsftpd-2.0.1/sysutil.c.use_localtime 2005-01-10 10:05:06.000000000 +0100
|
||||||
|
+++ vsftpd-2.0.1/sysutil.c 2005-01-10 10:11:18.172815304 +0100
|
||||||
|
@@ -2372,7 +2372,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
const char*
|
||||||
|
-vsf_sysutil_get_current_date(void)
|
||||||
|
+vsf_sysutil_get_current_date(int use_localtime)
|
||||||
|
{
|
||||||
|
static char datebuf[64];
|
||||||
|
time_t curr_time;
|
||||||
|
@@ -2380,7 +2380,11 @@
|
||||||
|
int i = 0;
|
||||||
|
vsf_sysutil_update_cached_time();
|
||||||
|
curr_time = vsf_sysutil_get_cached_time_sec();
|
||||||
|
- p_tm = localtime(&curr_time);
|
||||||
|
+ if (!use_localtime) {
|
||||||
|
+ p_tm = gmtime(&curr_time);
|
||||||
|
+ } else {
|
||||||
|
+ p_tm = localtime(&curr_time);
|
||||||
|
+ }
|
||||||
|
if (strftime(datebuf, sizeof(datebuf), "%a %b!%d %H:%M:%S %Y", p_tm) == 0)
|
||||||
|
{
|
||||||
|
die("strftime");
|
||||||
|
--- vsftpd-2.0.1/logging.c.use_localtime 2004-07-02 13:23:26.000000000 +0200
|
||||||
|
+++ vsftpd-2.0.1/logging.c 2005-01-10 10:11:05.716708920 +0100
|
||||||
|
@@ -171,7 +171,7 @@
|
||||||
|
long delta_sec;
|
||||||
|
enum EVSFLogEntryType what = (enum EVSFLogEntryType) p_sess->log_type;
|
||||||
|
/* Date - vsf_sysutil_get_current_date updates cached time */
|
||||||
|
- str_alloc_text(p_str, vsf_sysutil_get_current_date());
|
||||||
|
+ str_alloc_text(p_str, vsf_sysutil_get_current_date(tunable_use_localtime));
|
||||||
|
str_append_char(p_str, ' ');
|
||||||
|
/* Transfer time (in seconds) */
|
||||||
|
delta_sec = vsf_sysutil_get_cached_time_sec() - p_sess->log_start_sec;
|
||||||
|
@@ -241,7 +241,7 @@
|
||||||
|
const struct mystr* p_log_str)
|
||||||
|
{
|
||||||
|
/* Date - vsf_sysutil_get_current_date updates cached time */
|
||||||
|
- str_alloc_text(p_str, vsf_sysutil_get_current_date());
|
||||||
|
+ str_alloc_text(p_str, vsf_sysutil_get_current_date(tunable_use_localtime));
|
||||||
|
/* Pid */
|
||||||
|
str_append_text(p_str, " [pid ");
|
||||||
|
str_append_ulong(p_str, vsf_sysutil_getpid());
|
||||||
|
--- vsftpd-2.0.1/sysutil.h.use_localtime 2004-06-04 12:11:52.000000000 +0200
|
||||||
|
+++ vsftpd-2.0.1/sysutil.h 2005-01-10 10:11:23.252043144 +0100
|
||||||
|
@@ -288,7 +288,7 @@
|
||||||
|
void vsf_sysutil_set_umask(unsigned int umask);
|
||||||
|
void vsf_sysutil_make_session_leader(void);
|
||||||
|
void vsf_sysutil_tzset(void);
|
||||||
|
-const char* vsf_sysutil_get_current_date(void);
|
||||||
|
+const char* vsf_sysutil_get_current_date(int use_localtime);
|
||||||
|
void vsf_sysutil_qsort(void* p_base, unsigned int num_elem,
|
||||||
|
unsigned int elem_size,
|
||||||
|
int (*p_compar)(const void *, const void *));
|
@ -1,5 +1,5 @@
|
|||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd.ftpusers onerr=succeed
|
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
|
||||||
auth required pam_stack.so service=system-auth
|
auth required pam_stack.so service=system-auth
|
||||||
auth required pam_shells.so
|
auth required pam_shells.so
|
||||||
account required pam_stack.so service=system-auth
|
account required pam_stack.so service=system-auth
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Summary: vsftpd - Very Secure Ftp Daemon
|
Summary: vsftpd - Very Secure Ftp Daemon
|
||||||
Name: vsftpd
|
Name: vsftpd
|
||||||
Version: 2.0.1
|
Version: 2.0.1
|
||||||
Release: 7
|
Release: 8
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://vsftpd.beasts.org/
|
URL: http://vsftpd.beasts.org/
|
||||||
@ -23,7 +23,7 @@ Patch6: vsftpd-1.2.1-conffile.patch
|
|||||||
Patch7: vsftpd-2.0.1-build_ssl.patch
|
Patch7: vsftpd-2.0.1-build_ssl.patch
|
||||||
Patch8: vsftpd-2.0.1-server_args.patch
|
Patch8: vsftpd-2.0.1-server_args.patch
|
||||||
Patch9: vsftpd-2.0.1-dir.patch
|
Patch9: vsftpd-2.0.1-dir.patch
|
||||||
Patch10: vsftpd-2.0.1-pam.patch
|
Patch10: vsftpd-2.0.1-use_localtime.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
%if %{tcp_wrappers}
|
%if %{tcp_wrappers}
|
||||||
BuildPrereq: tcp_wrappers
|
BuildPrereq: tcp_wrappers
|
||||||
@ -59,6 +59,7 @@ cp %{SOURCE1} .
|
|||||||
%patch7 -p1 -b .build_ssl
|
%patch7 -p1 -b .build_ssl
|
||||||
%patch8 -p1 -b .server_args
|
%patch8 -p1 -b .server_args
|
||||||
%patch9 -p1 -b .dir
|
%patch9 -p1 -b .dir
|
||||||
|
%patch10 -p1 -b .use_localtime
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%ifarch s390x
|
%ifarch s390x
|
||||||
@ -117,6 +118,9 @@ fi
|
|||||||
/var/ftp
|
/var/ftp
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 10 2005 Radek Vokal <rvokal@redhat.com> 2.0.1-8
|
||||||
|
- use localtime also in logs (#143687)
|
||||||
|
|
||||||
* Tue Dec 14 2004 Radek Vokal <rvokal@redhat.com> 2.0.1-7
|
* Tue Dec 14 2004 Radek Vokal <rvokal@redhat.com> 2.0.1-7
|
||||||
- fixing directory in vsftpd.pam file (#142805)
|
- fixing directory in vsftpd.pam file (#142805)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user