mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 05:17:28 +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() {
|
static char **initshells() {
|
||||||
/* don't touch this list. */
|
static const char *okshells[] = { COMPAT_USER_SHELLS, NULL };
|
||||||
static const char *okshells[] = { "/bin/sh", "/bin/csh", NULL };
|
|
||||||
register char **sp, *cp;
|
register char **sp, *cp;
|
||||||
register FILE *fp;
|
register FILE *fp;
|
||||||
struct stat statb;
|
struct stat statb;
|
||||||
|
@ -79,6 +79,15 @@
|
|||||||
|
|
||||||
#define _PATH_CP "/bin/cp"
|
#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 '~'
|
#define DROPBEAR_ESCAPE_CHAR '~'
|
||||||
|
|
||||||
/* success/failure defines */
|
/* success/failure defines */
|
||||||
|
Loading…
Reference in New Issue
Block a user