updates
This commit is contained in:
@@ -22,10 +22,6 @@
|
||||
|
||||
#if defined(__linux)
|
||||
#include <pty.h>
|
||||
#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
||||
#include <util.h>
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
|
||||
/* Arbitrary sizes */
|
||||
@@ -802,17 +798,6 @@ ttynew(const char *line, char *cmd, const char *out, char **args)
|
||||
die("ioctl TIOCSCTTY failed: %s\n", strerror(errno));
|
||||
if (s > 2)
|
||||
close(s);
|
||||
#ifdef __OpenBSD__
|
||||
if (pledge("stdio getpw proc exec", NULL) == -1)
|
||||
die("pledge\n");
|
||||
#endif
|
||||
execsh(cmd, args);
|
||||
break;
|
||||
default:
|
||||
#ifdef __OpenBSD__
|
||||
if (pledge("stdio rpath tty proc", NULL) == -1)
|
||||
die("pledge\n");
|
||||
#endif
|
||||
close(s);
|
||||
cmdfd = m;
|
||||
signal(SIGCHLD, sigchld);
|
||||
|
||||
Reference in New Issue
Block a user