1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-16 08:20:24 +08:00

Revert "AUTH-1941: Adds initial SSH server implementation"

This reverts commit e9c9bf3cbd.
This commit is contained in:
Michael Borkenstein
2019-08-20 17:19:39 -05:00
parent 026f2d1cc9
commit 47254113ee
62 changed files with 9 additions and 3372 deletions

View File

@@ -1,33 +0,0 @@
package pty
import (
"os"
"syscall"
"unsafe"
)
func open() (pty, tty *os.File, err error) {
/*
* from ptm(4):
* The PTMGET command allocates a free pseudo terminal, changes its
* ownership to the caller, revokes the access privileges for all previous
* users, opens the file descriptors for the pty and tty devices and
* returns them to the caller in struct ptmget.
*/
p, err := os.OpenFile("/dev/ptm", os.O_RDWR|syscall.O_CLOEXEC, 0)
if err != nil {
return nil, nil, err
}
defer p.Close()
var ptm ptmget
if err := ioctl(p.Fd(), uintptr(ioctl_PTMGET), uintptr(unsafe.Pointer(&ptm))); err != nil {
return nil, nil, err
}
pty = os.NewFile(uintptr(ptm.Cfd), "/dev/ptm")
tty = os.NewFile(uintptr(ptm.Sfd), "/dev/ptm")
return pty, tty, nil
}