File: oneprocess.h

package info (click to toggle)
vsftpd 2.0.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 984 kB
  • ctags: 1,059
  • sloc: ansic: 11,743; sh: 86; makefile: 80
file content (47 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (4)
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
#ifndef VSF_ONEPROCESS_H
#define VSF_ONEPROCESS_H

struct mystr;
struct vsf_session;

/* vsf_one_process_start()
 * PURPOSE
 * Called to start FTP login processing using the one process model. Before
 * processing starts, all possible privileges are dropped.
 * PARAMETERS
 * p_sess       - the current session object
 */
void vsf_one_process_start(struct vsf_session* p_sess);

/* vsf_one_process_login()
 * PURPOSE
 * Called to propose a login using the one process model. Only anonymous
 * logins supported!
 * PARAMETERS
 * p_sess       - the current session object
 * p_pass_str   - the proposed password
 */
void vsf_one_process_login(struct vsf_session* p_sess,
                           const struct mystr* p_pass_str);

/* vsf_one_process_get_priv_data_sock()
 * PURPOSE
 * Get a privileged port 20 bound data socket using the one process model.
 * PARAMETERS
 * p_sess       - the current session object
 * RETURNS
 * The file descriptor of the privileged socket
 */
int vsf_one_process_get_priv_data_sock(struct vsf_session* p_sess);

/* vsf_one_process_chown_upload()
 * PURPOSE
 * Change ownership of an uploaded file using the one process model.
 * PARAMETERS
 * p_sess       - the current session object
 * fd           - the file descriptor to change ownership on
 */
void vsf_one_process_chown_upload(struct vsf_session* p_sess, int fd);

#endif /* VSF_ONEPROCESS_H */