| OLD | NEW |
| 1 diff --git a/channels.h b/channels.h | 1 diff --git a/channels.h b/channels.h |
| 2 --- a/channels.h | 2 --- a/channels.h |
| 3 +++ b/channels.h | 3 +++ b/channels.h |
| 4 @@ -161,9 +161,9 @@ struct Channel { | 4 @@ -161,9 +161,9 @@ struct Channel { |
| 5 | 5 |
| 6 /* default window/packet sizes for tcp/x11-fwd-channel */ | 6 /* default window/packet sizes for tcp/x11-fwd-channel */ |
| 7 #define CHAN_SES_PACKET_DEFAULT (32*1024) | 7 #define CHAN_SES_PACKET_DEFAULT (32*1024) |
| 8 -#define CHAN_SES_WINDOW_DEFAULT (64*CHAN_SES_PACKET_DEFAULT) | 8 -#define CHAN_SES_WINDOW_DEFAULT (64*CHAN_SES_PACKET_DEFAULT) |
| 9 +#define CHAN_SES_WINDOW_DEFAULT (4*CHAN_SES_PACKET_DEFAULT) | 9 +#define CHAN_SES_WINDOW_DEFAULT (4*CHAN_SES_PACKET_DEFAULT) |
| 10 #define CHAN_TCP_PACKET_DEFAULT (32*1024) | 10 #define CHAN_TCP_PACKET_DEFAULT (32*1024) |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 + passwd.pw_shell = "/bin/sh"; | 122 + passwd.pw_shell = "/bin/sh"; |
| 123 + return &passwd; | 123 + return &passwd; |
| 124 +} | 124 +} |
| 125 +#endif | 125 +#endif |
| 126 + | 126 + |
| 127 /* | 127 /* |
| 128 * Main program for the ssh client. | 128 * Main program for the ssh client. |
| 129 */ | 129 */ |
| 130 int | 130 int |
| 131 -main(int ac, char **av) | 131 -main(int ac, char **av) |
| 132 +nacl_main(int ac, char **av) | 132 +main(int ac, char **av) |
| 133 { | 133 { |
| 134 + mkdir("/home", 0777); | 134 + mkdir("/home", 0777); |
| 135 + setenv("HOME", "/home", 1); | 135 + setenv("HOME", "/home", 1); |
| 136 + | 136 + |
| 137 int i, r, opt, exit_status, use_syslog; | 137 int i, r, opt, exit_status, use_syslog; |
| 138 char *p, *cp, *line, *argv0, buf[MAXPATHLEN], *host_arg; | 138 char *p, *cp, *line, *argv0, buf[MAXPATHLEN], *host_arg; |
| 139 char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV]; | 139 char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV]; |
| 140 diff --git a/sshconnect.h b/sshconnect.h | 140 diff --git a/sshconnect.h b/sshconnect.h |
| 141 --- a/sshconnect.h | 141 --- a/sshconnect.h |
| 142 +++ b/sshconnect.h | 142 +++ b/sshconnect.h |
| 143 @@ -55,6 +55,10 @@ void ssh_userauth2(const char *, const char *, char *, Sensi
tive *); | 143 @@ -55,6 +55,10 @@ void ssh_userauth2(const char *, const char *, char *, Sensi
tive *); |
| 144 void ssh_put_password(char *); | 144 void ssh_put_password(char *); |
| 145 int ssh_local_cmd(const char *); | 145 int ssh_local_cmd(const char *); |
| 146 | 146 |
| 147 +#ifdef __native_client__ | 147 +#ifdef __native_client__ |
| 148 +#define PRIV_START | 148 +#define PRIV_START |
| 149 +#define PRIV_END | 149 +#define PRIV_END |
| 150 +#else | 150 +#else |
| 151 /* | 151 /* |
| 152 * Macros to raise/lower permissions. | 152 * Macros to raise/lower permissions. |
| 153 */ | 153 */ |
| 154 @@ -73,3 +77,4 @@ int ssh_local_cmd(const char *); | 154 @@ -73,3 +77,4 @@ int ssh_local_cmd(const char *); |
| 155 strerror(errno)); \ | 155 strerror(errno)); \ |
| 156 errno = save_errno; \ | 156 errno = save_errno; \ |
| 157 } while (0) | 157 } while (0) |
| 158 +#endif | 158 +#endif |
| OLD | NEW |