From 81480770e74859b0ea98af32adaeab2a592151ff Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sat, 6 Sep 2014 19:14:44 -0400 Subject: [PATCH] Remove libacl support. Not needed and doesn't make much sense without some kind of filesystem locking. --- configure.ac | 15 --------------- src/commands.c | 7 ------- src/crypto.c | 37 ------------------------------------- src/pwmd.c | 5 ----- 4 files changed, 64 deletions(-) diff --git a/configure.ac b/configure.ac index aff214df..f6394a7a 100644 --- a/configure.ac +++ b/configure.ac @@ -196,20 +196,6 @@ AC_ARG_WITH(crackdict, AC_HELP_STRING([--with-crack-dict=PATH], AC_SUBST(crackdict) AC_DEFINE_UNQUOTED(CRACKLIB_DICT, ["$crackdict"], [The location of the cracklib dictionary.]) - -dnl Libacl support (for data files). -AC_ARG_ENABLE(acl, AC_HELP_STRING([--enable-acl], - [Enable Access Control List support]), USE_LIBACL=yes, - USE_LIBACL=no) -if test "x$USE_LIBACL" = "xyes"; then - AC_SEARCH_LIBS([acl_get_file], [acl],, - AC_MSG_ERROR([Missing or incomplete libacl installation.])) - AC_CHECK_HEADER([sys/acl.h],, - AC_MSG_ERROR([Missing or incomplete libacl installation.])) - AC_DEFINE(WITH_LIBACL, 1, [Define if you want libacl support.]) -fi -AM_CONDITIONAL(WITH_LIBACL, [test "x$USE_LIBACL" = "xyes"]) - AC_DEFUN([AC_DEBUG], [ if test "$1"; then @@ -289,7 +275,6 @@ echo " Pinentry binary.: $pinentry" echo " Cracklib........: $WITH_QUALITY" echo " Cracklib dict...: $crackdict" echo " TCP (GnuTLS)....: $USE_GNUTLS" -echo " ACL.............: $USE_LIBACL" if test x"$pwmd_homedir" != "x"; then echo " Home directory..: $pwmd_homedir" diff --git a/src/commands.c b/src/commands.c index 9f87a498..83070dab 100644 --- a/src/commands.c +++ b/src/commands.c @@ -34,10 +34,6 @@ #include #include -#ifdef WITH_LIBACL -#include -#endif - #include "pwmd-error.h" #include @@ -4277,9 +4273,6 @@ getinfo_command (assuan_context_t ctx, char *line) else if (!strcasecmp (line, "version")) { char *buf = str_asprintf ("0x%06x %s%s", VERSION_HEX, -#ifdef WITH_LIBACL - "ACL " -#endif #ifdef WITH_GNUTLS "GNUTLS " #endif diff --git a/src/crypto.c b/src/crypto.c index ad5ee2df..51ca0218 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -29,10 +29,6 @@ #include #include -#ifdef WITH_LIBACL -#include -#endif - #include "pwmd-error.h" #include "util-misc.h" #include "common.h" @@ -1017,17 +1013,6 @@ export_common (assuan_context_t ctx, int inquire, struct crypto_s * crypto, return rc; } -#ifdef WITH_LIBACL -static void -cleanup_acl (void *arg) -{ - acl_t acl = *(acl_t *) arg; - - if (acl) - acl_free (acl); -} -#endif - static gpg_error_t write_header (struct crypto_s *crypto, int fd) { @@ -1115,9 +1100,6 @@ write_file (struct crypto_s *crypto, const char *filename, struct stat st; int fd; gpg_error_t rc = 0; -#ifdef WITH_LIBACL - acl_t acl = NULL; -#endif if (filename) { @@ -1187,23 +1169,12 @@ write_file (struct crypto_s *crypto, const char *filename, } } -#ifdef WITH_LIBACL - pthread_cleanup_push (cleanup_acl, &acl); -#endif if (!rc) { if (fsync (fd) != -1) { if (filename && close (fd) != -1) { -#ifdef WITH_LIBACL - acl = acl_get_file (filename, ACL_TYPE_ACCESS); - if (!acl && errno == ENOENT) - acl = acl_get_file (".", ACL_TYPE_DEFAULT); - if (!acl) - log_write ("ACL: %s: %s", filename, - pwmd_strerror (gpg_error_from_errno (errno))); -#endif if (mode && config_get_boolean (filename, "backup")) { @@ -1228,19 +1199,11 @@ write_file (struct crypto_s *crypto, const char *filename, if (filename && mode) chmod (filename, mode); -#ifdef WITH_LIBACL - if (acl && acl_set_file (filename, ACL_TYPE_ACCESS, acl)) - log_write ("ACL: %s: %s", filename, - pwmd_strerror (gpg_error_from_errno (errno))); -#endif } else rc = gpg_error_from_errno (errno); } -#ifdef WITH_LIBACL - pthread_cleanup_pop (1); -#endif pthread_cleanup_pop (rc ? 1 : 0); // unlink return rc; } diff --git a/src/pwmd.c b/src/pwmd.c index 22e452c0..cbd677ce 100644 --- a/src/pwmd.c +++ b/src/pwmd.c @@ -2798,11 +2798,6 @@ main (int argc, char *argv[]) #else "-WITH_GNUTLS\n" #endif -#ifdef WITH_LIBACL - "+WITH_LIBACL\n" -#else - "-WITH_LIBACL\n" -#endif #ifdef DEBUG "+DEBUG\n" #else -- 2.11.4.GIT