00001 #ifndef VSF_TWOPROCESS_H 00002 #define VSF_TWOPROCESS_H 00003 00004 struct mystr; 00005 struct vsf_session; 00006 00007 /* vsf_two_process_start() 00008 * PURPOSE 00009 * Called to start FTP login processing using the two process model. This 00010 * launches the unprivileged child to process the FTP login. 00011 * PARAMETERS 00012 * p_sess - the current session object 00013 */ 00014 void vsf_two_process_start(struct vsf_session* p_sess); 00015 00016 /* vsf_two_process_login() 00017 * PURPOSE 00018 * Called to propose a login using the two process model. 00019 * PARAMETERS 00020 * p_sess - the current session object 00021 * p_pass_str - the proposed password 00022 */ 00023 void vsf_two_process_login(struct vsf_session* p_sess, 00024 const struct mystr* p_pass_str); 00025 00026 /* vsf_two_process_get_priv_data_sock() 00027 * PURPOSE 00028 * Get a privileged port 20 bound data socket using the two process model. 00029 * PARAMETERS 00030 * p_sess - the current session object 00031 * RETURNS 00032 * The file descriptor of the privileged socket 00033 */ 00034 int vsf_two_process_get_priv_data_sock(struct vsf_session* p_sess); 00035 00036 /* vsf_two_process_chown_upload() 00037 * PURPOSE 00038 * Change ownership of an uploaded file using the two process model. 00039 * PARAMETERS 00040 * p_sess - the current session object 00041 * fd - the file descriptor to change ownership on 00042 */ 00043 void vsf_two_process_chown_upload(struct vsf_session* p_sess, int fd); 00044 00045 #endif /* VSF_TWOPROCESS_H */ 00046