|
Lines 241-247
do_authenticated1(Authctxt *authctxt)
Link Here
|
| 241 |
{ |
241 |
{ |
| 242 |
Session *s; |
242 |
Session *s; |
| 243 |
char *command; |
243 |
char *command; |
| 244 |
int success, type, screen_flag; |
244 |
int success, type, screen_flag, privileged; |
| 245 |
int enable_compression_after_reply = 0; |
245 |
int enable_compression_after_reply = 0; |
| 246 |
u_int proto_len, data_len, dlen, compression_level = 0; |
246 |
u_int proto_len, data_len, dlen, compression_level = 0; |
| 247 |
|
247 |
|
|
Lines 330-337
do_authenticated1(Authctxt *authctxt)
Link Here
|
| 330 |
debug("Port forwarding not permitted."); |
330 |
debug("Port forwarding not permitted."); |
| 331 |
break; |
331 |
break; |
| 332 |
} |
332 |
} |
|
|
333 |
privileged = have_capability(s->pw->pw_uid, |
| 334 |
CAP_NET_BIND_SERVICE); |
| 333 |
debug("Received TCP/IP port forwarding request."); |
335 |
debug("Received TCP/IP port forwarding request."); |
| 334 |
channel_input_port_forward_request(s->pw->pw_uid == 0, options.gateway_ports); |
336 |
channel_input_port_forward_request(privileged, options.gateway_ports); |
| 335 |
success = 1; |
337 |
success = 1; |
| 336 |
break; |
338 |
break; |
| 337 |
|
339 |
|
|
Lines 1035-1043
do_setup_env(Session *s, const char *she
Link Here
|
| 1035 |
path = child_get_env(env, "PATH"); |
1037 |
path = child_get_env(env, "PATH"); |
| 1036 |
# endif /* HAVE_ETC_DEFAULT_LOGIN */ |
1038 |
# endif /* HAVE_ETC_DEFAULT_LOGIN */ |
| 1037 |
if (path == NULL || *path == '\0') { |
1039 |
if (path == NULL || *path == '\0') { |
| 1038 |
child_set_env(&env, &envsize, "PATH", |
1040 |
path = have_capability(s->pw->pw_uid, |
| 1039 |
s->pw->pw_uid == 0 ? |
1041 |
SSH_PRIVILEGED_LOGIN) ? SUPERUSER_PATH : |
| 1040 |
SUPERUSER_PATH : _PATH_STDPATH); |
1042 |
_PATH_STDPATH; |
|
|
1043 |
child_set_env(&env, &envsize, "PATH", path); |
| 1041 |
} |
1044 |
} |
| 1042 |
# endif /* HAVE_CYGWIN */ |
1045 |
# endif /* HAVE_CYGWIN */ |
| 1043 |
#endif /* HAVE_LOGIN_CAP */ |
1046 |
#endif /* HAVE_LOGIN_CAP */ |