2 # Currently, proftpd requires all users to have a non-empty shell
3 # field in pwentry. However, it looks like the consensus is to
4 # interpret a missing (undefined) shell in pwentry as /bin/sh.
5 # The patch has been submitted to upstream:
6 # https://github.com/proftpd/proftpd/pull/733
10 @@ -1582,7 +1582,7 @@ if test x"$ac_add_mod_cap" = xyes; then
13 AC_CHECK_HEADERS(bstring.h crypt.h ctype.h execinfo.h iconv.h inttypes.h langinfo.h limits.h locale.h)
14 -AC_CHECK_HEADERS(string.h strings.h stropts.h)
15 +AC_CHECK_HEADERS(paths.h string.h strings.h stropts.h)
16 AC_CHECK_HEADERS(sys/file.h sys/mman.h sys/types.h sys/ucred.h sys/uio.h sys/socket.h)
17 AC_MSG_CHECKING(for net/if.h)
19 --- a/include/options.h
20 +++ b/include/options.h
22 # define PR_TUNABLE_FS_STATCACHE_MAX_AGE 30
25 +/* default shell to use when shell member at pwentry is empty. */
30 +# define PR_DEFAULT_SHELL _PATH_BSHELL
32 +# define PR_DEFAULT_SHELL ""
35 +# define PR_DEFAULT_SHELL ""
38 #endif /* PR_OPTIONS_H */
41 @@ -1860,9 +1860,13 @@ int pr_auth_is_valid_shell(xaset_t *ctx, const char *shell) {
43 unsigned char *require_valid_shell;
45 - if (shell == NULL) {
49 + * if password entry for user account does not provide a shell,
50 + * then we should assume a default one, which is defined
53 + if ((shell == NULL) || (shell[0] == '\0'))
54 + shell = PR_DEFAULT_SHELL;
56 require_valid_shell = get_param_ptr(ctx, "RequireValidShell", FALSE);