1*76d1ef43Sotto /* $OpenBSD: monitor.h,v 1.5 2007/03/01 20:06:27 otto Exp $ */ 2b96c0bc5Shenning 3b96c0bc5Shenning /* 45ab9ebd3Smoritz * Copyright (c) 2004 Moritz Jodeit <moritz@openbsd.org> 5b96c0bc5Shenning * 6b96c0bc5Shenning * Permission to use, copy, modify, and distribute this software for any 7b96c0bc5Shenning * purpose with or without fee is hereby granted, provided that the above 8b96c0bc5Shenning * copyright notice and this permission notice appear in all copies. 9b96c0bc5Shenning * 10b96c0bc5Shenning * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11b96c0bc5Shenning * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12b96c0bc5Shenning * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13b96c0bc5Shenning * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14b96c0bc5Shenning * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15b96c0bc5Shenning * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16b96c0bc5Shenning * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17b96c0bc5Shenning */ 18b96c0bc5Shenning 19b96c0bc5Shenning #ifndef _MONITOR_H 20b96c0bc5Shenning #define _MONITOR_H 21b96c0bc5Shenning 22b96c0bc5Shenning #define FTPD_PRIVSEP_USER "_ftp" 23b96c0bc5Shenning 24b96c0bc5Shenning enum auth_ret { 25b96c0bc5Shenning AUTH_FAILED, 26b96c0bc5Shenning AUTH_SLAVE, 27b96c0bc5Shenning AUTH_MONITOR 28b96c0bc5Shenning }; 29b96c0bc5Shenning 30b96c0bc5Shenning int monitor_init(void); 31b96c0bc5Shenning int monitor_post_auth(void); 32b96c0bc5Shenning void monitor_user(char *); 33b96c0bc5Shenning int monitor_pass(char *); 34efa4b9efSmoritz int monitor_socket(int); 35b96c0bc5Shenning int monitor_bind(int, struct sockaddr *, socklen_t); 36b96c0bc5Shenning 37*76d1ef43Sotto void kill_slave(char *); 38b96c0bc5Shenning 39b96c0bc5Shenning void send_fd(int, int); 40b96c0bc5Shenning int recv_fd(int); 41b96c0bc5Shenning 42b96c0bc5Shenning #endif /* _MONITOR_H */ 43