Remove deprecated pledge("ioctl")
Unbreaks mosh on recent (> 2017/03/18) OpenBSD systems.
This commit is contained in:
committed by
John Hood
parent
c05793cb22
commit
c0bf8053b2
@@ -577,7 +577,7 @@ static int run_server( const char *desired_ip, const char *desired_port,
|
|||||||
/* Drop unnecessary privileges */
|
/* Drop unnecessary privileges */
|
||||||
#ifdef HAVE_PLEDGE
|
#ifdef HAVE_PLEDGE
|
||||||
/* OpenBSD pledge() syscall */
|
/* OpenBSD pledge() syscall */
|
||||||
if ( pledge( "stdio inet ioctl tty", NULL )) {
|
if ( pledge( "stdio inet tty", NULL )) {
|
||||||
perror( "pledge() failed" );
|
perror( "pledge() failed" );
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ bool STMClient::main( void )
|
|||||||
/* Drop unnecessary privileges */
|
/* Drop unnecessary privileges */
|
||||||
#ifdef HAVE_PLEDGE
|
#ifdef HAVE_PLEDGE
|
||||||
/* OpenBSD pledge() syscall */
|
/* OpenBSD pledge() syscall */
|
||||||
if ( pledge( "stdio inet ioctl tty", NULL )) {
|
if ( pledge( "stdio inet tty", NULL )) {
|
||||||
perror( "pledge() failed" );
|
perror( "pledge() failed" );
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user