Mercurial > dropbear
comparison common-session.c @ 482:7ad49f34a122
- Add run_shell_command() function to run a "sh -c" command, handling
lots of the work that exechild did (and can be shared by client -J option)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 15 Sep 2008 14:04:55 +0000 |
parents | e3db1f7a2e43 |
children | 738313e73b1c |
comparison
equal
deleted
inserted
replaced
481:357a2e2e9bcc | 482:7ad49f34a122 |
---|---|
412 ret = MIN(AUTH_TIMEOUT, ret); | 412 ret = MIN(AUTH_TIMEOUT, ret); |
413 if (opts.keepalive_secs > 0) | 413 if (opts.keepalive_secs > 0) |
414 ret = MIN(opts.keepalive_secs, ret); | 414 ret = MIN(opts.keepalive_secs, ret); |
415 return ret; | 415 return ret; |
416 } | 416 } |
417 | |
418 const char* get_user_shell() { | |
419 /* an empty shell should be interpreted as "/bin/sh" */ | |
420 if (ses.authstate.pw_shell[0] == '\0') { | |
421 return "/bin/sh"; | |
422 } else { | |
423 return ses.authstate.pw_shell; | |
424 } | |
425 } |