1 /****************************************************************************** 2 (c) 2000-2003 Christine Caulfield christine.caulfield@googlemail.com 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2 of the License, or 7 any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 ******************************************************************************/ 14 15 class ServerSession: public LATSession 16 { 17 public: 18 ServerSession(class LATConnection &p, 19 LAT_SessionStartCmd *cmd, 20 std::string shellcmd, 21 uid_t uid, gid_t gid, 22 unsigned char remid, unsigned char localid, bool clean); 23 24 virtual int new_session(unsigned char *remote_node, 25 char *service, char *port, unsigned char c); 26 27 28 protected: 29 virtual int send_login_response(); 30 31 int create_session(unsigned char *remote_node); 32 33 std::string command; 34 uid_t cmd_uid; 35 gid_t cmd_gid; 36 37 private: 38 void execute_command(const char *command); 39 void close_all_fds(); 40 }; 41