mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 01:32:25 +00:00
Add a new #define to disable pty_pre_init.
OS X dislikes us calling the setuid or setgid syscalls when not privileged, even if we try to set ourselves to the _same_ uid/gid. Since I don't anticipate this code needing to run setuid on OS X, and since I do anticipate wanting to handle multiple ptys in a single process so that pty_pre_init would be useless anyway, the simplest fix seems to me to be just conditioning out the whole of pty_pre_init completely.
This commit is contained in:
parent
e5b266a681
commit
1ce27010dd
@ -259,11 +259,13 @@ static void cleanup_utmp(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NO_PTY_PRE_INIT
|
||||||
static void sigchld_handler(int signum)
|
static void sigchld_handler(int signum)
|
||||||
{
|
{
|
||||||
if (write(pty_signal_pipe[1], "x", 1) <= 0)
|
if (write(pty_signal_pipe[1], "x", 1) <= 0)
|
||||||
/* not much we can do about it */;
|
/* not much we can do about it */;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef OMIT_UTMP
|
#ifndef OMIT_UTMP
|
||||||
static void fatal_sig_handler(int signum)
|
static void fatal_sig_handler(int signum)
|
||||||
@ -395,6 +397,8 @@ static void pty_open_master(Pty pty)
|
|||||||
*/
|
*/
|
||||||
void pty_pre_init(void)
|
void pty_pre_init(void)
|
||||||
{
|
{
|
||||||
|
#ifndef NO_PTY_PRE_INIT
|
||||||
|
|
||||||
Pty pty;
|
Pty pty;
|
||||||
|
|
||||||
#ifndef OMIT_UTMP
|
#ifndef OMIT_UTMP
|
||||||
@ -542,6 +546,9 @@ void pty_pre_init(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* NO_PTY_PRE_INIT */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int pty_real_select_result(Pty pty, int event, int status)
|
int pty_real_select_result(Pty pty, int event, int status)
|
||||||
|
Loading…
Reference in New Issue
Block a user