Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi committed Dec 31, 2024
1 parent 3f84425 commit b736b0e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
1 change: 0 additions & 1 deletion pkg/types/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ const (
StubTypeASGIServe string = "asgi/serve"
StubTypeScheduledJob string = "schedule"
StubTypeScheduledJobDeployment string = "schedule/deployment"
StubTypeScheduledJobShell string = "schedule/shell"
StubTypeBot string = "bot"
StubTypeBotDeployment string = "bot/deployment"
StubTypeBotServe string = "bot/serve"
Expand Down
12 changes: 1 addition & 11 deletions pkg/worker/base_runc_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
]
},
"rlimits": [],
"noNewPrivileges": false
"noNewPrivileges": true
},
"root": {
"path": "rootfs",
Expand Down Expand Up @@ -428,16 +428,6 @@
"type": "bind",
"source": "/workspace/sdk",
"options": ["ro", "rbind", "rprivate", "nosuid", "nodev"]
},
{
"destination": "/run/sshd",
"type": "tmpfs",
"source": "tmpfs",
"options": [
"nosuid",
"nodev",
"mode=0755"
]
}
],
"hooks": {
Expand Down
7 changes: 0 additions & 7 deletions sdk/src/beta9/abstractions/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ def posix_shell(chan: "paramiko.Channel"): # noqa: C901

oldtty = termios.tcgetattr(sys.stdin)

# input_history = []

try:
tty.setraw(sys.stdin.fileno())
tty.setcbreak(sys.stdin.fileno())
Expand Down Expand Up @@ -169,22 +167,17 @@ def posix_shell(chan: "paramiko.Channel"): # noqa: C901
# Until we reach the end of the pasted text
while key != END_PASTE:
chan.send(key)
# input_history.append(key)
key = posix_readkey()
# We've exhausted the paste event, wait for next event
continue

if len(key) == 0:
break
chan.send(key)
# input_history.append(key)

finally:
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, oldtty)

# Useful in debugging how control characters were send
# print(input_history)


# thanks to Mike Looijmans for this code
def windows_shell(chan: "paramiko.Channel"):
Expand Down

0 comments on commit b736b0e

Please sign in to comment.