1/* 2 * This program is free software; you can redistribute it and/or 3 * modify it under the terms of the GNU General Public License as 4 * published by the Free Software Foundation; either version 2 of 5 * the License, or (at your option) any later version. 6 * 7 * This program is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * GNU General Public License for more details. 11 * 12 * You should have received a copy of the GNU General Public License 13 * along with this program; if not, write to the Free Software 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 15 * MA 02111-1307 USA 16 */ 17#ifndef VSF_TWOPROCESS_H 18#define VSF_TWOPROCESS_H 19 20struct mystr; 21struct vsf_session; 22 23/* vsf_two_process_start() 24 * PURPOSE 25 * Called to start FTP login processing using the two process model. This 26 * launches the unprivileged child to process the FTP login. 27 * PARAMETERS 28 * p_sess - the current session object 29 */ 30void vsf_two_process_start(struct vsf_session* p_sess); 31 32/* vsf_two_process_login() 33 * PURPOSE 34 * Called to propose a login using the two process model. 35 * PARAMETERS 36 * p_sess - the current session object 37 * p_pass_str - the proposed password 38 */ 39void vsf_two_process_login(struct vsf_session* p_sess, 40 const struct mystr* p_pass_str); 41 42/* vsf_two_process_get_priv_data_sock() 43 * PURPOSE 44 * Get a privileged port 20 bound data socket using the two process model. 45 * PARAMETERS 46 * p_sess - the current session object 47 * RETURNS 48 * The file descriptor of the privileged socket 49 */ 50int vsf_two_process_get_priv_data_sock(struct vsf_session* p_sess); 51 52/* vsf_two_process_chown_upload() 53 * PURPOSE 54 * Change ownership of an uploaded file using the two process model. 55 * PARAMETERS 56 * p_sess - the current session object 57 * fd - the file descriptor to change ownership on 58 */ 59void vsf_two_process_chown_upload(struct vsf_session* p_sess, int fd); 60 61#endif /* VSF_TWOPROCESS_H */ 62 63