Bugzilla – Attachment 1593 Details for
Bug 1419
Fix PTY handling on Mac OS X
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
pty_release => noop with feature test macro
applepty.diff (text/plain), 1.10 KB, created by
Damien Miller
on 2009-01-21 16:11:52 AEDT
(
hide
)
Description:
pty_release => noop with feature test macro
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2009-01-21 16:11:52 AEDT
Size:
1.10 KB
patch
obsolete
>Index: sshpty.c >=================================================================== >RCS file: /var/cvs/openssh/sshpty.c,v >retrieving revision 1.45 >diff -u -p -r1.45 sshpty.c >--- sshpty.c 26 Oct 2007 04:24:30 -0000 1.45 >+++ sshpty.c 21 Jan 2009 05:11:04 -0000 >@@ -46,6 +46,13 @@ > #define O_NOCTTY 0 > #endif > >+#ifdef __APPLE__ >+# include <AvailabilityMacros.h> >+# if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) >+# define __APPLE_PRIVPTY__ >+# endif >+#endif >+ > /* > * Allocates and opens a pty. Returns 0 if no pty could be allocated, or > * nonzero if a pty was successfully allocated. On success, open file >@@ -78,10 +85,12 @@ pty_allocate(int *ptyfd, int *ttyfd, cha > void > pty_release(const char *tty) > { >- if (chown(tty, (uid_t) 0, (gid_t) 0) < 0) >+#ifndef __APPLE_PRIVPTY__ >+ if (chown(tty, (uid _t) 0, (gid_t) 0) < 0) > error("chown %.100s 0 0 failed: %.100s", tty, strerror(errno)); > if (chmod(tty, (mode_t) 0666) < 0) > error("chmod %.100s 0666 failed: %.100s", tty, strerror(errno)); >+#endif /* __APPLE_PRIVPTY__ */ > } > > /* Makes the tty the process's controlling tty and sets it to sane modes. */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1419
:
1415
|
1416
|
1439
|
1593
|
1594