-
Notifications
You must be signed in to change notification settings - Fork 3
/
session.h
105 lines (87 loc) · 2.2 KB
/
session.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#ifndef VSF_SESSION_H
#define VSF_SESSION_H
#ifndef VSFTP_STR_H
#include "str.h"
#endif
#ifndef VSF_FILESIZE_H
#include "filesize.h"
#endif
struct vsf_sysutil_sockaddr;
struct mystr_list;
/* This struct contains variables specific to the state of the current FTP
* session
*/
struct vsf_session
{
/* Details of the control connection */
struct vsf_sysutil_sockaddr* p_local_addr;
struct vsf_sysutil_sockaddr* p_remote_addr;
char* p_control_line_buf;
int idle_timeout;
int data_timeout;
/* Details of the data connection */
int pasv_listen_fd;
struct vsf_sysutil_sockaddr* p_port_sockaddr;
int data_fd;
int data_progress;
unsigned int bw_rate_max;
long bw_send_start_sec;
long bw_send_start_usec;
/* Details of the login */
int is_anonymous;
int is_guest;
struct mystr user_str;
struct mystr anon_pass_str;
/* Details of the FTP protocol state */
filesize_t restart_pos;
int is_ascii;
struct mystr rnfr_filename_str;
int abor_received;
int epsv_all;
/* HTTP hacks */
int is_http;
struct mystr http_get_arg;
/* Details of FTP session state */
struct mystr_list* p_visited_dir_list;
/* Details of userids which are interesting to us */
int anon_ftp_uid;
int guest_user_uid;
int anon_upload_chown_uid;
/* Things we need to cache before we chroot() */
struct mystr banned_email_str;
struct mystr email_passwords_str;
struct mystr userlist_str;
struct mystr banner_str;
int tcp_wrapper_ok;
/* Logging related details */
int xferlog_fd;
int vsftpd_log_fd;
struct mystr remote_ip_str;
unsigned long log_type;
long log_start_sec;
long log_start_usec;
struct mystr log_str;
filesize_t transfer_size;
/* Buffers */
struct mystr ftp_cmd_str;
struct mystr ftp_arg_str;
/* Parent<->child comms channel */
int parent_fd;
int child_fd;
/* Other details */
unsigned int num_clients;
unsigned int num_this_ip;
struct mystr home_str;
/* Secure connections state */
int control_use_ssl;
int data_use_ssl;
void* p_ssl_ctx;
void* p_control_ssl;
void* p_data_ssl;
struct mystr control_cert_digest;
int ssl_slave_active;
int ssl_slave_fd;
int ssl_consumer_fd;
unsigned int login_fails;
};
#endif /* VSF_SESSION_H */