Commit Graph

64 Commits

Author SHA1 Message Date
sawka
91667e4dec process special input signals. also allow numeric signals. 2022-12-20 21:58:24 -08:00
sawka
f010758b36 mshell single writes ping packets to detect when the server has died. sends SIGHUP to children 2022-12-05 22:26:13 -08:00
sawka
bdd8381b01 updates/bugfixes for statediff 2022-11-28 18:05:54 -08:00
sawka
605d0899cf checkpoint 2022-11-28 00:15:34 -08:00
sawka
eb3cf80329 fix json marshaling bug for statediff 2022-11-27 14:16:25 -08:00
sawka
4481cddadc checkpoint on statediff. bug fixes. working on more robust error handling for packetsender 2022-11-27 13:47:18 -08:00
sawka
da2fe25fb8 move to simpleexpand 2022-11-22 22:59:29 -08:00
sawka
01821ca094 allow variable comptype 2022-11-09 20:38:47 -08:00
sawka
8939c57dd8 minor, add isempty func for shellstate 2022-10-30 12:52:58 -07:00
sawka
1da450e61c implement reinit, also do not store 'columns' var 2022-10-27 21:59:17 -07:00
sawka
245a1995e2 parse shellvariables with args 2022-10-25 12:31:07 -07:00
sawka
674a6ef11e grab shell vars with export vars 2022-10-24 21:26:39 -07:00
sawka
d8b5508b77 returnstate option for runpk (for sourcing files) 2022-10-22 14:45:31 -07:00
sawka
b9c3940b99 big change to execution, run command as a script and set aliases/funcs 2022-10-16 23:46:59 -07:00
sawka
1c2c8c2f4d return defined bash aliases in initpk 2022-10-15 13:45:52 -07:00
sawka
ec143de8b4 handle term resize / SIGWINCH, move from mpio to shexec (used UnknownPacketReporter). change signum to signame for cross-system compatibility 2022-09-06 16:40:41 -07:00
sawka
4f4e12c00a add single-from-server option to mshell, send message packets with ck back to server, report unknown packets back to server 2022-09-06 12:57:54 -07:00
sawka
082fb7a8b4 updates to inputpacket. inputpacket is split between datapacket and specialinputpacket 2022-09-05 16:32:08 -07:00
sawka
3936db0429 allow nil for display 2022-08-31 12:45:59 -07:00
sawka
7d06bc766c rename env to env0. add envcomplete bool 2022-08-22 16:24:53 -07:00
sawka
e26705623b add --env mode to mshell to print cwd and environment (for server initpk). needed because OSX does not support 'env -0' 2022-08-22 15:59:03 -07:00
sawka
86a7cd59e6 use cirfile for detached commands 2022-08-19 15:28:32 -07:00
sawka
d4528d1c42 compgen hasmore 2022-08-10 16:07:41 -07:00
sawka
fbb523aed8 implement compgen and cd in mshell server 2022-08-09 14:23:59 -07:00
sawka
74b88185dc add cache for ensuresessiondir 2022-08-08 09:52:50 -07:00
sawka
554f8f1b31 input packet should use base64, add remoteid. allow untailing a full entry (when command is done) 2022-07-07 22:45:14 -07:00
sawka
463187221b update tailer to use filenamegenerator. allow ptyonly option for getcmd 2022-07-07 21:37:17 -07:00
sawka
eb880e024e add hostname to init packet 2022-07-07 13:25:42 -07:00
sawka
2652a3509b add rpc to combined packet parser 2022-07-06 22:46:59 -07:00
sawka
51df0479ff sendpacket with context, initialize rpcmap 2022-07-06 14:35:27 -07:00
sawka
56e1ddf8e6 run packet opt to set term type 2022-07-06 14:06:58 -07:00
sawka
95f11fb418 checkpoint, getting tty output working in non-detached mode 2022-07-06 11:21:15 -07:00
sawka
0d585e5959 clean up --single detached mode 2022-07-06 00:21:44 -07:00
sawka
96123c8e1a checkpoint for tightened runtime semantics for calls -- always send response packets, make sure correct response ids are set, etc. 2022-07-05 23:14:14 -07:00
sawka
0c204e8b2b standardize error reporting, rpc gets resp, command get cmderr, other errors are just sent as messages 2022-07-05 17:45:46 -07:00
sawka
ef362e5ee9 tighten up packet interfaces, RpcPacketType, RpcResponsePacketType, and CommandPacketType 2022-07-05 16:53:31 -07:00
sawka
0a828b7184 tightening up server mode, fix bugs, refactor, etc. 2022-07-01 17:37:37 -07:00
sawka
b6711e7428 sanitize packets to be 7-bit ascii without control chars. dont send data/dataend when no rundata present. use os.Executable to locate mshell if running locally. more work on detached mode 2022-06-29 14:29:38 -07:00
sawka
4d8841a459 use RunPacketBuilder in server mode 2022-06-28 22:05:47 -07:00
sawka
c73691ac24 move static files from remotefd content to 'rundata'. send all rundata before command start. parse rundata before command start. compatible with detached commands 2022-06-28 21:57:30 -07:00
sawka
9054c3cdcc got basic mshell --server functionality working to dispatch multiple commands 2022-06-28 19:01:33 -07:00
sawka
d7eb2526f0 refactor RunClientSSHCommandAndWait for server code 2022-06-28 15:04:08 -07:00
sawka
26479f59c0 pass uname back when mshell isn't found, parse, and give install command 2022-06-27 18:42:56 -07:00
sawka
dafe2b5a57 simplify argument parsing, hard code common ssh options 2022-06-27 14:57:01 -07:00
sawka
6574402691 create packetparser type, refactor to use 2022-06-27 12:14:07 -07:00
sawka
2a6791bcd6 combine sessionid and cmdid into one field ck (commandkey) 2022-06-27 12:03:47 -07:00
sawka
222deff0db implement sudo dance allowing passing the sudo password on stdin with sudo -S, and passing a different stdin fd to the command 2022-06-26 01:41:58 -07:00
sawka
43ed95f8fc clean up combining stdout and stderr into packet parsers, combine the channels and close appropriately 2022-06-25 00:05:37 -07:00
sawka
e6776bd974 checkpoint. transfer binary data as base64. handle cwd. detect open fds. working to transfer data in non-error cases. 2022-06-24 23:42:00 -07:00
sawka
5223760a76 got basic mshell client working -- still need detectfds and extra files support 2022-06-24 13:25:09 -07:00