tree-sitter: update to 0.24.5
[oi-userland.git] / components / network / proftpd / patches / 029.28270615.patch
blob9db8c47b95e112d93ee5bfa17893836f7d13692f
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
8 --- a/configure.in
9 +++ b/configure.in
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)
18 AC_TRY_COMPILE([
19 --- a/include/options.h
20 +++ b/include/options.h
21 @@ -254,4 +254,17 @@
22 # define PR_TUNABLE_FS_STATCACHE_MAX_AGE 30
23 #endif
25 +/* default shell to use when shell member at pwentry is empty. */
26 +#ifdef HAVE_PATHS_H
27 +# include <paths.h>
29 +# ifdef _PATH_BSHELL
30 +# define PR_DEFAULT_SHELL _PATH_BSHELL
31 +# else
32 +# define PR_DEFAULT_SHELL ""
33 +# endif
34 +#else
35 +# define PR_DEFAULT_SHELL ""
36 +#endif
38 #endif /* PR_OPTIONS_H */
39 --- a/src/auth.c
40 +++ b/src/auth.c
41 @@ -1860,9 +1860,13 @@ int pr_auth_is_valid_shell(xaset_t *ctx, const char *shell) {
42 int res = TRUE;
43 unsigned char *require_valid_shell;
45 - if (shell == NULL) {
46 - return res;
47 - }
48 + /*
49 + * if password entry for user account does not provide a shell,
50 + * then we should assume a default one, which is defined
51 + * at compile time.
52 + */
53 + if ((shell == NULL) || (shell[0] == '\0'))
54 + shell = PR_DEFAULT_SHELL;
56 require_valid_shell = get_param_ptr(ctx, "RequireValidShell", FALSE);