0001-utmpx-builddef.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. Add build option to disable utmpx update code
  2. On some embedded systems the libc may have utmpx support, but the
  3. feature would be redundant. So add a build switch to disable utmpx
  4. updating, similar to compiling on systems without utmpx support.
  5. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
  6. diff -ru vsftpd-3.0.2.orig/builddefs.h vsftpd-3.0.2/builddefs.h
  7. --- vsftpd-3.0.2.orig/builddefs.h 2012-04-05 05:24:56.000000000 +0200
  8. +++ vsftpd-3.0.2/builddefs.h 2014-09-16 14:23:36.128003245 +0200
  9. @@ -4,6 +4,7 @@
  10. #undef VSF_BUILD_TCPWRAPPERS
  11. #define VSF_BUILD_PAM
  12. #undef VSF_BUILD_SSL
  13. +#define VSF_BUILD_UTMPX
  14. #endif /* VSF_BUILDDEFS_H */
  15. diff -ru vsftpd-3.0.2.orig/sysdeputil.c vsftpd-3.0.2/sysdeputil.c
  16. --- vsftpd-3.0.2.orig/sysdeputil.c 2012-09-16 06:18:04.000000000 +0200
  17. +++ vsftpd-3.0.2/sysdeputil.c 2014-09-16 14:26:42.686887724 +0200
  18. @@ -1158,7 +1158,7 @@
  19. #endif /* !VSF_SYSDEP_NEED_OLD_FD_PASSING */
  20. -#ifndef VSF_SYSDEP_HAVE_UTMPX
  21. +#if !defined(VSF_BUILD_UTMPX) || !defined(VSF_SYSDEP_HAVE_UTMPX)
  22. void
  23. vsf_insert_uwtmp(const struct mystr* p_user_str,
  24. @@ -1173,7 +1173,7 @@
  25. {
  26. }
  27. -#else /* !VSF_SYSDEP_HAVE_UTMPX */
  28. +#else /* !VSF_BUILD_UTMPX || !VSF_SYSDEP_HAVE_UTMPX */
  29. /* IMHO, the pam_unix module REALLY should be doing this in its SM component */
  30. /* Statics */
  31. @@ -1238,7 +1238,7 @@
  32. updwtmpx(WTMPX_FILE, &s_utent);
  33. }
  34. -#endif /* !VSF_SYSDEP_HAVE_UTMPX */
  35. +#endif /* !VSF_BUILD_UTMPX || !VSF_SYSDEP_HAVE_UTMPX */
  36. void
  37. vsf_set_die_if_parent_dies()