00001 #ifndef VSF_ONEPROCESS_H 00002 #define VSF_ONEPROCESS_H 00003 00004 struct mystr; 00005 struct vsf_session; 00006 00007 /* vsf_one_process_start() 00008 * PURPOSE 00009 * Called to start FTP login processing using the one process model. Before 00010 * processing starts, all possible privileges are dropped. 00011 * PARAMETERS 00012 * p_sess - the current session object 00013 */ 00014 void vsf_one_process_start(struct vsf_session* p_sess); 00015 00016 /* vsf_one_process_login() 00017 * PURPOSE 00018 * Called to propose a login using the one process model. Only anonymous 00019 * logins supported! 00020 * PARAMETERS 00021 * p_sess - the current session object 00022 * p_pass_str - the proposed password 00023 */ 00024 void vsf_one_process_login(struct vsf_session* p_sess, 00025 const struct mystr* p_pass_str); 00026 00027 /* vsf_one_process_get_priv_data_sock() 00028 * PURPOSE 00029 * Get a privileged port 20 bound data socket using the one process model. 00030 * PARAMETERS 00031 * p_sess - the current session object 00032 * RETURNS 00033 * The file descriptor of the privileged socket 00034 */ 00035 int vsf_one_process_get_priv_data_sock(struct vsf_session* p_sess); 00036 00037 /* vsf_one_process_chown_upload() 00038 * PURPOSE 00039 * Change ownership of an uploaded file using the one process model. 00040 * PARAMETERS 00041 * p_sess - the current session object 00042 * fd - the file descriptor to change ownership on 00043 */ 00044 void vsf_one_process_chown_upload(struct vsf_session* p_sess, int fd); 00045 00046 #endif /* VSF_ONEPROCESS_H */ 00047