Ticket #12554: libfilezilla.2.patch

File libfilezilla.2.patch, 1.8 KB (added by Bjorn Ketelaars, 3 years ago)
  • configure.ac

    diff --git configure.ac configure.ac
    index 54599e1..3b4b213 100644
    AC_CHECK_FUNCS(posix_fadvise)  
    8181
    8282AC_CHECK_FUNCS(poll pipe2 accept4)
    8383
     84AC_CHECK_FUNCS(getspnam_r crypt_r, impersonation=1, impersonation=0)
     85
    8486# eventfd is preferred over selfpipe, half the descriptors after all.
    8587CHECK_EVENTFD
    8688
    AC_SUBST(LIBFILEZILLA_LINGUAS_MO)  
    365367AM_CONDITIONAL(FZ_WINDOWS, test "$windows" = "1")
    366368AM_CONDITIONAL(FZ_MAC, test "$mac" = "1")
    367369AM_CONDITIONAL(FZ_UNIX, test "$unix" = "1")
     370AM_CONDITIONAL(FZ_IMPERSONATION, test "$impersonation" = "1")
    368371AM_CONDITIONAL(HAVE_CPPUNIT, [test "$have_cppunit" = "yes"])
    369372AM_CONDITIONAL([LOCALES_ONLY], [test "$localesonly" = "yes"])
    370373AM_CONDITIONAL([LOCALES], [test "$locales" = "yes"])
  • demos/Makefile.am

    diff --git demos/Makefile.am demos/Makefile.am
    index 15dc949..1b3ee7d 100644
    list_LDADD += $(libdeps)  
    5656list_DEPENDENCIES = ../lib/libfilezilla.la
    5757
    5858if FZ_UNIX
     59if FZ_IMPERSONATION
    5960noinst_PROGRAMS += impersonation
    6061
    6162impersonation_SOURCES = impersonation.cpp
    impersonation_LDADD += $(libdeps)  
    7172
    7273impersonation_DEPENDENCIES = ../lib/libfilezilla.la
    7374endif
     75endif
    7476
    7577dist_noinst_DATA = \
    7678    demo_events.vcxproj \
  • lib/impersonation.cpp

    diff --git lib/impersonation.cpp lib/impersonation.cpp
    index 58a3780..1e71483 100644
     
    11#include "libfilezilla/impersonation.hpp"
    22
    3 #if FZ_UNIX
     3#if FZ_UNIX && FZ_IMPERSONATION
    44
    55#include "libfilezilla/buffer.hpp"
    66
  • lib/process.cpp

    diff --git lib/process.cpp lib/process.cpp
    index 118108e..7ccea60 100644
    public:  
    429429                }
    430430            }
    431431
    432 #if FZ_UNIX
     432#if FZ_UNIX && FZ_IMPERSONATION
    433433            if (it && *it) {
    434434                if (!set_process_impersonation(*it)) {
    435435                    _exit(1);