Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
1.3 kB · 48 lines
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849/*This file is part of Darling.
Copyright (C) 2017 Lubos Dolezel
Darling is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.
Darling is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.
You should have received a copy of the GNU General Public Licensealong with Darling. If not, see <http://www.gnu.org/licenses/>.*/
#ifndef _SHELLSPAWN_H#define _SHELLSPAWN_H
#ifdef TESTING#define SHELLSPAWN_SOCKPATH "/tmp/shellspawn.sock"#else#define SHELLSPAWN_SOCKPATH "/var/run/shellspawn.sock"#endif
typedef unsigned short shellspawn_cmd_type_t;
enum { SHELLSPAWN_ADDARG = 1, // add shell argument SHELLSPAWN_SETENV, // add env variable string SHELLSPAWN_CHDIR, SHELLSPAWN_GO, // execute the shell now, must also contain file descriptors SHELLSPAWN_SIGNAL, // pass a signal from client SHELLSPAWN_SETUIDGID, // set virtual uid and gid};
struct __attribute__((packed)) shellspawn_cmd{ shellspawn_cmd_type_t cmd; unsigned short data_length; char data[];};
#endif