mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 02:46:58 +00:00
Allow overriding shells for compat getusershell()
This commit is contained in:
parent
71d78653c7
commit
dc3c1a30cf
3
compat.c
3
compat.c
@ -231,8 +231,7 @@ void setusershell() {
|
||||
}
|
||||
|
||||
static char **initshells() {
|
||||
/* don't touch this list. */
|
||||
static const char *okshells[] = { "/bin/sh", "/bin/csh", NULL };
|
||||
static const char *okshells[] = { COMPAT_USER_SHELLS, NULL };
|
||||
register char **sp, *cp;
|
||||
register FILE *fp;
|
||||
struct stat statb;
|
||||
|
@ -79,6 +79,15 @@
|
||||
|
||||
#define _PATH_CP "/bin/cp"
|
||||
|
||||
/* Default contents of /etc/shells if system getusershell() doesn't exist.
|
||||
* Paths taken from getusershell(3) manpage. These can be customised
|
||||
* on other platforms. One the commandline for CFLAGS it would look like eg
|
||||
-DCOMPAT_USER_SHELLS='"/bin/sh","/apps/bin/sh","/data/bin/zsh"
|
||||
*/
|
||||
#ifndef COMPAT_USER_SHELLS
|
||||
#define COMPAT_USER_SHELLS "/bin/sh","/bin/csh"
|
||||
#endif
|
||||
|
||||
#define DROPBEAR_ESCAPE_CHAR '~'
|
||||
|
||||
/* success/failure defines */
|
||||
|
Loading…
Reference in New Issue
Block a user