File aide-xattr-in-libc.patch of Package aide
Index: aide-0.19/configure.ac
===================================================================
--- aide-0.19.orig/configure.ac
+++ aide-0.19/configure.ac
@@ -59,7 +59,7 @@ dnl Do the right thing for glibc...
AIDE_DEFS="-D_GNU_SOURCE"
dnl This is borrowed from libtool
-
+
if test $ac_cv_c_compiler_gnu = yes; then
LD_STATIC_FLAG='-static'
@@ -101,54 +101,54 @@ else
# All AIX code is PIC.
LD_STATIC_FLAG='-bnso -bI:/lib/syscalls.exp'
;;
-
+
hpux9* | hpux10* | hpux11*)
# Is there a better LD_STATIC_FLAG that works with the bundled CC?
## wl='-Wl,'
LD_STATIC_FLAG="${wl}-a ${wl}archive"
## pic_flag='+Z'
;;
-
+
irix5* | irix6*)
## wl='-Wl,'
LD_STATIC_FLAG='-non_shared'
# PIC (with -KPIC) is the default.
;;
-
+
cygwin* | mingw* | os2*)
# We can build DLLs from non-PIC.
;;
-
+
osf3* | osf4* | osf5*)
# All OSF/1 code is PIC.
## wl='-Wl,'
LD_STATIC_FLAG='-non_shared'
;;
-
+
sco3.2v5*)
## pic_flag='-Kpic'
LD_STATIC_FLAG='-dn'
## special_shlib_compile_flags='-belf'
;;
-
+
solaris*)
## pic_flag='-KPIC'
LD_STATIC_FLAG='-Bstatic'
## wl='-Wl,'
;;
-
+
sunos4*)
## pic_flag='-PIC'
LD_STATIC_FLAG='-Bstatic'
## wl='-Qoption ld '
;;
-
+
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
## pic_flag='-KPIC'
LD_STATIC_FLAG='-Bstatic'
## wl='-Wl,'
;;
-
+
uts4*)
## pic_flag='-pic'
LD_STATIC_FLAG='-Bstatic'
@@ -312,8 +312,6 @@ fi
AIDE_PKG_CHECK(selinux, SELinux, no, SELINUX, libselinux, selinux, >= 3.4)
-AIDE_PKG_CHECK(xattr, xattr, no, XATTR, libattr, xattrs)
-
AIDE_PKG_CHECK(capabilities, POSIX 1003.1e capabilities, no, CAPABILITIES, libcap, caps)
AIDE_PKG_CHECK(e2fsattrs, e2fsattrs, no, E2FSATTRS, e2p, e2fsattrs)
Index: aide-0.19/include/db_config.h
===================================================================
--- aide-0.19.orig/include/db_config.h
+++ aide-0.19/include/db_config.h
@@ -19,7 +19,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
#ifndef _DB_CONFIG_H_INCLUDED
#define _DB_CONFIG_H_INCLUDED
@@ -31,7 +31,6 @@
#ifdef WITH_ZLIB
#include <zlib.h>
#endif
-#include "attributes.h"
#include "db_line.h"
#include "list.h"
#include "report.h"
@@ -74,7 +73,7 @@
/* int (*close)(_db_config*); */
/* int db_size; */
/* DB_FIELD* db_order; */
-/* void* local; */
+/* void* local; */
/* }_db_config ; */
typedef enum {
@@ -167,7 +166,7 @@ typedef struct db_config {
int symlinks_found;
DB_ATTR_TYPE attr;
-#ifdef WITH_ACL
+#ifdef WITH_ACL
int no_acl_on_symlinks;
#endif
int warn_dead_symlinks;
Index: aide-0.19/src/do_md.c
===================================================================
--- aide-0.19.orig/src/do_md.c
+++ aide-0.19/src/do_md.c
@@ -41,7 +41,6 @@
#ifdef WITH_XATTR
#include <sys/xattr.h>
-#include <attr/attributes.h>
#endif
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
@@ -314,7 +313,7 @@ md_hashsums calc_hashsums(disk_entry *en
}
void fs2db_line(struct stat* fs,db_line* line) {
-
+
/* inode is always needed for ignoring changed filename */
line->inode=fs->st_ino;
@@ -341,7 +340,7 @@ void fs2db_line(struct stat* fs,db_line*
}else{
line->size=0;
}
-
+
if(ATTR(attr_linkcount)&line->attr){
line->nlink=fs->st_nlink;
}else {
@@ -359,7 +358,7 @@ void fs2db_line(struct stat* fs,db_line*
}else{
line->ctime=0;
}
-
+
if(ATTR(attr_atime)&line->attr){
line->atime=fs->st_atime;
}else{
@@ -447,7 +446,7 @@ void acl2line(db_line* line, int fd, con
acl_free(acl_d);
}
line->acl = ret;
-#endif
+#endif
}
#endif
@@ -599,7 +598,6 @@ void selinux2line(db_line *line, int fd,
}
}
#endif
-
#ifdef WITH_E2FSATTRS
void e2fsattrs2line(db_line* line, int fd, const char *whoami) {
unsigned long flags;