aide-0.19/0000755000175000017500000000000014774244735006127 5aide-0.19/ChangeLog0000644000175000017500000021427214774244712007624 2025-04-05 Hannes von Haugwitz * Fix build with additional libraries on non-Linux systems * Update NEWS file and aide.conf.5 man page * Move log message to limit log level * Release aide 0.19 2025-03-29 Hannes von Haugwitz * Add log level 'limit' * Fix performance calculation when using --limit 2025-03-28 Hannes von Haugwitz * Fix display of some URLs (closes: #183) 2025-03-25 Hannes von Haugwitz * Handle SIGUSR1 only after config parsing (closes: #181) * Require nettle >= 3.7 and libselinux >= 3.4 2025-03-23 Hannes von Haugwitz * Fix parsing of invalid time values * Fix locking of wrong node * Fix writing of negative time values * Fix listing of attributes * Improve logging * Fix missing parent directory in path check output 2025-03-22 Hannes von Haugwitz * Remove no longer needed caching code * Fix deadlock when using some special attributes 2025-03-16 Hannes von Haugwitz * Open files for reading only after rule tree matching * Fix compilation when O_PATH is not defined 2025-03-10 Hannes von Haugwitz * Add 'version_ge' boolean operator (closes: #83) 2025-03-09 Hannes von Haugwitz * Use O_NONBLOCK when opening files * Add AIDE_VERSION macro variable 2025-03-07 Hannes von Haugwitz * Escape further special characters in JSON strings (closes: #189) 2025-03-02 Hannes von Haugwitz * Minor code improvements and code cleanup * Properly close file descriptors of included config files * Improve some logging 2025-03-01 Hannes von Haugwitz * Add support for file system type restricted rules (Linux only) - add 'fstype' attribute - add '--without-fstype' configure option - closes: #39 2025-02-23 Hannes von Haugwitz * Fix omission of file type in database report section 2025-02-22 Hannes von Haugwitz * Apply rules only to file system entries and no longer to database entries * Fix available hashsums in --version output when using libgcrypt (closes: #187) * Fix display of unknown file type in detailed report section 2025-02-22 yixiangzhike * Remove deprecated hashsums from default config option database_attrs 2025-01-13 Hannes von Haugwitz * Fix calculation of duration 2025-01-12 Hannes von Haugwitz * Refactor file processing code - operate on file descriptor (opened once) - significantly reduce "file has changed" warnings - warn about file change after hash calculation - disable attributes if not supported by file type - improve error handling - improve logging 2025-01-02 Hannes von Haugwitz * Add missing suffix to decimal constants 2025-01-01 Hannes von Haugwitz * Fix entries per second calculation for logging * Limit Linux capabilities to regular files 2024-11-23 Hannes von Haugwitz * Refactor code to prepare for file system type restrictions * move failed JIT compilation log message to DEBUG level 2024-11-10 Hannes von Haugwitz * Remove deprecated hashsums from H default group (closes: #179) 2024-10-14 Hannes von Haugwitz * Update aide.conf man page 2024-10-13 Hannes von Haugwitz * Refactor input database code - use strtok_r instead of flex for tokenizing - support integer and base64 representation for time_t * Refactor output database code - save time_t as integer instead of base64 encoded string 2024-09-03 Hannes von Haugwitz * Fix parsing of lowercase group names (closes: #176) 2024-07-15 Hannes von Haugwitz * Switch from libmhash to libnettle (closes: #150, #164) - add 'sha512_256', sha3_256, and 'sha3_512' hashsums - switch hashsum in R default group from md5 to sha3_256 - deprecate legacy hashsums (md5, sha1, rmd160, gost) - remove unsupported hashsums (haval, crc32, crc32b, tiger, whirlpool) - add limited support for hashsum transitions - add check_hashsum unit test 2024-07-11 Zopolis4 * Set autogen.sh and version.sh as executable 2024-07-08 Marc 'Zugschlus' Haber * Allow version.sh to accept GIT_VERSION from environment 2024-06-16 Hannes von Haugwitz * Add non-recursive negative rules (-) - change semantic of unrestricted (recursive) negative rules - refactor rule matching code - improve output for --path-check and --dry-run - improve file tree processing when using limit * Specify PCRE2 variant in README * Fix typo in macro name * Clean up #include statements * Don't use glib specific TEMP_FAILURE_RETRY macro 2024-06-15 Walter Doekes * Fix escacped typo * Fix JSON escaping of filenames in different_attributes 2024-05-30 Michael Ruigrok * Fix grammar of a/an in aide.conf.5 2024-05-08 Hannes von Haugwitz * Fix concurrent reading of extended attributes (xattrs) 2024-05-05 Hannes von Haugwitz * Raise warning if both input databases are the same * Fix progress bar to show skipped entries for database_new 2024-04-27 Hannes von Haugwitz * Refactor progress bar code * Add check_progress unit test * Add missing library CFLAGS * Add basic check_base64 unit test * Remove unused length_base64 function * Remove AM_CFLAGS/AM_CPPFLAGS variables 2024-04-21 Hannes von Haugwitz * Add check_seltree unit test 2024-04-20 Hannes von Haugwitz * Fix compiler warnings * Fix 64-bit time_t on 32-bit architectures * Fix typo in aide.conf manual page (closes: #165) 2024-01-17 Hannes von Haugwitz * Fix debug logging for returned attributes 2024-01-14 Hannes von Haugwitz * Code cleanup and log improvements 2024-01-13 Hannes von Haugwitz * Code cleanup (remove strip_dbline function) 2024-01-02 Hannes von Haugwitz * Add missing command and option to --help output 2023-12-31 Hannes von Haugwitz * Only remove incompletely written db file if it was created by aide * Show number of skipped files on progress bar 2023-12-29 Hannes von Haugwitz * Improve logging - move COMPARE log level before RULE log level - remove redundant log messages - move some log messages from lower to upper log levels - improve locking 2023-12-19 Hannes von Haugwitz * Refactor signal handling (closes: #147) - do not ignore SIGHUP and SIGTERM signals - remove incompletely written database and exit on SIGHUP, SIGTERM or SIGINT - add exit code 25 for signal interruptions - Update SIGNAL HANDLING section of aide.1 manual page * Fix compiler warnings for printf style functions * Add colors to log output (add '--no-color' parameter) 2023-12-04 Hannes von Haugwitz * Handle an incompletely written input database as an error 2023-12-03 Hannes von Haugwitz * Add '--list' command to list the entries of the database in human-readable format (closes: #9) 2023-11-18 Hannes von Haugwitz * Fix format function attribute for some printf style functions * Fix several compiler warnings for printf style functions (closes: #162), thanks to Mingjie Shen for the initial patch 2023-11-17 Mingjie Shen * Fix condition for error message of failing to open gzipped files 2023-07-30 Hannes von Haugwitz * Remove deprecated config options - 'database' (replaced by 'database_in') - 'summarize_changes' (replaced by 'report_summarize_changes') - 'grouped' (replaced by 'report_grouped') * Remove handling of outdated config parameters/option * Raise log level for some deprecations 2023-07-22 Hannes von Haugwitz * Improve handling of ACL errors 2023-07-21 Hannes von Haugwitz * Fix double free() during report generation (closes: #157) 2023-07-10 Hannes von Haugwitz * Use void for empty function parameter list 2023-07-01 Hannes von Haugwitz * Update GPG key in SECURITY.md 2023-06-29 Hannes von Haugwitz * Fix typo in aide.1 manual page 2023-06-27 Hannes von Haugwitz * Fix child directory processing on equal match (closes: #154) 2023-06-12 Hannes von Haugwitz * Add missing ')' to log message * Fix handling of extended attributes on symlinks (closes: #156) 2023-06-03 Hannes von Haugwitz * Add progress bar (closes: #120) - add new '--no-progress' parameter - log some performance data in 'info' log level * Remove strerror() calls from thread log messages * Use AIDEVERSION only once in sources * Update aide.conf.5 manual page * Adjust memory allocation error messages * Add missing files to 'autoreconf-clean' Makefile target * Don't require database_out for --dry-init * Fix static linking of the aide binary 2023-05-28 Hannes von Haugwitz * Use binary search tree to store node's children 2023-05-10 Hannes von Haugwitz * Handle readlink() errors 2023-04-03 Hannes von Haugwitz * Add another missing lock for tree operations 2023-04-01 Hannes von Haugwitz * Add missing lock for tree operations during file system scan * Use gzread instead of gzgetc 2023-03-12 Hannes von Haugwitz * Adjust documentation of num_workers config option * Require pthread (remove --without-pthread configure option) 2023-03-10 Hannes von Haugwitz * Adjust log messages about check inode attribute comparison 2023-03-08 Hannes von Haugwitz * Add warning if rules contain not compiled-in attributes (closes: #153) 2023-03-06 Hannes von Haugwitz * Remove (obsolete) Todo file 2023-03-05 Hannes von Haugwitz * Remove contrib/ scripts 2023-02-19 Hannes von Haugwitz * README: update expiration date of signing key 2023-02-18 Hannes von Haugwitz * Fix segfault when using --dry-init 2023-02-14 Hannes von Haugwitz * Fix handling of empty growing files 2023-02-06 Hannes von Haugwitz * Release aide 0.18 2023-02-05 Marc Haber * Update aide.conf.5 manual page 2023-01-22 Hannes von Haugwitz * Update man pages * Minor code cleanup * Improve some logging 2023-01-21 Hannes von Haugwitz * Adjust some log messages * Add SECURITY.md to EXTRA_DIST * Remove mmap support for hashsum calculation * Add warning if rule tree is empty * Update --help message * Update --version message 2023-01-20 Hannes von Haugwitz * Limit hashsum calculation of growing files to stat size * Refactor size mismatch warning during hash calculation * Ensure size is always written to database if growing attribute is set 2023-01-19 Hannes von Haugwitz * Fix hash calculation for growing files 2023-01-18 Hannes von Haugwitz * Also ignore bcount attribute for compressed files 2023-01-17 Hannes von Haugwitz * Fix special attributes handling when pthread is not compiled in 2023-01-16 Hannes von Haugwitz * Add 'growing' and 'compressed' special attributes - support uncompressed hashsum comparison for gzip files (closes: #33) - support hashsums for growing files (closes: #34) - 'S' attribute is now deprecated, use 'growing+s' attributes instead - replace 'S' attribute in '>' compound group with 'growing+s' - add new log level 'compare' - improve some logging 2023-01-15 Hannes von Haugwitz * Do not show 'different attributes' message for ignored attributes 2022-11-20 Sam James * Fix bashisms in build system * Fix configure.ac compatibility with Clang 16 2022-11-06 Hannes von Haugwitz * Remove Prelink support (--with-prelink configure option) 2022-11-01 Hannes von Haugwitz * Change default number of workers to 1 (single-thread) * Fix typo in aide.conf manual page 2022-09-04 Marc Haber * Allow executable config files to belong to root as well (closes: #137) 2022-08-20 Hannes von Haugwitz * Fix some compiler warnings * Handle read/write errors in parent/child communication * Escape backslash in JSON strings (closes: #136) * Improve configurability of workers - add num_workers config option (closes: #134) - accept percentage of available processors (closes: #135) 2022-08-13 Hannes von Haugwitz * Support multithreading for hashsum calculation (closes: #12) - add --without-pthread configure option - add new log level 'thread' - add new '--workers' parameter - add new exit code 23 for thread errors - require Autoconf Macro Archive (autoconf-archive) * Support restricted rules with empty restriction (closes: #133) 2022-08-09 Hannes von Haugwitz * Add exit code 22 for memory allocation errors 2022-08-01 Hannes von Haugwitz * Improve some logging 2022-07-31 Hannes von Haugwitz * Fix configure check for headers 2022-07-30 Hannes von Haugwitz * Check for gcrypt if mhash is not available 2022-07-24 Hannes von Haugwitz * Refactor configure.ac - improve --version output - use pkg-config to get link flags * Fix typo in log message (closes: #129) * Update aide.conf.5 manual page - fix backslash escaping (closes: #130) - do not start line with ' (closes: #131) * Fix deep selective matches (closes: #132) 2022-07-10 Hannes von Haugwitz * Change log level for some deprecations * Update manual pages 2022-07-09 Hannes von Haugwitz * Refactor code to scan file system * Use signal-safe write function in signal handler (closes: #100) * Fix error messsage on invalid rule prefix 2022-07-02 Hannes von Haugwitz * Fix SIGBUS handling * Fix segfault in close_md function 2022-06-28 Hannes von Haugwitz * Fork child for hash calculation (closes: #124) 2022-06-17 Hannes von Haugwitz * Adjust some log messages * Update aide.conf.5 manual page * Fix compiler warnings and clean up code * Improve error message for unknown config options 2022-06-16 Hannes von Haugwitz * Add prefix option to directory include macros (closes: #112) 2022-06-15 Hannes von Haugwitz * Add `report_format` option (closes: #18) - available formats: `plain`, `json` 2022-04-18 Hannes von Haugwitz * Fix memory leak on errors during hash calculation (closes: #125) 2022-02-20 Hannes von Haugwitz * Fix handling of duplicate database entries (closes: #122) 2022-02-13 Hannes von Haugwitz * Fix compiler warnings and clean up code 2022-02-12 Hannes von Haugwitz * Clean up #include statements 2022-01-19 Hannes von Haugwitz * Precalculate buffer size in base64 functions (CVE-2021-45417), thanks to David Bouman for reporting this issue 2022-01-18 Hannes von Haugwitz * Handle malformed database lines (closes: #122) * Always add size attribute to database if growing size group is set (closes: #121) 2021-12-31 Hannes von Haugwitz * Improve error message during config parsing (closes: #119) 2021-12-05 Hannes von Haugwitz * Add 'database_in' examples to manual page (closes: #31) * Enable dynamic linking by default (closes: #94, #96, #109) 2021-12-03 Hannes von Haugwitz * Fix autoconf warnings 2021-12-02 Hannes von Haugwitz * Remove re-introduced bashism in configure.ac 2021-12-01 Hannes von Haugwitz * Switch from PCRE to PCRE2 (closes: #116) 2021-11-14 Jason Pyeron * Add missing config.h include (closes: #104) 2021-11-07 Hannes von Haugwitz * Remove bashism in configure.ac 2021-11-05 Hannes von Haugwitz * Disable MD5 hashsum if in libgcrypt FIPS mode (closes: #110) 2021-11-04 Hannes von Haugwitz * Don't fail on missing new line at end of config file (closes: #108) 2021-10-03 Hannes von Haugwitz * Support CRLF line-endings in config files (closes: #107) 2021-06-06 Hannes von Haugwitz * Fix handling of --without-posix-acl configure option, thanks to Ilya Tumaykin for the patch * Mention removal of -r, --report command line option in man page 2021-06-05 Hannes von Haugwitz * Only use the return value of time function 2021-05-24 Hannes von Haugwitz * Fix type of database file pointer (closes: #98) 2021-05-01 Hannes von Haugwitz * Document how to ignore read-only ext2 file attributes (closes: #47) * Add @@if macro - deprecate '@@ifdef', use '@@if defined' instead - deprecate '@@ifndef', use '@@if not defined' instead - deprecate '@@ifhost', use '@@if hostame' instead - deprecate '@@ifnhost', use '@@if not hostname' instead * Add 'exists' boolean function (closes: #87) 2021-04-25 Hannes von Haugwitz * Refactor e2fsattrs code * Improve warning message for cutoff database line (closes: #91) 2021-04-21 Hannes von Haugwitz * Add 'config_check_warn_unrestricted_rules' option (closes: #44) 2021-04-18 Hannes von Haugwitz * Improve error message for negative rule with an attribute expression (closes: #90) * Document changed_attributes report level format (closes: #95) 2021-02-10 Hannes von Haugwitz * Release aide 0.17.3 2021-02-07 Hannes von Haugwitz * Fix group usage in '--after' config line 2021-02-06 Hannes von Haugwitz * Release aide 0.17.2 2021-02-02 Hannes von Haugwitz * Fix null pointer dereference in db_close() * Fix out-of-bounds read of attributes array 2021-01-30 Hannes von Haugwitz * Require file type for --path-check (closes #88) * Release aide 0.17.1 2021-01-29 Hannes von Haugwitz * Fix some typos in log messages 2021-01-27 Hannes von Haugwitz * Fix issue where 'different attributes' message is not shown 2021-01-24 Hannes von Haugwitz * Fix typos in aide.conf manual page 2021-01-24 rui * Remove leftover include of 'error.h' 2021-01-23 Hannes von Haugwitz * Release aide 0.17 2021-01-22 Hannes von Haugwitz * Update manual pages * Remove outdated aide.conf.in 2021-01-21 Hannes von Haugwitz * Update README * Print --help to stdout * Remove manual.html * Add missing free() * Limit number of nested includes 2021-01-18 Hannes von Haugwitz * Add @@x_include_setenv macro * Fix segfault when using variable without value 2021-01-17 Hannes von Haugwitz * Update copyright notices - reformat copyright statements - fix outdated FSF address 2021-01-16 Hannes von Haugwitz * Don't use autoconf input files for man pages * Add exit code 21 for file lock errors * Check for secure permissions of executable config files * Fix rule order in database lexer * Add missing source files to check_aide_SOURCES * Check return value after dynamic memory allocations * Allow empty line with white spaces * Fix off-by-one error and several memory leaks 2021-01-10 Hannes von Haugwitz * Add --dry-init command (closes #28) * Handle stderr during file execution * Fix stdout processing during script execution 2021-01-09 Hannes von Haugwitz * Add @@x_include macro (closes #6) * Adjust directory support for @@include - use regular expression filter - follow symbolic links - don't follow sub-directories 2021-01-07 Hannes von Haugwitz * Fix compiler warnings in report code * Fix default db values * Add --disable-default-db configure option * Add support to disable default config file 2021-01-06 Hannes von Haugwitz * Add directory support for @@include (closes #4) * Fail on 'verbose' option only on evaluation (closes #84) * Add 'report_append' option (closes: #5) * Remove '$Header$' tag from copyright notice 2021-01-05 Hannes von Haugwitz * Add --path-check command * Refactor restriction code * Log command in 'info' log level * Initialise report URLs after configuration parsing 2021-01-04 Hannes von Haugwitz * Check for negative matches in parent directories 2021-01-03 Hannes von Haugwitz * Reduce logging in 'rule' log level * Fix equal rule matching 2021-01-02 Hannes von Haugwitz * Adjust log message about variable redefinition * Adjust log level for 'rules referring to non-existent directory' message * Remove notice about c and I flags enabled at the same time * Extend '--version' output - output is written to stdout (instead of stderr) - add default config values - add available hashsums - add default compound groups * Fix default 'database_in' value * Add new default compound group 'H' 2021-01-01 Hannes von Haugwitz * Fix several segmentation faults * Fail on double slash in rule path 2020-12-30 Hannes von Haugwitz * Refactor logging and config parsing code - Logging related changes: - add log_level option (closes: #21) - add -L, --log-level command line option - remove 'verbose' config option - remove -V, --verbose command line option - introduce named log levels - add 'config' log level (closes: #37) - SIGUSR1 now toggles debug log level - add config file names to log output - cache log lines until log level is set - log messages and errors are always written to stderr - remove warning when input database is '/dev/null' (closes: #35) - Config parsing related changes: - add 'database_in' option (deprecates 'database' option) - handle UTF-8 in path names and rules (closes: #11) - '@' and ' ' in config/rules are now escaped with '\' (closes: #50) - fix line numbers in log messages (closes: #43) - config lines must end with a newline - (restricted) regular rules must start with '/' - allow empty value for macros (closes: #45) - early fail on regular expression errors - fail on invalid/unsupported URLs - deprecate non-alphanumeric characters in group names - code cleanup 2020-12-20 Hannes von Haugwitz * Remove config and database signing code - remove '--with-confighmactype' configure option - remove '--with-confighmackey' configure option - remove '--with-dbhmactype' configure option - remove '--with-dbhmackey' configure option 2020-12-18 Hannes von Haugwitz * aide.conf.5: clarify negative matching behaviour (closes: #82) * aide.conf.5: fix example to ignore /dev directory structure 2020-12-13 Hannes von Haugwitz * Add 'stribog256' and 'stribog512' gcrypt algorithms (closes: #69) * Adjust indent of changed attributes * Remove unused `attr` field from seltree struct * Remove obsolete aide-attributes.sh script * Refactor attributes and hashsum code - change associated letter for message digests changes to 'H' 2020-12-12 Hannes von Haugwitz * Fix report when using report_ignore_e2fsattrs * Document removal of 'ignore_list' and 'report_attributes' options * Remove unused code 2020-08-09 Hannes von Haugwitz * Fix compilation with curl - use pkg-config to get link flags * Remove db name alias code * Remove (unmaintained) Solaris ACL code - remove '--with-sun-acl' configure option * Remove PostgreSQL database backend support 2020-07-14 Hannes von Haugwitz * Fix report of added files (closes #79) 2020-07-13 Hannes von Haugwitz * Fix report when using --update (closes #78) * Fix condition for 'couldn't open file' message (closes #77) 2020-07-11 Hannes von Haugwitz * Enable gost and whirlpool checksums with gcrypt * Fix compilation with gcrypt 2020-07-09 Hannes von Haugwitz * Add support for per-report_url options (closes #19) - add 'report_level' option (see #21) - add 'report_summarize_changes' option (deprecates 'summarize_changes' option) - add 'report_grouped' option (deprecates 'grouped' option) - remove '--with-initial-errors' configure option - remove -r, --report command line option - write non-report messages to stderr - handle report_ignore_added_attrs, report_ignore_removed_attrs, report_ignore_changed_attrs, report_force_attrs as config options - code cleanup 2020-06-16 Hannes von Haugwitz * Refactor seltree code - add seltree_struct.h - add seltree.c - add rx_rule.h and rx_rule.c - fail on errors in regular expressions - code cleanup 2020-06-14 Hannes von Haugwitz * Fix compiler warnings in postgresql code * Fix compilation with postgresql support - use pkg-config to get link flags * Update copyright notices 2020-05-04 Hannes von Haugwitz * Rephrase init database warning 2020-02-25 Hannes von Haugwitz * Remove useless pointer dereference 2020-01-11 Ferenc Erki * Fix typos 2019-12-19 Peter Whittaker * Fix typo in aide.conf.5.in 2019-12-01 Hannes von Haugwitz * Add 'tests/check_aide.h' to check_aide_SOURCES * Add unit test for attributes.c * Remove unused code * Rename compare_db.[hc] to report.[hc] 2019-09-29 Hannes von Haugwitz * Rename report.h to error.h * Remove unused local m4 macros * Remove C99 compliant snprintf implementation 2019-09-22 Hannes von Haugwitz * Show changed attributes in 'different attributes' message 2019-09-22 Hannes von Haugwitz * Refactor attributes code * Remove unsued functions * Use AC_SYS_LARGEFILE for large-file support (closes #16) - require C99 compatible compiler - stop using readdir_r in favor of readdir - remove unused 'size_o member in db_line struct - '--disable-largefile' now disables LFS 2019-09-21 Hannes von Haugwitz * Fix some compiler warnings 2019-07-17 Hannes von Haugwitz * aide.conf.5: fix position of 'C' letter 2019-07-17 Julien DUBOIS * Add support for Linux capabilities 2019-07-06 Hannes von Haugwitz * Change associated letter for message digests changes * Remove unsued lex/yacc code 2019-05-19 Hannes von Haugwitz * Release version 0.16.2 2019-05-18 Hannes von Haugwitz * Fix handling of directory-restricted negative rules (closes #24) * Don't lock '/dev/null' when used as output database (closes #26) * Fix parsing of rules containing '?' quantifier 2019-04-29 Julien DUBOIS * Fix extended attributes support (xattrs) * README: fix typo 2019-03-20 Hannes von Haugwitz * Add 'autoreconf-clean' Makefile target 2019-03-16 Lukáš Jirkovský * Fix processing of go files 2019-02-25 Hannes von Haugwitz * Release version 0.16.1 2019-02-20 Hannes von Haugwitz * Explain arithmetic exit codes in aide.1, thanks to Marc Haber for the patch * Fix build against attr >= 2.4.48 (patch by Ilya Tumaykin) * Use AC_PATH_TOOL to find pkg-config 2019-02-10 Hannes von Haugwitz * Move to GitHub * Update documentation - move end user mailing list to ipi.fi - fix tabs/whitespaces - add mssing release date for 0.16 in NEWS file * Update README - mention AIDE website aide.github.io - remove broken links 2018-12-07 Hannes von Haugwitz * src/do_md.c: fix memory leak in is_prelinked (closes #103), thanks to Robert Springer for the patch 2018-06-23 Hannes von Haugwitz * Fix spelling error 2018-06-17 Hannes von Haugwitz * Fix some compiler warnings 2018-06-10 Hannes von Haugwitz * Add missing include in src/db.c (patch by Ilya Tumaykin) * src/base64.c: fix memory leak in decode_base64 (closes #95) 2018-05-31 Hannes von Haugwitz * Remove aide.spec.in * Remove contrib/mkdailyrelease.sh 2017-11-18 Hannes von Haugwitz * Fix root_prefix option 2017-10-29 Hannes von Haugwitz * Fix short form of --limit parameter 2016-07-25 Hannes von Haugwitz * Release version 0.16 2016-07-11 Hannes von Haugwitz * Fix example aide.conf (xattr -> xattrs) * aide.conf.5: update "SELECTION LINES" section * Released version 0.16rc1 2016-07-10 Hannes von Haugwitz * Fix compilation with latest libaudit * Use AC_PROG_CC_C99 instead of AC_PROG_CC * Add AM_PROG_CC_C_O * aide.conf.in: logfile -> file * Update README * Update manual pages (aide.1 and aide.conf.5) 2016-07-07 Hannes von Haugwitz * Adapt manual to version 0.16 2016-06-08 Hannes von Haugwitz * Add missing break statements 2016-04-15 Hannes von Haugwitz * Released version 0.16b1 2016-04-13 Hannes von Haugwitz * Fix spelling errors * Makefile.am: fix distribution of doc files 2016-04-11 Hannes von Haugwitz * Add 'report_ignore_changed_attrs' option, deprecate 'ignore_list' option * Add 'report_force_attrs' option, deprecate 'report_attributes' option 2016-04-08 Hannes von Haugwitz * Fix some compiler warnings 2016-04-06 Hannes von Haugwitz * Support restricted selection lines 2016-04-02 Hannes von Haugwitz * Adjust file type letters 2016-03-31 Hannes von Haugwitz * Change verbosity levels to ease debugging 2016-03-28 Hannes von Haugwitz * Fix '.*'-rule matching and code cleanup 2016-03-22 Hannes von Haugwitz * Fix compilation issue with e2fsprogs 1.43 2016-03-06 Hannes von Haugwitz * Fix report layout 2016-03-05 Hannes von Haugwitz * Fix segfault when DB_CHECKINODE is used 2016-03-02 Hannes von Haugwitz * Add new '--limit' parameter 2016-03-01 Hannes von Haugwitz * Sort entries of database file 2016-02-27 Hannes von Haugwitz * Switch to Perl 5 Compatible Regular Expressions, changes include: - require PCRE library - drop bundled GNU regexp library * src/commandconf.c: add warning if a group is redefined 2016-02-21 Hannes von Haugwitz * Add new 'database_add_metadata' option 2016-02-20 Hannes von Haugwitz * Add new 'report_quiet' option 2015-11-22 Hannes von Haugwitz * Use single Makefile.am * doc/aide.conf.5.in: minor fixes 2015-11-20 Hannes von Haugwitz * src/gen_list.c: minor code cleanup 2015-11-16 Hannes von Haugwitz * Rewrote handling of ignored/forced attributes, changes include: - new 'report_ignore_added_attrs' option - new 'report_ignore_removed_attrs' option - print human-readable info about ignored attributes in report - code cleanup - bug fixes 2015-11-07 Hannes von Haugwitz * Added new 'report_ignore_e2fsattrs' option 2015-10-31 Hannes von Haugwitz * src/gen_list.c: fixed bug if rules are removed 2015-10-28 Hannes von Haugwitz * src/compare_db.c: fixed total number of entries 2015-08-08 Hannes von Haugwitz * src/compare_db.c: added support for new e2fsattrs flags 2015-05-06 Hannes von Haugwitz * src/compare_db.c: adjusted report layout 2015-03-02 Hannes von Haugwitz * Renamed 'configure.in' to 'configure.ac' 2013-05-20 Hannes von Haugwitz * Print checksums of databases in verbose level 2 or higher (closes feature request 1502032) * Added new 'database_attrs' option * configure.in: fixed compilation with selinux * src/conf_lex.l, src/db_lex.l: fixed definition of YYDEBUG 2013-05-18 Hannes von Haugwitz * configure.in: removed check for 'libcrypt' * Renamed 'detailed_init_report' option to 'report_detailed_init' 2013-05-17 Hannes von Haugwitz * configure.in: - fixed "suspicious cache-id" warnings - removed 'AC_CONFIG_MACRO_DIR' macro * src/Makefile.am: - replaced INCLUDES with AM_CPPFLAGS 2013-05-16 Hannes von Haugwitz * Handle tilde (~) in database paths and report urls * src/compare_db.c: adjusted report layout 2013-05-14 Hannes von Haugwitz * src/db.c: fixed segfault when dbconf->db_out is NULL * Replaced fopen.c with the version from curl-7.30.0 2013-05-08 Hannes von Haugwitz * src/compare_db.c: - fixed output of checksums - use size_t as the type of for loop variable 2013-05-06 Hannes von Haugwitz * src/compare_db.c: - fixed return value of database initialization - minor code cleanup * src/db_file.c, src/do_md.c: - fixed use of unportable %m format * doc/aide.1.in: - fixed format in NOTES section - documented return value of '--compare' and '--update' command 2013-05-04 Hannes von Haugwitz * src/compare_db.c: - changed minimum verbose level for printing the details about added and removed entries to 7 * README: - updated "Source Code Verification" section * Released version 0.16a2 2012-10-10 Hannes von Haugwitz * Added new default group X * src/gen_list.c: fixed stripping of removed attributes 2012-10-08 Hannes von Haugwitz * src/gen_list.c: fixed handling of renamed files - read in databases in one go - read in old database at the end 2012-10-06 Hannes von Haugwitz * Added new report_base16 option 2012-09-05 Hannes von Haugwitz * src/compare_db.c: support older versions of e2fsprogs 2012-06-19 Hannes von Haugwitz * src/db_file.c: added missing format string to dofprintf calls 2011-10-02 Hannes von Haugwitz * Added new detailed_init_report option 2011-09-29 Hannes von Haugwitz * configure.in, include/aide.h, src/db_file.c: - fixed 'undef' compiler warnings 2011-09-24 Hannes von Haugwitz * src/gen_list.c, include/do_md.h, src/do_md.c: - moved selinux2line function to src/do_md.c - moved xattrs2line function to src/do_md.c * src/db_file.c: - declare db_writeacl only if WITH_ACL is defined 2011-09-23 Hannes von Haugwitz * include/db_disk.h, src/db_disk.c, src/db.c: - fixed 'unused-parameter' compiler warning * include/db_disk.h, src/db_disk.c: - removed unused functions (db_disk_read_spec, db_writespec_disk, db_writeline_disk, db_close_disk) * src/db_file.c: - fixed 'unused-but-set-variable' compiler warnings * src/gen_list.c, include/do_md.h, src/do_md.c: - call acl2line only if WITH_ACL is defined 2011-09-22 Hannes von Haugwitz * src/be.c: - declared static functions static * src/commandconf.c: - fixed 'unused-but-set-variable' compiler warning * src/compare_db.c: - fixed some 'format' compiler warnings * src/db.c: - fixed 'unused-but-set-variable' compiler warnings 2011-09-21 Hannes von Haugwitz * include/aide.h, src/aide.c: - declared static functions static 2011-09-20 Hannes von Haugwitz * include/aide.h, src/db_file.c: - fixed format of 8 bytes off_t type 2011-09-17 Hannes von Haugwitz * src/aide.c: - added missing #include 2011-09-09 Rami Lehti * src/base64.c, src/gen_list.c: - changed verbosity levels to ease debugging 2011-09-07 Hannes von Haugwitz * src/commandconf.c: - added missing spaces to "Cannot access config file" message 2011-09-05 Hannes von Haugwitz * Added new root_prefix option * src/do_md.c: - removed unused function (md_init_fail) 2011-09-04 Hannes von Haugwitz * include/gen_list.h, src/gen_list.c: - removed unused functions (add_file_to_list, traverse_tree, gen_list) 2011-09-03 Hannes von Haugwitz * src/gen_list.c: - print list of added files (verbose level >= 2) and their details (verbose level >= 6) if database has been initialized 2011-07-12 Hannes von Haugwitz * src/gen_list.c: - fixed has_str_changed function * src/util.c: - fixed bad free of hostname variable * src/db_file.c: - removed dead code 2011-04-08 Hannes von Haugwitz * src/gen_list.c: - fixed wrong total number of entries if comparing two databases 2011-03-29 Hannes von Haugwitz * src/compare_db.c: - rewrote gen_report function, changes included: - merged gen_report() and report_tree() - added info about verbose level, ignorelist and report_attributes to report if they differ from standard value - changed report if aide found no changes - added info about number of entries if aide found no changes or the database has been initialized - fixed report of added or removed entries if verbose level is 6 or higher and there are only added or removed entries 2011-03-24 Hannes von Haugwitz * src/compare_db.c: - made ignored_attrs and forced_attrs global - added run time to report 2011-03-22 Hannes von Haugwitz * src/compare_db.c: - print "End timestamp" message in report 2011-03-18 Hannes von Haugwitz * src/db_disk.c: - fixed handling of "/" directory inode - got rid of some static variables 2011-03-01 Hannes von Haugwitz * Removed contrib/mkgitsnapshot.sh 2011-02-16 Hannes von Haugwitz * Released version 0.16a1 2011-02-09 Hannes von Haugwitz * README: - adjusted "Source Code Verification" section 2010-12-30 Hannes von Haugwitz * src/compare_db.c: - print "Looks okay" message also in DO_DIFF mode 2010-12-29 Hannes von Haugwitz * include/compare_db.h, src/compare_db.c: - added gen_report function (code copied from src/aide.c) * src/aide.c: - removed code copied to src/compare_db.c * include/compare_db.h: - removed report_tree function 2010-12-28 Hannes von Haugwitz * src/compare_db.c: - use strftime to format timestamps - made width_details, time_format[] and time_string_len constant - added numeric timezone to the date format 2010-12-27 Hannes von Haugwitz * src/compare_db.c: - added xattrs2array, acl2array and get_attribute_values functions - added print_dbline_attributes function, changes included: - wrap attribute values instead of cut them off - side-by-side output of acl and xattrs values - use '|' to separate the old value from the new one - use node->changed_attributes instead of recalculate the changed attributes - print added or removed attributes of changed entries if forced via report_attributes - removed obsolete code - print details about added and removed entries in verbose level 6 or higher, closes feature request 1460461 - print added and removed attribute values of changed entries in verbose level 6 or higher 2010-12-26 Hannes von Haugwitz * src/compare_db.c: - fixed type of summary_char[] - fixed typo in comment 2010-11-27 Hannes von Haugwitz * doc/aide.1.in: - fixed format in FILES section - added hint on how to decode base64 encoded checksums 2010-11-26 Hannes von Haugwitz * doc/manual.html: - applied changes by Jack Blankenship 2010-11-16 Hannes von Haugwitz * src/compare_db.c: - added missing declaration of aclt variable 2010-11-14 Hannes von Haugwitz * src/conf_yacc.y: - fixed declaration of conftext variable * configure.in: - fixed compilation under Solaris * README: - added hint to use --disable-static under Solaris 10/OpenSolaris 2010-10-12 Hannes von Haugwitz * src/gen_list.c, src/do_md.c: - replaced "File" by "Entry" 2010-10-11 Hannes von Haugwitz * src/aide.c, doc/aide.conf.5.in: - enabled summarize_changes by default 2010-09-29 Hannes von Haugwitz * src/compare_db.c: - rewrote summarize_changes feature to work with node->changed_attrs - replaced "files" by "entries" - made e2fsattrs2string static - use S_IFMT to extract the file type code 2010-09-27 Hannes von Haugwitz * src/gen_list.c: - added bytecmp, has_str_changed, has_md_changed, compare_single_acl, has_acl_changed, cmp_xattr_node, have_xattrs_changed (copied and renamed from src/compare_db.c) - added get_changed_attributes function - use get_changed_attributes instead of compare_dbline - save changed attributes in node->changed_attrs * include/compare_db.h, src/compare_db.c: - removed obsolete compare_dbline function 2010-09-24 Hannes von Haugwitz * include/compare_db.h: removed init_rxlst function * include/db_config.h: include seltree.h after #define DB_ATTR_TYPE * include/seltree.h: - use DB_ATTR_TYPE instead of int for attr - added DB_ATTR_TYPE changed_attrs to seltree struct 2010-09-23 Hannes von Haugwitz * src/compare_db.c: - removed unused functions (find_line_match, init_rxlst, eat_files_indir) - compare ignorelist/forced_attrs with DB_ATTR_UNDEF instead of -1 - renamed e2fsattrs2char function to e2fsattrs2string - use str_has_changed instead of compare_str - added debug output to md_has_changed - use md_has_changed instead of compare_md_entries - removed obsolete functions (compare_str, compare_md_entries) 2010-09-17 Hannes von Haugwitz * src/compare_db.c: fixed compiler warning if WITH_AUDIT is not defined 2010-09-11 Hannes von Haugwitz * Documented '-E' in man page and '--help' text 2010-09-10 Richard van den Berg * Released version 0.15.1 * Changed version to post-0.15.1 2010-09-07 Hannes von Haugwitz * Ignore changed file name if attributes does not match * Allow absence of DB_CHECKINODE if file name has changed 2010-08-08 Richard van den Berg * Added mkgitsnapshot.sh to contrib/ * Released version 0.15 * Changed version to post-0.15 2010-08-06 Hannes von Haugwitz * Updated copyright notices of list.h, list.c, md.h, md,c, symboltable.h, symboltable.c, util.h and util.c * Escaped '-' that really mean '-' in man pages * Updated copyright notices of db_config.h, report.h, url.h, conf_yacc.y, db_lex.l and error.c 2010-08-05 Hannes von Haugwitz * Updated copyright notices of db_file.h, db_file.c, db_sql.h, db_sql.c, do_md.h, do_md.c, gen_list.h and gen_list.c 2010-08-04 Hannes von Haugwitz * Updated copyright notices of commandconf.h, commandconf.c, conf_lex.h, conf_lex.l, db.h, db.c and db_list.h 2010-08-03 Hannes von Haugwitz * Updated copyright notices of aide.h, aide.c, be.c, compare_db.h, compare_db.c and db_disk.c 2010-08-02 Richard van den Berg * Removed ], from version string when --with-curl was used, closes bug 3038382 2010-08-01 Richard van den Berg * Released version 0.15-rc1 * Changed version to post-0.15-rc1 2010-07-30 Hannes von Haugwitz * Removed obsolete compare_db function * Updated documentation of the default groups 2010-07-29 Hannes von Haugwitz * Added ftype and e2fsattrs to the default groups L, R and > 2010-07-25 Hannes von Haugwitz * Fixed sorting of files in report by filename 2010-07-24 Hannes von Haugwitz * Added new grouped option * Sort files in report by filename, see feature request 1337718 2010-07-23 Hannes von Haugwitz * Fixed indent of XAttrs output * Fixed report_attributes for XAttrs * Fixed indent of ACL output * Fixed report_attributes for ACL * Fixed report_attributes for Lname and SELinux 2010-07-22 Hannes von Haugwitz * Fixed report_attributes for checksum values * Replaced 'E2fsAttrs' by 'E2FSAttrs' * Fixed report_attributes for string and long values * summarize_changes: made summary string length also for added/removed files dynamic 2010-07-21 Hannes von Haugwitz * Fixed typo in aide.conf man page * summarize_changes: made length of summary string dynamic * Always save the inode to database (needed for DB_CHECKINODE) * Documented ftype and e2fsattrs in aide.conf * Added TFTYPE token * Prompt for ./configure and make only if autoreconf was successful 2010-07-20 Hannes von Haugwitz * Added ext2 file attributes support 2010-06-12 Hannes von Haugwitz * Always add permissions attribute to database * Added AIDEVERSION to report 2010-06-11 Hannes von Haugwitz * Adjusted old database warning message 2010-06-10 Hannes von Haugwitz * Added file type change detection support * Use DB_ATTR_TYPE for ignorelist and forced_attrs 2010-06-09 Hannes von Haugwitz * Fixed handling of size and growing size bits 2010-06-08 Hannes von Haugwitz * Another fix for the changed permissions are always reported issue 2010-06-07 Hannes von Haugwitz * Replaced 'Permissions' by 'Perm' to fit 9 columns * Fit detailed output in 80 columns, closes feature request 1337759 2010-06-05 Richard van den Berg * Released version 0.14.2 * Changed version to post-0.14.2 2010-06-05 Hannes von Haugwitz * Added missing description for '|' in aide.conf man page * Report correct file type in "Detailed information about changes" section * Fixed strcpy issue on multi-core environments 2010-06-04 Hannes von Haugwitz * Replaced 'File' by 'Entry' in database warnings * Reformatted "Entry ... has different attributes" warnings 2010-06-03 Hannes von Haugwitz * Added missing space and new line to "Error in selective regexp" message, fixes bug 1944700 * Added missing '-' to separator line in the report 2010-05-30 Richard van den Berg * Released version 0.14.1 * Changed version to post-0.14.1 2010-05-20 Richard van den Berg * Support spaces and other characters in file paths in config by Byron Darrah * Added aide-attributes.sh script by Hannes von Haugwitz 2010-05-19 Richard van den Berg * Use exit() instead of abort() by Steve Grubb * Fixed changed permissions are always reported issue by Hannes von Haugwitz 2010-04-09 Richard van den Berg * Use DB_ATTR_TYPE for compare_dbline() by Patrick Neely 2010-03-27 Richard van den Berg * Changed version to post-0.14 * Do not use += in configure, fixes bug 2972100 * Change gzdopen() from wb+ to wb, fixes bug 2976146 * Do not strcat into uninitialized data, fixes bug 2919946 * Add missing db_sql prototypes, and Sun Studio compatibility, fixes bug 2888035 * Initialize gcrypt properly, fixes bug 2763470 2010-03-16 Richard van den Berg * Released version 0.14 2010-02-26 Richard van den Berg * Changed version to post-0.14-rc3 * Fixed some AC_ARG_WITH magic * Define ENOATTR if needed by Hannes von Haugwitz 2010-02-25 Richard van den Berg * Released version 0.14-rc2 * Fix xattrs and selinux bits by Hannes von Haugwitz * Released version 0.14-rc3 2010-02-25 Steve Grubb * Additional checks for snprintf.c * Fix off64_t and other size warnings * Correct linker settings 2010-02-24 Richard van den Berg * Re-enable large file support on 32 bit systems by Steve Grubb 2010-02-23 Richard van den Berg * Show -D in --help by Steve Grubb * Refix line->attr&DB_LINKNAME is always true issue by Hannes von Haugwitz 2010-02-22 Richard van den Berg * Released version 0.14-rc1 * Changed version to post-0.14-rc1 2010-02-21 Richard van den Berg * Replaced snprintf.c with the version from rsync-2.6.9 2010-02-21 Hannes von Haugwitz * Fix checksums letter * Always save the permission to database * summarize_changes: Re-enabled file-type detection for removed files * Fix line->attr&DB_LINKNAME is always true issue * Remove localignorelist for changed nodes * Disable DB_ACL bit if acls are not supported 2010-02-18 Richard van den Berg * Adjust building of fopen.c by Steve Grubb * Fix error handling for prelink by Steve Grubb 2010-02-17 Richard van den Berg * Fix several warnings by Steve Grubb * Check LD in configure by Steve Grubb * Fix xattrs typos by Hannes von Haugwitz * Reworked summarize_changes option by Hannes von Haugwitz 2010-02-13 Richard van den Berg * Added autoconf patch from Steve Grubb * Removed AM_PROG_LIBTOOL from configure.in 2010-02-06 Hannes von Haugwitz * Fixed wrong char array size 2010-02-01 Hannes von Haugwitz * Added new option to summarize changes in output file 2009-05-15 Richard van den Berg * Prelink patch by Peter Vrabec 2007-12-20 Richard van den Berg * Fix equals matches, patch by Brian De Wolf 2007-08-22 Richard van den Berg * Turn CR/LF into LF, patch by Steve Conklin 2007-06-05 Richard van den Berg * Display complete selinux context, patch by Steve Conklin 2007-05-15 Richard van den Berg * Quit autogen.sh if required tools are not found 2007-04-27 Richard van den Berg * Only use optional groups in "make check" when enabled * Prevent segfaults in db_write_byte_base64, patch from James Antill * Fix aide.spec, patch by George Hansper 2006-12-19 Richard van den Berg * Do not warn about files not being directories 2006-12-15 Richard van den Berg * Released version 0.13.1 * Changed version to post-0.13.1 2006-12-14 Richard van den Berg * Use lseek() instead of fseek() on aide.db 2006-12-13 Richard van den Berg * Work around for error while reading gzipped aide.db files 2006-12-08 Richard van den Berg * Removed ustat dead code 2006-12-07 Richard van den Berg * Released version 0.13 * Changed version to post-0.13 2006-11-30 Richard van den Berg * Set meaningful exitcodes when --check is used (Pablo Virolainen) 2006-11-29 Richard van den Berg * Changed version to post-0.13-rc2 * Check for WHIRLPOOL so old mhash can be used (Pablo Virolainen) 2006-11-25 Richard van den Berg * Fix error message about HAVAL and CRC32 with --update and gcrypt * Fix --with and --without logic of configure * Make --without switches of configure work * Released version 0.13-rc2 2006-11-24 Richard van den Berg * Remove stpcpy declaration because it is not defined in util.c * Fix segfault when line->cntx is NULL * Add --without-mhash to configure * Don't use DB_SELINUX and DB_XATTR when not present * Fix use of libgcrypt * Add new group 'l' to detect changed link name * Update documentation with new groups * Supply strnlen in utils.c * Released version 0.13-rc1 2006-11-15 Richard van den Berg * Fix syslog URLs (Yves Mettier ) 2006-10-30 Richard van den Berg * Make --with-selinux work without pkg-config 2006-10-27 Richard van den Berg * Added "Add xattr support" patch from James Antill * Added "report miscompares to Linux Audit System" patch from James Antill * Added "Allow building without mhash library" patch from James Antill * Added "correct db_names" patch from Steve Grubb * Added "memory leaks and performance updates" patch from Steve Grubb * Added "deadcode removal" patch from Steve Grubb * Added "change K&R functions to void functions" patch from Steve Grubb * Added "Memleak fix for ACLs, SELinux, XAttr" patch from James Antill 2006-10-10 Richard van den Berg * Added note about rpl_malloc on AIX 5.3 with mhash * Include version.m4 in distribution tar file * No need for absolute $(srcdir) in configure * Use AC_CONFIG_FILES(files..) instead of AC_OUTPUT(files..) * Removed redundant targets from Makefile.am 2006-10-06 Richard van den Berg * Changed version to post-0.12 * Added file locking for output files 2006-10-05 Richard van den Berg * Released version 0.12 2006-10-04 Richard van den Berg * Close database files earlier * Released version 0.12-rc2 2006-09-24 Richard van den Berg * Fixed filesize stored in postgres (SF bug #1177758) 2006-07-15 Richard van den Berg * Released version 0.12-rc1 * Remove the use of NODE_ADD_CHILDREN, hopefully it is no longer needed * Added syntax changed from 10-manpages.dpatch * Added newlines as per SF bug #1461182 * Added report_attributes group (Pablo Virolainen) 2006-06-13 Richard van den Berg * Fix stat type in report_tree() (Heiko Lehmann ) 2006-05-31 Richard van den Berg * Added support for posix_fadvice() (Pablo Virolainen) 2006-04-22 Richard van den Berg * Fix seg faults on OpenBSD (Axel Rau ) 2006-04-22 Richard van den Berg * Fix mmap on HPUX (fredrik@soderblom.org patch 1474555) 2006-03-31 Richard van den Berg * Abort if aide.db does not have checksum when FORCEDBMD is used * Explain aide.conf and aide.db signing 2006-03-29 Richard van den Berg * Add spaces to error messages (Marc Haber) * Don't warn about rules referring to non-existent directories by default 2006-03-25 Richard van den Berg * Allow aide.db to be supplied on stdin (Pablo Virolainen) * Add patch to allow http/https/ftp URLs through libcurl (Pablo Virolainen) 2006-03-17 Richard van den Berg * Use system strnstr when available * Add --disable-static flag to configure 2006-03-13 Richard van den Berg * Applied manual patch from Marc Haber * Added note about problems with mhash 0.9.x 2006-03-12 Richard van den Berg * Mordernize use of AM_INIT_AUTOMAKE * Use AIDEVERSION to avoid clash with VERSION of other packages 2006-02-26 Richard van den Berg * Use @sysconfdir@ as directory in aide.1, SF bug #1438995 2006-02-23 Richard van den Berg * Set AIDEVERSION right after including config.h * Added note about SIGTERM (Marc Haber) 2006-02-18 Richard van den Berg * Released version 0.11 * Changed version to post-0.11 2006-02-14 Richard van den Berg * Fix the broken @@ifhost and @@ifnhost directives by lcn2 (SF bug #1430482) 2006-02-09 Richard van den Berg * Fall back to strtoimax if strtoll is not available * Protect against non existing syslog facilities * Updated aide.spec.in as suggested in SF bug #1428576 2006-02-08 Richard van den Berg * Explicitly check for readdir64, by Virolainen Pablo * Added note about --disable-lfs in README 2006-01-30 Richard van den Berg * Released version 0.11-rc3 * Changed version to post-0.11-rc3 2006-01-29 Richard van den Berg * Fix layout of aide.conf.5 by Vincent Danen * Cleanup --help output by Vincent Danen * Add separators in --check output by Vincent Danen * Add --disable-lfs option to configure 2006-01-22 Richard van den Berg * Allow report_url to change syslog facility * Only warn when DB_CHECKINODE and DB_CTIME are used together * Added GPG scripts by Vincent Danen 2005-12-19 Richard van den Berg * Revert check_list_for_match to old behaviour (Marc Haber) * Documentation update (Marc Haber) 2005-12-12 Richard van den Berg * Log tree matching verbosely, patch by Virolainen Pablo 2005-11-15 Richard van den Berg * Applied 'allow removed files' patch by Virolainen Pablo 2005-11-13 Richard van den Berg * Applied fix to ANF by Virolainen Pablo 2005-11-07 Richard van den Berg * Applied 'allow new files' patch by Virolainen Pablo 2005-11-03 Richard van den Berg * Remove russian translations; they are out of date and there is no static version of gettext available * Do not stop parsing directory at unescaped . * Fix "make dist" and "make check" * Added gpg scripts to contrib * Released version 0.11-rc2 * Changed version to post-0.11-rc2 2005-10-30 Richard van den Berg * Warn if 'I' and 'c' are used together 2005-10-28 Richard van den Berg * Ignore 'c' when 'I' is in effect * Mention in aide.conf.5 that 'c' and 'I' are incompatible 2005-10-26 Richard van den Berg * Check for ino64_t and dirent64 separately since HPUX does not have them 2005-10-25 Richard van den Berg * Print start and stop timestamp together (Marc Haber ) * Print database_out path with -i and -u * Added bzip2.sh to the contrib directory 2005-10-19 Richard van den Berg * Applied patch from Debian bug #121717: aide spelling fixes 2005-10-16 Richard van den Berg * Applied patch 1124758: fix underquoted m4 * Applied patch 1124757: dist-hook missing file snprintf.h * Applied patch 1124760: cleaner automake initialisation * Applied patch 1124782: gettextize related patch 2005-10-07 Richard van den Berg * If open() with NO_ATIME fails, try open() again without it 2005-10-05 Richard van den Berg * Compile aide as a static executable * Fixed some spelling errors caught by Marc Haber * Changed version to Post 0.11-rc1 * Ignore special characters after backslash in directory names (bug #1162575) 2005-10-04 Richard van den Berg * Released aide 0.11-rc1 2005-09-14 Richard van den Berg * Print detailed error message when mmap() returns MAP_FAILED 2005-09-02 Richard van den Berg * Added patch for cygwin compatibility as per bug #1279818 2005-08-10 Richard van den Berg * Open files with O_NOATIME on Linux (per Vlada Macek ) 2005-08-08 Richard van den Berg * Reset fs.st_rdev in 2 additional places as per bug #1253822 2005-06-30 Richard van den Berg * Removed return in conf_lex.l that caused --after to be ignored 2005-06-12 Richard van den Berg * Applied another aide.1.in from Sven Hoexter 2005-06-11 Richard van den Berg * Applied aide.1.in patch from SF bug #1217483 2005-04-28 Richard van den Berg * Added long long support for portable snprintf * Created aide.conf.5.in and aide.conf.5.ru.in as per bug #1103719 2005-04-27 Richard van den Berg * Fixed sshaide.sh as suggested in bug #1100740 * Removed db_writeacl() from db_disk.c as suggested in bug #1143889 * Set st_rdev to 0 when not used as suggested in bug #1169697 2005-04-18 Richard van den Berg * Correctly parse multiple backslashes in file names 2005-04-08 Richard van den Berg * Use configure to define type for storage of file size in aide.db * Applied fix suggested in Debian Bug #237969 2005-04-06 Richard van den Berg * Always include aide.h before any other include file * Include aide.h instead of config.h to avoid multiple inclusions * Fixed large file under Solaris * Make large file support generic (not just for Solaris) 2005-04-05 Richard van den Berg * Fixed bug where shrinking files with S set where not detected 2005-02-20 Richard van den Berg * Removed extra gen_tree() as suggested in patch 985632 * Allow escaping of spaces in filenames (Virolainen Pablo ) * Allow @@{HOSTNAME} usage in aide.conf (Virolainen Pablo ) 2004-11-16 Richard van den Berg * Applied patch 984424: bug fix for "--check recurses when it shouldn't" * Applied patch 853842: sshaide - contributed script 2004-11-12 Richard van den Berg * Fixed patch from Virolainen Pablo * Applied patch id 931224: Ignoring moved files 2004-11-05 Richard van den Berg * Applied patch from Virolainen Pablo to give more infomation when file attributes have changed before calculating the hash 2004-11-04 Richard van den Berg * Make sure readdir_r is POSIX compliant before we use it 2004-11-03 Richard van den Berg * Applied patch 1058973: Please don't add -I$(prefix)/include * Fixed bug 836253: Manual is wrong about --check command * Applied fix in config parser to avoid 10000 line limit 2004-11-02 Richard van den Berg * Fixed various documentation bugs filed as sf.net 2004-10-29 Richard van den Berg * Use syslog() for systems that do not have vsyslog() * Fixed file system traversing bug for systems without readdir_r * Fixed bug 836257: Line numbers in verbose output off by one 2004-10-28 Richard van den Berg * Removed config.h.in * Added ISO C99 compliant snprintf for systems that do not have it 2004-10-26 Richard van den Berg * Added check for ISO C99 compliant vsnprintf to configure.in 2004-10-23 Richard van den Berg * Applied PSQL patch from Marc Giger * Set version to "Post 0.10" * Removed aide.1 and aide.1.ru since they are created by configure * Moved #endif for WITH_MHASH in commandconf.c thanks to berkeley@octagon.com.au 2003-12-08 Richard van den Berg * Applied patch 853842 "sshaide - contributed script" * Applied patch 855639 "Updated README file" 2003-12-02 Richard van den Berg * Fixed bug 851671 Aide-0.10 --config-check dumps core 2003-11-28 Richard van den Berg * Released aide version 0.10 * Applied patch 849857 "cosmetic report fix" thanks to John Kristoff 2003-11-25 Mike Markley * Applied patch from bug 848664 "crash in db_input_wrapper (gzip)" thanks to Matt Kettler 2003-11-04 Richard van den Berg * Fixed typo in compare_db.c, closes bug 836255 thanks to Michael Schwendt * Applied patch 801860, fixes bug 801857 "=/$ gives segfault" thanks to Michael Schwendt * Applied patch 803001 "Fix for some memory leaks" thanks to Michael Schwendt * Applied patch 801853 "getopt optstring is wrong" thanks to Michael Schwendt 2003-10-03 Richard van den Berg * Moved project over to http://sf.net/projects/aide * Fixed problems in conf_yacc.y * Gzip code now uses best (-9) compression 2002-07-22 Rami Lehti * Fixed Unimplemented error message when conf md not compiled in * Fixed error message about nonexistant files. * Fixed --with-extra-includes --with-extra-libs handling (I hope) * Fixed *stat handling 2002-06-04 Rami Lehti * Released 0.9 2002-05-31 Rami Lehti * Fixed a bug in memory handling causing corrupt md's * Added --without-mmap configure option 2002-05-29 Rami Lehti * Updated version to 0.9 * Fixed loads of bugs * This file should be updated more often * Added support for md checked config and db * Updated Copyright notices * Changed checking algorithm (threading here we come) 2002-02-10 Rami Lehti * Fixed loads and loads of bugs * Added syslog backend * Report format changed * added lots of parameters see man page and configure --help * added ACL support for SunOS 5.x (and compatibles) * Released 0.8 (This is an unstable release) 2000-04-27 Rami Lehti * Added static link flag checking * Released 0.7 2000-04-13 Rami Lehti * Added linkname checking * Removed mhash snefru and fixed haval * Mhash 0.8.1 required. 2000-02-08 Rami Lehti * Changed version to 0.7 2000-02-08 Rami Lehti * Fixed core dump bug in compare_db * Added warning when config has changed * Released 0.6 2000-01-18 Virolainen Pablo * Handles config filename '-' as stdin. Manpage update. 1999-12-30 Rami Lehti * Fixed compilation problem with glibc 2.1 1999-12-29 Rami Lehti * Finally fixed wrong md5 sums. * Fixed nonprintable filename encoding. * Fixed a huge memory leak. 16k per databaseline. 1999-12-08 Pablo Virolainen * Check for [acm]times beeing in future is done correctly now. * blockcount will now be writen to database... 1999-12-02 Pablo Virolainen * Added warning if file's [acm]time is in future (gen_list.c) 1999-11-25 Rami Lehti * Added support for unknown @@ tokens in databases 1999-11-25 Pablo Virolainen * Ignorelist for reports implemented. * Block count added. It might be usefull with file with holes. 1999-11-24 Pablo Virolainen * Added '^' to first charaster of every regexpr * Minor changes do_md.c 1999-11-23 Rami Lehti * Fixed MHASH_COMPATIBILITY problem. Mhash library version 0.6.1 is now required. * Began tidying up the code so that both the internal and mhash hashes can be used at the same time. 1999-11-05 Pablo Virolainen * Fixed bug in tree traverce. Now works without permission check. 1999-10-26 Rami Lehti * Added support for mhash library (done mostly by pablo) * Fixed a --with-config-file bug in configure.in * Fixed md bug when using internal functions * Finally updated the Changelog 1999-08-26 Rami Lehti * Fixed config file handling (Wed, 25 Aug 1999 11:03:34 (EET):rammer) Changed: ChangeLog,configure.in Upped version to 0.4 (Thu, 26 Aug 1999 16:36:14 (EET):rammer) Changed: configure aide.conf.5 compare_db.c,gen_list.c,util.c util.h,conf_lex.l Fixed a bug in gen_seltree Changed default behaviour of verbositylevel 5. Now it prints the detailed info about changed files too. Now on level 5 if a dir is added a warning is shown that foo files were added under the previous dir and not the files themselves. On level 20 the behaviour is still the same. --------------------- aide-0.19/configure.ac0000644000175000017500000003045314774237261010336 AC_PREREQ([2.69]) m4_include([version.m4]) dnl Initialize autoconf/automake AC_INIT([aide],[AIDE_VERSION]) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([1.10 -Wall -Werror silent-rules subdir-objects serial-tests]) AC_DEFINE_UNQUOTED(AIDEVERSION, "AIDE_VERSION") AH_TEMPLATE([AIDEVERSION], [package version]) dnl The name of the configure h-file. AC_CONFIG_HEADERS(include/config.h) dnl Checks for programs. AC_PROG_CC if test "x$ac_cv_prog_cc_c99" = xno; then AC_MSG_ERROR([AIDE needs a C99 compatible compiler]) fi AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_INSTALL AC_PROG_YACC if test "x${YACC}" != "xbison -y"; then echo "AIDE requires GNU bison" exit 5 fi AC_PROG_LEX(noyywrap) if test "x${LEX}" != "xflex"; then echo "AIDE requires GNU flex" exit 5 fi AC_CHECK_PROGS(LD, ld) AC_PATH_TOOL([PKG_CONFIG], [pkg-config], [no]) AM_PROG_CC_C_O AC_SYS_LARGEFILE dnl AC_ARG_PROGRAM AC_ARG_WITH(extra-includes, AS_HELP_STRING([--with-extra-includes],[Specify additional paths with -I to find headerfiles]), [CPPFLAGS="$CPPFLAGS $withval"] ) AC_ARG_WITH(extra-libs, AS_HELP_STRING([--with-extra-libs],[Specify additional paths with -L to find libraries]), [LDFLAGS="$LDFLAGS $withval"] ) AC_ARG_WITH(extra-link-libs, AS_HELP_STRING([--with-extra-link-libs],[Specify additional libraries to link]), [LIBS="$LIBS $withval"] ) 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' case "$host_os" in beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # we not sure about C++ programs. LD_STATIC_FLAG="$LD_STATIC_FLAG ${wl}-lC" ;; cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. ## pic_flag='-m68020 -resident32 -malways-restore-a4' ;; sysv4*MP*) ## if test -d /usr/nec; then ## pic_flag=-Kconform_pic ## fi ;; *) ## pic_flag='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) # 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' ;; sysv4*MP*) if test -d /usr/nec ;then ## pic_flag='-Kconform_pic' LD_STATIC_FLAG='-Bstatic' fi ;; *) ## can_build_shared=no ;; esac fi # Check whether static linking has explicitly been enabled AC_ARG_ENABLE(static,[ --enable-static enable static linking (might increase the security of aide, see README for details)], [aide_static_choice=$enableval], [aide_static_choice=no]) dnl Borrowed from dbus cc_supports_flag() { AC_MSG_CHECKING(whether $CC supports "$@") Cfile=/tmp/foo${$} touch ${Cfile}.c $CC -c "$@" ${Cfile}.c -o ${Cfile}.o >/dev/null 2>&1 rc=$? rm -f ${Cfile}.c ${Cfile}.o case $rc in 0) AC_MSG_RESULT(yes);; *) AC_MSG_RESULT(no);; esac return $rc } dnl Borrowed from dbus ld_supports_flag() { AC_MSG_CHECKING([whether $LD supports "$@"]) AC_LINK_IFELSE([AC_LANG_PROGRAM([ int one(void) { return 1; } int two(void) { return 2; } ], [ two(); ] ) ] , [_ac_ld_flag_supported=yes], [_ac_ld_flag_supported=no]) if test "$_ac_ld_flag_supported" = "yes"; then rm -f conftest.c touch conftest.c if $CC -c conftest.c; then ld_out=`$LD $@ -o conftest conftest.o 2>&1` ld_ret=$? if test $ld_ret -ne 0 ; then _ac_ld_flag_supported=no elif echo "$ld_out" | egrep 'option ignored|^usage:|unrecognized option|illegal option' >/dev/null ; then _ac_ld_flag_supported=no fi fi rm -f conftest.c conftest.o conftest fi AC_MSG_RESULT($_ac_ld_flag_supported) if test "$_ac_ld_flag_supported" = "yes" ; then return 0 else return 1 fi } if test "$aide_static_choice" != "yes"; then LD_STATIC_FLAG="" EXTRA_LDFLAGS="" EXTRA_CFLAGS="" if test x$CC = "xgcc"; then if ld_supports_flag -z,relro; then EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-z,relro" fi if ld_supports_flag -z,now; then EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-z,now" fi if cc_supports_flag -fPIE -DPIE; then EXTRA_CFLAGS="$EXTRA_CFLAGS -fPIE -DPIE" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -pie" fi dnl Check for some optional warnings if cc_supports_flag -Wundef; then EXTRA_CFLAGS="$EXTRA_CFLAGS -Wundef" fi if cc_supports_flag -Wmissing-format-attribute; then EXTRA_CFLAGS="$EXTRA_CFLAGS -Wmissing-format-attribute" fi if cc_supports_flag -Wshadow; then EXTRA_CFLAGS="$EXTRA_CFLAGS -Wshadow" fi if cc_supports_flag -Wlogical-op; then EXTRA_CFLAGS="$EXTRA_CFLAGS -Wlogical-op" fi fi fi dnl This macro is new in autoconf-2.13 AC_SEARCH_LIBS(syslog, bsd socket inet, [AC_DEFINE(HAVE_SYSLOG,1,[syslog available?])]) AC_CHECK_FUNCS(vsyslog) AC_C_BIGENDIAN([AC_DEFINE(BIG_ENDIAN_HOST,1,[big endian])], [AC_DEFINE(LITTLE_ENDIAN_HOST,1,[little endian])]) AC_CHECK_TYPES([byte, ushort, ulong, u16, u32, u64]) AC_CHECK_SIZEOF(unsigned short, 2) AC_CHECK_SIZEOF(unsigned int, 4) AC_CHECK_SIZEOF(unsigned long, 4) AC_CHECK_SIZEOF(unsigned long long, 8) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(uid_t) AC_CHECK_SIZEOF(gid_t) AC_CHECK_SIZEOF(ino_t) AC_CHECK_SIZEOF(nlink_t) AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(blkcnt_t) AC_CHECK_FUNCS(strtoll strtoimax readdir) AC_CHECK_FUNCS(stricmp strnstr strnlen) AC_CHECK_FUNCS(fcntl ftruncate posix_fadvise asprintf snprintf \ vasprintf vsnprintf va_copy __va_copy) AC_CHECK_FUNCS(sigabbrev_np) AC_CHECK_HEADERS(sys/prctl.h) AC_CHECK_HEADERS(syslog.h inttypes.h fcntl.h ctype.h) AIDE_PKG_CHECK_MANDATORY(pcre2, PCRE2, libpcre2-8) AX_PTHREAD(compoptionstring="${compoptionstring}use pthread: mandatory\\n", [AC_MSG_ERROR([AIDE requires pthread])]) AC_ARG_WITH([fstype], AS_HELP_STRING([--without-fstype], [Disable file system type support for restricted rules (Linux only)]), [with_fstype=$withval], [with_fstype=yes] ) AC_MSG_CHECKING(for fstype support (Linux only)) case "${target_os}" in linux*) if test "x$with_fstype" != xno; then AC_DEFINE(HAVE_FSTYPE,1,[file system type support?]) fi AC_MSG_RESULT($with_fstype); ;; *) AC_MSG_RESULT(no); ;; esac AIDE_PKG_CHECK(zlib, zlib compression, yes, ZLIB, zlib) AIDE_PKG_CHECK([posix-acl], POSIX ACLs, no, POSIX_ACL, libacl, acl) if test "x$with_libacl" = xyes; then AC_DEFINE(WITH_ACL, 1, [use ACL]) 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) AIDE_PKG_CHECK(curl, cURL, no, CURL, libcurl) AC_MSG_CHECKING(for Nettle) AC_ARG_WITH([nettle], AS_HELP_STRING([--with-nettle], [use Nettle crypto library (default: check)]), [with_nettle=$withval], [with_nettle=check]) AC_MSG_RESULT([$with_nettle]) AC_MSG_CHECKING(for GNU crypto library) AC_ARG_WITH([gcrypt], AS_HELP_STRING([--with-gcrypt], [use GNU crypto library (default: check)]), [with_gcrypt=$withval], [with_gcrypt=check]) AC_MSG_RESULT([$with_gcrypt]) AIDE_PKG_CHECK_MODULES_OPTIONAL(nettle, NETTLE, nettle, >= 3.7) AS_IF([test x"$with_nettle" = xyes], [ AS_IF([test x"$with_gcrypt" = xcheck], [ with_gcrypt=no ]) ] ) AIDE_PKG_CHECK_MODULES_OPTIONAL(gcrypt, GCRYPT, libgcrypt) AS_IF([test x"$with_nettle" != xno && test x"$with_gcrypt" != xno], [ AC_MSG_ERROR([Using gcrypt together with Nettle makes no sense. To disable nettle use --without-nettle]) ]) AS_IF([test x"$with_nettle" = xno && test x"$with_gcrypt" = xno], [ AC_MSG_ERROR([AIDE requires nettle or libcrypt for hashsum calculation]) ]) compoptionstring="${compoptionstring}use Nettle crypto library: $with_nettle\\n" AM_CONDITIONAL(HAVE_NETTLE, [test "x$NETTLE_LIBS" != "x"]) compoptionstring="${compoptionstring}use GNU crypto library: $with_gcrypt\\n" AM_CONDITIONAL(HAVE_GCRYPT, [test "x$GCRYPT_LIBS" != "x"]) AIDE_PKG_CHECK(audit, Linux Auditing Framework, no, AUDIT, audit) AIDE_PKG_CHECK_HEADERS(locale, locale, no, LOCALE, [libintl.h]) if test "x$with_locale" = xyes; then AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/lib/locale",[Localedir to use]) fi AIDE_COMPILE_TIME_OPTION(syslog_ident, syslog-ident, syslog ident, "aide") AC_DEFINE_UNQUOTED(AIDE_IDENT, "$with_syslog_ident", [syslog ident]) AIDE_COMPILE_TIME_OPTION(syslog_logopt, syslog-logopt, syslog logopt, LOG_CONS) AC_DEFINE_UNQUOTED(AIDE_LOGOPT, $with_syslog_logopt, [syslog logopt]) AIDE_COMPILE_TIME_OPTION(syslog_priority, syslog-priority, syslog priority, LOG_NOTICE) AC_DEFINE_UNQUOTED(AIDE_SYSLOG_PRIORITY, $with_syslog_priority, [syslog priority]) AIDE_COMPILE_TIME_OPTION(syslog_facility, syslog-facility, default syslog facility, LOG_LOCAL0) AC_DEFINE_UNQUOTED(AIDE_SYSLOG_FACILITY, $with_syslog_facility, [syslog facility]) PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], , [AC_MSG_RESULT([Check not found (testing via 'make check' disabled)])]) AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"]) AC_ARG_WITH([config_file], AS_HELP_STRING([--with-config-file=config-file],[specify default config file (use --without-config-file to disable default config file)]), [with_config_file=$withval],[with_config_file=yes]) if test "$with_config_file" != "no"; then if test "$with_config_file" != "yes"; then config_file=$with_config_file else if test "x$sysconfdir" != x'${prefix}/etc'; then config_file=`eval echo "$sysconfdir/aide.conf"` elif test "x$prefix" != xNONE; then config_file="$prefix/etc/aide.conf" else config_file="$ac_default_prefix/etc/aide.conf" fi fi AC_DEFINE_UNQUOTED(CONFIG_FILE,"$config_file",[Location of configuration file]) fi AC_ARG_ENABLE([default_db], AS_HELP_STRING([--disable-default-db],[do not set default values for database_in and database_out config options]), [enable_default_db=$enableval],[enable_default_db=yes]) if test "$enable_default_db" = "yes"; then if test "x$sysconfdir" != x'${prefix}/etc'; then evalled_sysconfdir=`eval echo "$sysconfdir"` default_db="$evalled_sysconfdir/aide.db" default_db_out="$evalled_sysconfdir/aide.db.new" elif test "x$prefix" != xNONE; then default_db="$prefix/etc/aide.db" default_db_out="$prefix/etc/aide.db.new" else default_db="$ac_default_prefix/etc/aide.db" default_db_out="$ac_default_prefix/etc/aide.db.new" fi AC_DEFINE_UNQUOTED(DEFAULT_DB,"file:$default_db",[Default location of signature database]) AC_DEFINE_UNQUOTED(DEFAULT_DB_OUT,"file:$default_db_out",[Default output location for newly-generated signature database]) fi extrasub="s&@AIDEVERSION@&$PACKAGE_VERSION&;t t" AC_DEFINE_UNQUOTED(AIDECOMPILEOPTIONS, "${compoptionstring}",[Compile-time options displayed in -v output]) dnl Add in the optional compiler features LDFLAGS="$LDFLAGS $LD_STATIC_FLAG $EXTRA_LDFLAGS" CFLAGS="$CFLAGS $EXTRA_CFLAGS" AC_SUBST(AIDE_DEFS) AC_CONFIG_FILES([Makefile]) AC_OUTPUT aide-0.19/Makefile.in0000644000175000017500000046625414774244725010134 # Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # AIDE (Advanced Intrusion Detection Environment) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) am__rm_f = rm -f $(am__rm_f_notfound) am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = aide$(EXEEXT) @HAVE_E2FSATTRS_TRUE@am__append_1 = include/e2fsattrs.h src/e2fsattrs.c @HAVE_CURL_TRUE@am__append_2 = include/fopen.h src/fopen.c @HAVE_CHECK_TRUE@TESTS = check_aide$(EXEEXT) @HAVE_CHECK_TRUE@check_PROGRAMS = check_aide$(EXEEXT) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man5dir)" PROGRAMS = $(bin_PROGRAMS) am__aide_SOURCES_DIST = src/aide.c include/aide.h include/base64.h \ src/base64.c include/be.h src/be.c include/commandconf.h \ src/commandconf.c include/attributes.h src/attributes.c \ include/file.h src/file.c include/report.h src/report.c \ include/report_plain.h src/report_plain.c \ include/report_json.h src/report_json.c include/conf_ast.h \ src/conf_ast.c include/conf_eval.h src/conf_eval.c \ include/conf_lex.h src/conf_lex.l src/conf_yacc.h \ src/conf_yacc.y include/db.h src/db.c include/db_line.h \ include/db_config.h include/db_disk.h src/db_disk.c \ include/db_file.h src/db_file.c include/db_list.h \ src/db_list.c include/do_md.h src/do_md.c include/errorcodes.h \ include/gen_list.h src/gen_list.c src/getopt1.c \ include/getopt.h src/getopt.c include/hashsum.h src/hashsum.c \ include/rx_rule.h src/rx_rule.c include/list.h src/list.c \ include/log.h src/log.c include/locale-aide.h include/md.h \ src/md.c include/queue.h src/queue.c include/seltree_struct.h \ include/progress.h src/progress.c include/seltree.h \ src/seltree.c include/symboltable.h src/symboltable.c \ include/tree.h src/tree.c include/url.h src/url.c \ include/util.h src/util.c include/e2fsattrs.h src/e2fsattrs.c \ include/fopen.h src/fopen.c am__dirstamp = $(am__leading_dot)dirstamp @HAVE_E2FSATTRS_TRUE@am__objects_1 = src/aide-e2fsattrs.$(OBJEXT) @HAVE_CURL_TRUE@am__objects_2 = src/aide-fopen.$(OBJEXT) am_aide_OBJECTS = src/aide-aide.$(OBJEXT) src/aide-base64.$(OBJEXT) \ src/aide-be.$(OBJEXT) src/aide-commandconf.$(OBJEXT) \ src/aide-attributes.$(OBJEXT) src/aide-file.$(OBJEXT) \ src/aide-report.$(OBJEXT) src/aide-report_plain.$(OBJEXT) \ src/aide-report_json.$(OBJEXT) src/aide-conf_ast.$(OBJEXT) \ src/aide-conf_eval.$(OBJEXT) src/aide-conf_lex.$(OBJEXT) \ src/aide-conf_yacc.$(OBJEXT) src/aide-db.$(OBJEXT) \ src/aide-db_disk.$(OBJEXT) src/aide-db_file.$(OBJEXT) \ src/aide-db_list.$(OBJEXT) src/aide-do_md.$(OBJEXT) \ src/aide-gen_list.$(OBJEXT) src/aide-getopt1.$(OBJEXT) \ src/aide-getopt.$(OBJEXT) src/aide-hashsum.$(OBJEXT) \ src/aide-rx_rule.$(OBJEXT) src/aide-list.$(OBJEXT) \ src/aide-log.$(OBJEXT) src/aide-md.$(OBJEXT) \ src/aide-queue.$(OBJEXT) src/aide-progress.$(OBJEXT) \ src/aide-seltree.$(OBJEXT) src/aide-symboltable.$(OBJEXT) \ src/aide-tree.$(OBJEXT) src/aide-url.$(OBJEXT) \ src/aide-util.$(OBJEXT) $(am__objects_1) $(am__objects_2) aide_OBJECTS = $(am_aide_OBJECTS) am__DEPENDENCIES_1 = aide_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) aide_LINK = $(CCLD) $(aide_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am__check_aide_SOURCES_DIST = tests/check_aide.c tests/check_aide.h \ tests/check_attributes.c src/attributes.c tests/check_base64.c \ src/base64.c tests/check_hashsum.c src/hashsum.c \ tests/check_seltree.c src/seltree.c tests/check_progress.c \ src/md.c src/file.c src/log.c src/util.c src/list.c src/tree.c \ src/rx_rule.c @HAVE_CHECK_TRUE@am_check_aide_OBJECTS = \ @HAVE_CHECK_TRUE@ tests/check_aide-check_aide.$(OBJEXT) \ @HAVE_CHECK_TRUE@ tests/check_aide-check_attributes.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-attributes.$(OBJEXT) \ @HAVE_CHECK_TRUE@ tests/check_aide-check_base64.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-base64.$(OBJEXT) \ @HAVE_CHECK_TRUE@ tests/check_aide-check_hashsum.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-hashsum.$(OBJEXT) \ @HAVE_CHECK_TRUE@ tests/check_aide-check_seltree.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-seltree.$(OBJEXT) \ @HAVE_CHECK_TRUE@ tests/check_aide-check_progress.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-md.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-file.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-log.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-util.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-list.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-tree.$(OBJEXT) \ @HAVE_CHECK_TRUE@ src/check_aide-rx_rule.$(OBJEXT) check_aide_OBJECTS = $(am_check_aide_OBJECTS) @HAVE_CHECK_TRUE@check_aide_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_CHECK_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @HAVE_CHECK_TRUE@ $(am__DEPENDENCIES_1) check_aide_LINK = $(CCLD) $(check_aide_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = src/$(DEPDIR)/aide-aide.Po \ src/$(DEPDIR)/aide-attributes.Po src/$(DEPDIR)/aide-base64.Po \ src/$(DEPDIR)/aide-be.Po src/$(DEPDIR)/aide-commandconf.Po \ src/$(DEPDIR)/aide-conf_ast.Po src/$(DEPDIR)/aide-conf_eval.Po \ src/$(DEPDIR)/aide-conf_lex.Po src/$(DEPDIR)/aide-conf_yacc.Po \ src/$(DEPDIR)/aide-db.Po src/$(DEPDIR)/aide-db_disk.Po \ src/$(DEPDIR)/aide-db_file.Po src/$(DEPDIR)/aide-db_list.Po \ src/$(DEPDIR)/aide-do_md.Po src/$(DEPDIR)/aide-e2fsattrs.Po \ src/$(DEPDIR)/aide-file.Po src/$(DEPDIR)/aide-fopen.Po \ src/$(DEPDIR)/aide-gen_list.Po src/$(DEPDIR)/aide-getopt.Po \ src/$(DEPDIR)/aide-getopt1.Po src/$(DEPDIR)/aide-hashsum.Po \ src/$(DEPDIR)/aide-list.Po src/$(DEPDIR)/aide-log.Po \ src/$(DEPDIR)/aide-md.Po src/$(DEPDIR)/aide-progress.Po \ src/$(DEPDIR)/aide-queue.Po src/$(DEPDIR)/aide-report.Po \ src/$(DEPDIR)/aide-report_json.Po \ src/$(DEPDIR)/aide-report_plain.Po \ src/$(DEPDIR)/aide-rx_rule.Po src/$(DEPDIR)/aide-seltree.Po \ src/$(DEPDIR)/aide-symboltable.Po src/$(DEPDIR)/aide-tree.Po \ src/$(DEPDIR)/aide-url.Po src/$(DEPDIR)/aide-util.Po \ src/$(DEPDIR)/check_aide-attributes.Po \ src/$(DEPDIR)/check_aide-base64.Po \ src/$(DEPDIR)/check_aide-file.Po \ src/$(DEPDIR)/check_aide-hashsum.Po \ src/$(DEPDIR)/check_aide-list.Po \ src/$(DEPDIR)/check_aide-log.Po src/$(DEPDIR)/check_aide-md.Po \ src/$(DEPDIR)/check_aide-rx_rule.Po \ src/$(DEPDIR)/check_aide-seltree.Po \ src/$(DEPDIR)/check_aide-tree.Po \ src/$(DEPDIR)/check_aide-util.Po \ tests/$(DEPDIR)/check_aide-check_aide.Po \ tests/$(DEPDIR)/check_aide-check_attributes.Po \ tests/$(DEPDIR)/check_aide-check_base64.Po \ tests/$(DEPDIR)/check_aide-check_hashsum.Po \ tests/$(DEPDIR)/check_aide-check_progress.Po \ tests/$(DEPDIR)/check_aide-check_seltree.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) AM_V_LEX = $(am__v_LEX_@AM_V@) am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) am__v_LEX_0 = @echo " LEX " $@; am__v_LEX_1 = YLWRAP = $(top_srcdir)/ylwrap am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ -e s/c++$$/h++/ -e s/c$$/h/ YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) AM_V_YACC = $(am__v_YACC_@AM_V@) am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) am__v_YACC_0 = @echo " YACC " $@; am__v_YACC_1 = SOURCES = $(aide_SOURCES) $(check_aide_SOURCES) DIST_SOURCES = $(am__aide_SOURCES_DIST) $(am__check_aide_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } man1dir = $(mandir)/man1 man5dir = $(mandir)/man5 NROFF = nroff MANS = $(man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` AM_RECURSIVE_TARGETS = cscope am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/include/config.h.in AUTHORS COPYING ChangeLog \ INSTALL NEWS README compile config.guess config.sub depcomp \ install-sh missing src/conf_lex.c src/conf_yacc.c \ src/conf_yacc.h ylwrap DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ ; rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = -9 DIST_TARGETS = dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = \ find . \( -type f -a \! \ \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print ACLOCAL = @ACLOCAL@ AIDE_DEFS = @AIDE_DEFS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUDIT_CFLAGS = @AUDIT_CFLAGS@ AUDIT_LIBS = @AUDIT_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAPABILITIES_CFLAGS = @CAPABILITIES_CFLAGS@ CAPABILITIES_LIBS = @CAPABILITIES_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_LIBS = @CURL_LIBS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ E2FSATTRS_CFLAGS = @E2FSATTRS_CFLAGS@ E2FSATTRS_LIBS = @E2FSATTRS_LIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ GCRYPT_CFLAGS = @GCRYPT_CFLAGS@ GCRYPT_LIBS = @GCRYPT_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = lex.yy LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETTLE_CFLAGS = @NETTLE_CFLAGS@ NETTLE_LIBS = @NETTLE_LIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE2_CFLAGS = @PCRE2_CFLAGS@ PCRE2_LIBS = @PCRE2_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSIX_ACL_CFLAGS = @POSIX_ACL_CFLAGS@ POSIX_ACL_LIBS = @POSIX_ACL_LIBS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_CXX = @PTHREAD_CXX@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XATTR_CFLAGS = @XATTR_CFLAGS@ XATTR_LIBS = @XATTR_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ am__xargs_n = @am__xargs_n@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ BUILT_SOURCES = src/conf_yacc.h AM_YFLAGS = -d aide_SOURCES = src/aide.c include/aide.h include/base64.h src/base64.c \ include/be.h src/be.c include/commandconf.h src/commandconf.c \ include/attributes.h src/attributes.c include/file.h \ src/file.c include/report.h src/report.c \ include/report_plain.h src/report_plain.c \ include/report_json.h src/report_json.c include/conf_ast.h \ src/conf_ast.c include/conf_eval.h src/conf_eval.c \ include/conf_lex.h src/conf_lex.l src/conf_yacc.h \ src/conf_yacc.y include/db.h src/db.c include/db_line.h \ include/db_config.h include/db_disk.h src/db_disk.c \ include/db_file.h src/db_file.c include/db_list.h \ src/db_list.c include/do_md.h src/do_md.c include/errorcodes.h \ include/gen_list.h src/gen_list.c src/getopt1.c \ include/getopt.h src/getopt.c include/hashsum.h src/hashsum.c \ include/rx_rule.h src/rx_rule.c include/list.h src/list.c \ include/log.h src/log.c include/locale-aide.h include/md.h \ src/md.c include/queue.h src/queue.c include/seltree_struct.h \ include/progress.h src/progress.c include/seltree.h \ src/seltree.c include/symboltable.h src/symboltable.c \ include/tree.h src/tree.c include/url.h src/url.c \ include/util.h src/util.c $(am__append_1) $(am__append_2) aide_CFLAGS = @AIDE_DEFS@ -I$(top_srcdir)/include -W -Wall -g \ ${AUDIT_CFLAGS} \ ${CAPABILITIES_CFLAGS} \ ${CURL_CFLAGS} \ ${E2FSATTRS_CFLAGS} \ ${ELF_CFLAGS} \ ${GCRYPT_CFLAGS} \ ${NETTLE_CFLAGS} \ ${PCRE2_CFLAGS} \ ${POSIX_ACL_CFLAGS} \ ${PTHREAD_CFLAGS} \ ${SELINUX_CFLAGS} \ ${XATTR_CFLAGS} \ ${ZLIB_CFLAGS} aide_LDADD = -lm \ ${AUDIT_LIBS} \ ${CAPABILITIES_LIBS} \ ${CURL_LIBS} \ ${E2FSATTRS_LIBS} \ ${ELF_LIBS} \ ${GCRYPT_LIBS} \ ${NETTLE_LIBS} \ ${PCRE2_LIBS} \ ${POSIX_ACL_LIBS} \ ${PTHREAD_LIBS} \ ${SELINUX_LIBS} \ ${XATTR_LIBS} \ ${ZLIB_LIBS} @HAVE_CHECK_TRUE@check_aide_SOURCES = tests/check_aide.c tests/check_aide.h \ @HAVE_CHECK_TRUE@ tests/check_attributes.c src/attributes.c \ @HAVE_CHECK_TRUE@ tests/check_base64.c src/base64.c \ @HAVE_CHECK_TRUE@ tests/check_hashsum.c src/hashsum.c \ @HAVE_CHECK_TRUE@ tests/check_seltree.c src/seltree.c \ @HAVE_CHECK_TRUE@ tests/check_progress.c \ @HAVE_CHECK_TRUE@ src/md.c src/file.c src/log.c src/util.c src/list.c src/tree.c src/rx_rule.c @HAVE_CHECK_TRUE@check_aide_CFLAGS = -I$(top_srcdir)/include \ @HAVE_CHECK_TRUE@ $(CHECK_CFLAGS) \ @HAVE_CHECK_TRUE@ ${GCRYPT_CFLAGS} \ @HAVE_CHECK_TRUE@ ${NETTLE_CFLAGS} \ @HAVE_CHECK_TRUE@ ${PCRE2_CFLAGS} @HAVE_CHECK_TRUE@check_aide_LDADD = -lm \ @HAVE_CHECK_TRUE@ $(CHECK_LIBS) \ @HAVE_CHECK_TRUE@ ${GCRYPT_LIBS} \ @HAVE_CHECK_TRUE@ ${NETTLE_LIBS} \ @HAVE_CHECK_TRUE@ ${PCRE2_LIBS} CLEANFILES = src/conf_yacc.h src/conf_yacc.c src/conf_lex.c man_MANS = doc/aide.1 doc/aide.conf.5 EXTRA_DIST = $(man_MANS) SECURITY.md all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .l .o .obj .y am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): include/config.h: include/stamp-h1 @test -f $@ || rm -f include/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1 include/stamp-h1: $(top_srcdir)/include/config.h.in $(top_builddir)/config.status $(AM_V_at)rm -f include/stamp-h1 $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status include/config.h $(top_srcdir)/include/config.h.in: $(am__configure_deps) $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER)) $(AM_V_at)rm -f include/stamp-h1 $(AM_V_at)touch $@ distclean-hdr: -rm -f include/config.h include/stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && $(am__rm_f) $$files clean-binPROGRAMS: -$(am__rm_f) $(bin_PROGRAMS) clean-checkPROGRAMS: -$(am__rm_f) $(check_PROGRAMS) src/$(am__dirstamp): @$(MKDIR_P) src @: >>src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: >>src/$(DEPDIR)/$(am__dirstamp) src/aide-aide.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-base64.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-be.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-commandconf.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-attributes.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-file.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-report.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-report_plain.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-report_json.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-conf_ast.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-conf_eval.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-conf_lex.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/conf_yacc.h: src/conf_yacc.c @if test ! -f $@; then rm -f src/conf_yacc.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) src/conf_yacc.c; else :; fi src/aide-conf_yacc.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-db.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-db_disk.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-db_file.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-db_list.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-do_md.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-gen_list.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-getopt1.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-getopt.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-hashsum.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-rx_rule.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-list.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-log.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-md.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-queue.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-progress.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-seltree.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-symboltable.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-tree.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-url.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-util.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-e2fsattrs.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/aide-fopen.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) aide$(EXEEXT): $(aide_OBJECTS) $(aide_DEPENDENCIES) $(EXTRA_aide_DEPENDENCIES) @rm -f aide$(EXEEXT) $(AM_V_CCLD)$(aide_LINK) $(aide_OBJECTS) $(aide_LDADD) $(LIBS) tests/$(am__dirstamp): @$(MKDIR_P) tests @: >>tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tests/$(DEPDIR) @: >>tests/$(DEPDIR)/$(am__dirstamp) tests/check_aide-check_aide.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) tests/check_aide-check_attributes.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) src/check_aide-attributes.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) tests/check_aide-check_base64.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) src/check_aide-base64.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) tests/check_aide-check_hashsum.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) src/check_aide-hashsum.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) tests/check_aide-check_seltree.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) src/check_aide-seltree.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) tests/check_aide-check_progress.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) src/check_aide-md.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/check_aide-file.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/check_aide-log.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/check_aide-util.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/check_aide-list.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/check_aide-tree.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/check_aide-rx_rule.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) check_aide$(EXEEXT): $(check_aide_OBJECTS) $(check_aide_DEPENDENCIES) $(EXTRA_check_aide_DEPENDENCIES) @rm -f check_aide$(EXEEXT) $(AM_V_CCLD)$(check_aide_LINK) $(check_aide_OBJECTS) $(check_aide_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f src/*.$(OBJEXT) -rm -f tests/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-aide.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-attributes.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-base64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-be.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-commandconf.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-conf_ast.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-conf_eval.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-conf_lex.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-conf_yacc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-db.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-db_disk.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-db_file.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-db_list.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-do_md.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-e2fsattrs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-file.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-fopen.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-gen_list.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-getopt.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-getopt1.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-hashsum.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-list.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-log.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-md.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-progress.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-queue.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-report.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-report_json.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-report_plain.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-rx_rule.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-seltree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-symboltable.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-tree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-url.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/aide-util.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-attributes.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-base64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-file.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-hashsum.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-list.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-log.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-md.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-rx_rule.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-seltree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-tree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/check_aide-util.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_aide-check_aide.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_aide-check_attributes.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_aide-check_base64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_aide-check_hashsum.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_aide-check_progress.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_aide-check_seltree.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @: >>$@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` src/aide-aide.o: src/aide.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-aide.o -MD -MP -MF src/$(DEPDIR)/aide-aide.Tpo -c -o src/aide-aide.o `test -f 'src/aide.c' || echo '$(srcdir)/'`src/aide.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-aide.Tpo src/$(DEPDIR)/aide-aide.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/aide.c' object='src/aide-aide.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-aide.o `test -f 'src/aide.c' || echo '$(srcdir)/'`src/aide.c src/aide-aide.obj: src/aide.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-aide.obj -MD -MP -MF src/$(DEPDIR)/aide-aide.Tpo -c -o src/aide-aide.obj `if test -f 'src/aide.c'; then $(CYGPATH_W) 'src/aide.c'; else $(CYGPATH_W) '$(srcdir)/src/aide.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-aide.Tpo src/$(DEPDIR)/aide-aide.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/aide.c' object='src/aide-aide.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-aide.obj `if test -f 'src/aide.c'; then $(CYGPATH_W) 'src/aide.c'; else $(CYGPATH_W) '$(srcdir)/src/aide.c'; fi` src/aide-base64.o: src/base64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-base64.o -MD -MP -MF src/$(DEPDIR)/aide-base64.Tpo -c -o src/aide-base64.o `test -f 'src/base64.c' || echo '$(srcdir)/'`src/base64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-base64.Tpo src/$(DEPDIR)/aide-base64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/base64.c' object='src/aide-base64.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-base64.o `test -f 'src/base64.c' || echo '$(srcdir)/'`src/base64.c src/aide-base64.obj: src/base64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-base64.obj -MD -MP -MF src/$(DEPDIR)/aide-base64.Tpo -c -o src/aide-base64.obj `if test -f 'src/base64.c'; then $(CYGPATH_W) 'src/base64.c'; else $(CYGPATH_W) '$(srcdir)/src/base64.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-base64.Tpo src/$(DEPDIR)/aide-base64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/base64.c' object='src/aide-base64.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-base64.obj `if test -f 'src/base64.c'; then $(CYGPATH_W) 'src/base64.c'; else $(CYGPATH_W) '$(srcdir)/src/base64.c'; fi` src/aide-be.o: src/be.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-be.o -MD -MP -MF src/$(DEPDIR)/aide-be.Tpo -c -o src/aide-be.o `test -f 'src/be.c' || echo '$(srcdir)/'`src/be.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-be.Tpo src/$(DEPDIR)/aide-be.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/be.c' object='src/aide-be.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-be.o `test -f 'src/be.c' || echo '$(srcdir)/'`src/be.c src/aide-be.obj: src/be.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-be.obj -MD -MP -MF src/$(DEPDIR)/aide-be.Tpo -c -o src/aide-be.obj `if test -f 'src/be.c'; then $(CYGPATH_W) 'src/be.c'; else $(CYGPATH_W) '$(srcdir)/src/be.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-be.Tpo src/$(DEPDIR)/aide-be.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/be.c' object='src/aide-be.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-be.obj `if test -f 'src/be.c'; then $(CYGPATH_W) 'src/be.c'; else $(CYGPATH_W) '$(srcdir)/src/be.c'; fi` src/aide-commandconf.o: src/commandconf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-commandconf.o -MD -MP -MF src/$(DEPDIR)/aide-commandconf.Tpo -c -o src/aide-commandconf.o `test -f 'src/commandconf.c' || echo '$(srcdir)/'`src/commandconf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-commandconf.Tpo src/$(DEPDIR)/aide-commandconf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/commandconf.c' object='src/aide-commandconf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-commandconf.o `test -f 'src/commandconf.c' || echo '$(srcdir)/'`src/commandconf.c src/aide-commandconf.obj: src/commandconf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-commandconf.obj -MD -MP -MF src/$(DEPDIR)/aide-commandconf.Tpo -c -o src/aide-commandconf.obj `if test -f 'src/commandconf.c'; then $(CYGPATH_W) 'src/commandconf.c'; else $(CYGPATH_W) '$(srcdir)/src/commandconf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-commandconf.Tpo src/$(DEPDIR)/aide-commandconf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/commandconf.c' object='src/aide-commandconf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-commandconf.obj `if test -f 'src/commandconf.c'; then $(CYGPATH_W) 'src/commandconf.c'; else $(CYGPATH_W) '$(srcdir)/src/commandconf.c'; fi` src/aide-attributes.o: src/attributes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-attributes.o -MD -MP -MF src/$(DEPDIR)/aide-attributes.Tpo -c -o src/aide-attributes.o `test -f 'src/attributes.c' || echo '$(srcdir)/'`src/attributes.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-attributes.Tpo src/$(DEPDIR)/aide-attributes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/attributes.c' object='src/aide-attributes.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-attributes.o `test -f 'src/attributes.c' || echo '$(srcdir)/'`src/attributes.c src/aide-attributes.obj: src/attributes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-attributes.obj -MD -MP -MF src/$(DEPDIR)/aide-attributes.Tpo -c -o src/aide-attributes.obj `if test -f 'src/attributes.c'; then $(CYGPATH_W) 'src/attributes.c'; else $(CYGPATH_W) '$(srcdir)/src/attributes.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-attributes.Tpo src/$(DEPDIR)/aide-attributes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/attributes.c' object='src/aide-attributes.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-attributes.obj `if test -f 'src/attributes.c'; then $(CYGPATH_W) 'src/attributes.c'; else $(CYGPATH_W) '$(srcdir)/src/attributes.c'; fi` src/aide-file.o: src/file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-file.o -MD -MP -MF src/$(DEPDIR)/aide-file.Tpo -c -o src/aide-file.o `test -f 'src/file.c' || echo '$(srcdir)/'`src/file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-file.Tpo src/$(DEPDIR)/aide-file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/file.c' object='src/aide-file.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-file.o `test -f 'src/file.c' || echo '$(srcdir)/'`src/file.c src/aide-file.obj: src/file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-file.obj -MD -MP -MF src/$(DEPDIR)/aide-file.Tpo -c -o src/aide-file.obj `if test -f 'src/file.c'; then $(CYGPATH_W) 'src/file.c'; else $(CYGPATH_W) '$(srcdir)/src/file.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-file.Tpo src/$(DEPDIR)/aide-file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/file.c' object='src/aide-file.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-file.obj `if test -f 'src/file.c'; then $(CYGPATH_W) 'src/file.c'; else $(CYGPATH_W) '$(srcdir)/src/file.c'; fi` src/aide-report.o: src/report.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-report.o -MD -MP -MF src/$(DEPDIR)/aide-report.Tpo -c -o src/aide-report.o `test -f 'src/report.c' || echo '$(srcdir)/'`src/report.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-report.Tpo src/$(DEPDIR)/aide-report.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/report.c' object='src/aide-report.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-report.o `test -f 'src/report.c' || echo '$(srcdir)/'`src/report.c src/aide-report.obj: src/report.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-report.obj -MD -MP -MF src/$(DEPDIR)/aide-report.Tpo -c -o src/aide-report.obj `if test -f 'src/report.c'; then $(CYGPATH_W) 'src/report.c'; else $(CYGPATH_W) '$(srcdir)/src/report.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-report.Tpo src/$(DEPDIR)/aide-report.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/report.c' object='src/aide-report.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-report.obj `if test -f 'src/report.c'; then $(CYGPATH_W) 'src/report.c'; else $(CYGPATH_W) '$(srcdir)/src/report.c'; fi` src/aide-report_plain.o: src/report_plain.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-report_plain.o -MD -MP -MF src/$(DEPDIR)/aide-report_plain.Tpo -c -o src/aide-report_plain.o `test -f 'src/report_plain.c' || echo '$(srcdir)/'`src/report_plain.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-report_plain.Tpo src/$(DEPDIR)/aide-report_plain.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/report_plain.c' object='src/aide-report_plain.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-report_plain.o `test -f 'src/report_plain.c' || echo '$(srcdir)/'`src/report_plain.c src/aide-report_plain.obj: src/report_plain.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-report_plain.obj -MD -MP -MF src/$(DEPDIR)/aide-report_plain.Tpo -c -o src/aide-report_plain.obj `if test -f 'src/report_plain.c'; then $(CYGPATH_W) 'src/report_plain.c'; else $(CYGPATH_W) '$(srcdir)/src/report_plain.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-report_plain.Tpo src/$(DEPDIR)/aide-report_plain.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/report_plain.c' object='src/aide-report_plain.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-report_plain.obj `if test -f 'src/report_plain.c'; then $(CYGPATH_W) 'src/report_plain.c'; else $(CYGPATH_W) '$(srcdir)/src/report_plain.c'; fi` src/aide-report_json.o: src/report_json.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-report_json.o -MD -MP -MF src/$(DEPDIR)/aide-report_json.Tpo -c -o src/aide-report_json.o `test -f 'src/report_json.c' || echo '$(srcdir)/'`src/report_json.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-report_json.Tpo src/$(DEPDIR)/aide-report_json.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/report_json.c' object='src/aide-report_json.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-report_json.o `test -f 'src/report_json.c' || echo '$(srcdir)/'`src/report_json.c src/aide-report_json.obj: src/report_json.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-report_json.obj -MD -MP -MF src/$(DEPDIR)/aide-report_json.Tpo -c -o src/aide-report_json.obj `if test -f 'src/report_json.c'; then $(CYGPATH_W) 'src/report_json.c'; else $(CYGPATH_W) '$(srcdir)/src/report_json.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-report_json.Tpo src/$(DEPDIR)/aide-report_json.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/report_json.c' object='src/aide-report_json.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-report_json.obj `if test -f 'src/report_json.c'; then $(CYGPATH_W) 'src/report_json.c'; else $(CYGPATH_W) '$(srcdir)/src/report_json.c'; fi` src/aide-conf_ast.o: src/conf_ast.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-conf_ast.o -MD -MP -MF src/$(DEPDIR)/aide-conf_ast.Tpo -c -o src/aide-conf_ast.o `test -f 'src/conf_ast.c' || echo '$(srcdir)/'`src/conf_ast.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-conf_ast.Tpo src/$(DEPDIR)/aide-conf_ast.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/conf_ast.c' object='src/aide-conf_ast.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-conf_ast.o `test -f 'src/conf_ast.c' || echo '$(srcdir)/'`src/conf_ast.c src/aide-conf_ast.obj: src/conf_ast.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-conf_ast.obj -MD -MP -MF src/$(DEPDIR)/aide-conf_ast.Tpo -c -o src/aide-conf_ast.obj `if test -f 'src/conf_ast.c'; then $(CYGPATH_W) 'src/conf_ast.c'; else $(CYGPATH_W) '$(srcdir)/src/conf_ast.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-conf_ast.Tpo src/$(DEPDIR)/aide-conf_ast.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/conf_ast.c' object='src/aide-conf_ast.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-conf_ast.obj `if test -f 'src/conf_ast.c'; then $(CYGPATH_W) 'src/conf_ast.c'; else $(CYGPATH_W) '$(srcdir)/src/conf_ast.c'; fi` src/aide-conf_eval.o: src/conf_eval.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-conf_eval.o -MD -MP -MF src/$(DEPDIR)/aide-conf_eval.Tpo -c -o src/aide-conf_eval.o `test -f 'src/conf_eval.c' || echo '$(srcdir)/'`src/conf_eval.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-conf_eval.Tpo src/$(DEPDIR)/aide-conf_eval.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/conf_eval.c' object='src/aide-conf_eval.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-conf_eval.o `test -f 'src/conf_eval.c' || echo '$(srcdir)/'`src/conf_eval.c src/aide-conf_eval.obj: src/conf_eval.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-conf_eval.obj -MD -MP -MF src/$(DEPDIR)/aide-conf_eval.Tpo -c -o src/aide-conf_eval.obj `if test -f 'src/conf_eval.c'; then $(CYGPATH_W) 'src/conf_eval.c'; else $(CYGPATH_W) '$(srcdir)/src/conf_eval.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-conf_eval.Tpo src/$(DEPDIR)/aide-conf_eval.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/conf_eval.c' object='src/aide-conf_eval.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-conf_eval.obj `if test -f 'src/conf_eval.c'; then $(CYGPATH_W) 'src/conf_eval.c'; else $(CYGPATH_W) '$(srcdir)/src/conf_eval.c'; fi` src/aide-conf_lex.o: src/conf_lex.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-conf_lex.o -MD -MP -MF src/$(DEPDIR)/aide-conf_lex.Tpo -c -o src/aide-conf_lex.o `test -f 'src/conf_lex.c' || echo '$(srcdir)/'`src/conf_lex.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-conf_lex.Tpo src/$(DEPDIR)/aide-conf_lex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/conf_lex.c' object='src/aide-conf_lex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-conf_lex.o `test -f 'src/conf_lex.c' || echo '$(srcdir)/'`src/conf_lex.c src/aide-conf_lex.obj: src/conf_lex.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-conf_lex.obj -MD -MP -MF src/$(DEPDIR)/aide-conf_lex.Tpo -c -o src/aide-conf_lex.obj `if test -f 'src/conf_lex.c'; then $(CYGPATH_W) 'src/conf_lex.c'; else $(CYGPATH_W) '$(srcdir)/src/conf_lex.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-conf_lex.Tpo src/$(DEPDIR)/aide-conf_lex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/conf_lex.c' object='src/aide-conf_lex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-conf_lex.obj `if test -f 'src/conf_lex.c'; then $(CYGPATH_W) 'src/conf_lex.c'; else $(CYGPATH_W) '$(srcdir)/src/conf_lex.c'; fi` src/aide-conf_yacc.o: src/conf_yacc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-conf_yacc.o -MD -MP -MF src/$(DEPDIR)/aide-conf_yacc.Tpo -c -o src/aide-conf_yacc.o `test -f 'src/conf_yacc.c' || echo '$(srcdir)/'`src/conf_yacc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-conf_yacc.Tpo src/$(DEPDIR)/aide-conf_yacc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/conf_yacc.c' object='src/aide-conf_yacc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-conf_yacc.o `test -f 'src/conf_yacc.c' || echo '$(srcdir)/'`src/conf_yacc.c src/aide-conf_yacc.obj: src/conf_yacc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-conf_yacc.obj -MD -MP -MF src/$(DEPDIR)/aide-conf_yacc.Tpo -c -o src/aide-conf_yacc.obj `if test -f 'src/conf_yacc.c'; then $(CYGPATH_W) 'src/conf_yacc.c'; else $(CYGPATH_W) '$(srcdir)/src/conf_yacc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-conf_yacc.Tpo src/$(DEPDIR)/aide-conf_yacc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/conf_yacc.c' object='src/aide-conf_yacc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-conf_yacc.obj `if test -f 'src/conf_yacc.c'; then $(CYGPATH_W) 'src/conf_yacc.c'; else $(CYGPATH_W) '$(srcdir)/src/conf_yacc.c'; fi` src/aide-db.o: src/db.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-db.o -MD -MP -MF src/$(DEPDIR)/aide-db.Tpo -c -o src/aide-db.o `test -f 'src/db.c' || echo '$(srcdir)/'`src/db.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-db.Tpo src/$(DEPDIR)/aide-db.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/db.c' object='src/aide-db.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-db.o `test -f 'src/db.c' || echo '$(srcdir)/'`src/db.c src/aide-db.obj: src/db.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-db.obj -MD -MP -MF src/$(DEPDIR)/aide-db.Tpo -c -o src/aide-db.obj `if test -f 'src/db.c'; then $(CYGPATH_W) 'src/db.c'; else $(CYGPATH_W) '$(srcdir)/src/db.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-db.Tpo src/$(DEPDIR)/aide-db.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/db.c' object='src/aide-db.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-db.obj `if test -f 'src/db.c'; then $(CYGPATH_W) 'src/db.c'; else $(CYGPATH_W) '$(srcdir)/src/db.c'; fi` src/aide-db_disk.o: src/db_disk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-db_disk.o -MD -MP -MF src/$(DEPDIR)/aide-db_disk.Tpo -c -o src/aide-db_disk.o `test -f 'src/db_disk.c' || echo '$(srcdir)/'`src/db_disk.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-db_disk.Tpo src/$(DEPDIR)/aide-db_disk.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/db_disk.c' object='src/aide-db_disk.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-db_disk.o `test -f 'src/db_disk.c' || echo '$(srcdir)/'`src/db_disk.c src/aide-db_disk.obj: src/db_disk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-db_disk.obj -MD -MP -MF src/$(DEPDIR)/aide-db_disk.Tpo -c -o src/aide-db_disk.obj `if test -f 'src/db_disk.c'; then $(CYGPATH_W) 'src/db_disk.c'; else $(CYGPATH_W) '$(srcdir)/src/db_disk.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-db_disk.Tpo src/$(DEPDIR)/aide-db_disk.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/db_disk.c' object='src/aide-db_disk.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-db_disk.obj `if test -f 'src/db_disk.c'; then $(CYGPATH_W) 'src/db_disk.c'; else $(CYGPATH_W) '$(srcdir)/src/db_disk.c'; fi` src/aide-db_file.o: src/db_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-db_file.o -MD -MP -MF src/$(DEPDIR)/aide-db_file.Tpo -c -o src/aide-db_file.o `test -f 'src/db_file.c' || echo '$(srcdir)/'`src/db_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-db_file.Tpo src/$(DEPDIR)/aide-db_file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/db_file.c' object='src/aide-db_file.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-db_file.o `test -f 'src/db_file.c' || echo '$(srcdir)/'`src/db_file.c src/aide-db_file.obj: src/db_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-db_file.obj -MD -MP -MF src/$(DEPDIR)/aide-db_file.Tpo -c -o src/aide-db_file.obj `if test -f 'src/db_file.c'; then $(CYGPATH_W) 'src/db_file.c'; else $(CYGPATH_W) '$(srcdir)/src/db_file.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-db_file.Tpo src/$(DEPDIR)/aide-db_file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/db_file.c' object='src/aide-db_file.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-db_file.obj `if test -f 'src/db_file.c'; then $(CYGPATH_W) 'src/db_file.c'; else $(CYGPATH_W) '$(srcdir)/src/db_file.c'; fi` src/aide-db_list.o: src/db_list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-db_list.o -MD -MP -MF src/$(DEPDIR)/aide-db_list.Tpo -c -o src/aide-db_list.o `test -f 'src/db_list.c' || echo '$(srcdir)/'`src/db_list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-db_list.Tpo src/$(DEPDIR)/aide-db_list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/db_list.c' object='src/aide-db_list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-db_list.o `test -f 'src/db_list.c' || echo '$(srcdir)/'`src/db_list.c src/aide-db_list.obj: src/db_list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-db_list.obj -MD -MP -MF src/$(DEPDIR)/aide-db_list.Tpo -c -o src/aide-db_list.obj `if test -f 'src/db_list.c'; then $(CYGPATH_W) 'src/db_list.c'; else $(CYGPATH_W) '$(srcdir)/src/db_list.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-db_list.Tpo src/$(DEPDIR)/aide-db_list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/db_list.c' object='src/aide-db_list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-db_list.obj `if test -f 'src/db_list.c'; then $(CYGPATH_W) 'src/db_list.c'; else $(CYGPATH_W) '$(srcdir)/src/db_list.c'; fi` src/aide-do_md.o: src/do_md.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-do_md.o -MD -MP -MF src/$(DEPDIR)/aide-do_md.Tpo -c -o src/aide-do_md.o `test -f 'src/do_md.c' || echo '$(srcdir)/'`src/do_md.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-do_md.Tpo src/$(DEPDIR)/aide-do_md.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/do_md.c' object='src/aide-do_md.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-do_md.o `test -f 'src/do_md.c' || echo '$(srcdir)/'`src/do_md.c src/aide-do_md.obj: src/do_md.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-do_md.obj -MD -MP -MF src/$(DEPDIR)/aide-do_md.Tpo -c -o src/aide-do_md.obj `if test -f 'src/do_md.c'; then $(CYGPATH_W) 'src/do_md.c'; else $(CYGPATH_W) '$(srcdir)/src/do_md.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-do_md.Tpo src/$(DEPDIR)/aide-do_md.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/do_md.c' object='src/aide-do_md.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-do_md.obj `if test -f 'src/do_md.c'; then $(CYGPATH_W) 'src/do_md.c'; else $(CYGPATH_W) '$(srcdir)/src/do_md.c'; fi` src/aide-gen_list.o: src/gen_list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-gen_list.o -MD -MP -MF src/$(DEPDIR)/aide-gen_list.Tpo -c -o src/aide-gen_list.o `test -f 'src/gen_list.c' || echo '$(srcdir)/'`src/gen_list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-gen_list.Tpo src/$(DEPDIR)/aide-gen_list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/gen_list.c' object='src/aide-gen_list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-gen_list.o `test -f 'src/gen_list.c' || echo '$(srcdir)/'`src/gen_list.c src/aide-gen_list.obj: src/gen_list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-gen_list.obj -MD -MP -MF src/$(DEPDIR)/aide-gen_list.Tpo -c -o src/aide-gen_list.obj `if test -f 'src/gen_list.c'; then $(CYGPATH_W) 'src/gen_list.c'; else $(CYGPATH_W) '$(srcdir)/src/gen_list.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-gen_list.Tpo src/$(DEPDIR)/aide-gen_list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/gen_list.c' object='src/aide-gen_list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-gen_list.obj `if test -f 'src/gen_list.c'; then $(CYGPATH_W) 'src/gen_list.c'; else $(CYGPATH_W) '$(srcdir)/src/gen_list.c'; fi` src/aide-getopt1.o: src/getopt1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-getopt1.o -MD -MP -MF src/$(DEPDIR)/aide-getopt1.Tpo -c -o src/aide-getopt1.o `test -f 'src/getopt1.c' || echo '$(srcdir)/'`src/getopt1.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-getopt1.Tpo src/$(DEPDIR)/aide-getopt1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/getopt1.c' object='src/aide-getopt1.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-getopt1.o `test -f 'src/getopt1.c' || echo '$(srcdir)/'`src/getopt1.c src/aide-getopt1.obj: src/getopt1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-getopt1.obj -MD -MP -MF src/$(DEPDIR)/aide-getopt1.Tpo -c -o src/aide-getopt1.obj `if test -f 'src/getopt1.c'; then $(CYGPATH_W) 'src/getopt1.c'; else $(CYGPATH_W) '$(srcdir)/src/getopt1.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-getopt1.Tpo src/$(DEPDIR)/aide-getopt1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/getopt1.c' object='src/aide-getopt1.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-getopt1.obj `if test -f 'src/getopt1.c'; then $(CYGPATH_W) 'src/getopt1.c'; else $(CYGPATH_W) '$(srcdir)/src/getopt1.c'; fi` src/aide-getopt.o: src/getopt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-getopt.o -MD -MP -MF src/$(DEPDIR)/aide-getopt.Tpo -c -o src/aide-getopt.o `test -f 'src/getopt.c' || echo '$(srcdir)/'`src/getopt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-getopt.Tpo src/$(DEPDIR)/aide-getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/getopt.c' object='src/aide-getopt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-getopt.o `test -f 'src/getopt.c' || echo '$(srcdir)/'`src/getopt.c src/aide-getopt.obj: src/getopt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-getopt.obj -MD -MP -MF src/$(DEPDIR)/aide-getopt.Tpo -c -o src/aide-getopt.obj `if test -f 'src/getopt.c'; then $(CYGPATH_W) 'src/getopt.c'; else $(CYGPATH_W) '$(srcdir)/src/getopt.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-getopt.Tpo src/$(DEPDIR)/aide-getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/getopt.c' object='src/aide-getopt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-getopt.obj `if test -f 'src/getopt.c'; then $(CYGPATH_W) 'src/getopt.c'; else $(CYGPATH_W) '$(srcdir)/src/getopt.c'; fi` src/aide-hashsum.o: src/hashsum.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-hashsum.o -MD -MP -MF src/$(DEPDIR)/aide-hashsum.Tpo -c -o src/aide-hashsum.o `test -f 'src/hashsum.c' || echo '$(srcdir)/'`src/hashsum.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-hashsum.Tpo src/$(DEPDIR)/aide-hashsum.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/hashsum.c' object='src/aide-hashsum.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-hashsum.o `test -f 'src/hashsum.c' || echo '$(srcdir)/'`src/hashsum.c src/aide-hashsum.obj: src/hashsum.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-hashsum.obj -MD -MP -MF src/$(DEPDIR)/aide-hashsum.Tpo -c -o src/aide-hashsum.obj `if test -f 'src/hashsum.c'; then $(CYGPATH_W) 'src/hashsum.c'; else $(CYGPATH_W) '$(srcdir)/src/hashsum.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-hashsum.Tpo src/$(DEPDIR)/aide-hashsum.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/hashsum.c' object='src/aide-hashsum.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-hashsum.obj `if test -f 'src/hashsum.c'; then $(CYGPATH_W) 'src/hashsum.c'; else $(CYGPATH_W) '$(srcdir)/src/hashsum.c'; fi` src/aide-rx_rule.o: src/rx_rule.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-rx_rule.o -MD -MP -MF src/$(DEPDIR)/aide-rx_rule.Tpo -c -o src/aide-rx_rule.o `test -f 'src/rx_rule.c' || echo '$(srcdir)/'`src/rx_rule.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-rx_rule.Tpo src/$(DEPDIR)/aide-rx_rule.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rx_rule.c' object='src/aide-rx_rule.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-rx_rule.o `test -f 'src/rx_rule.c' || echo '$(srcdir)/'`src/rx_rule.c src/aide-rx_rule.obj: src/rx_rule.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-rx_rule.obj -MD -MP -MF src/$(DEPDIR)/aide-rx_rule.Tpo -c -o src/aide-rx_rule.obj `if test -f 'src/rx_rule.c'; then $(CYGPATH_W) 'src/rx_rule.c'; else $(CYGPATH_W) '$(srcdir)/src/rx_rule.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-rx_rule.Tpo src/$(DEPDIR)/aide-rx_rule.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rx_rule.c' object='src/aide-rx_rule.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-rx_rule.obj `if test -f 'src/rx_rule.c'; then $(CYGPATH_W) 'src/rx_rule.c'; else $(CYGPATH_W) '$(srcdir)/src/rx_rule.c'; fi` src/aide-list.o: src/list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-list.o -MD -MP -MF src/$(DEPDIR)/aide-list.Tpo -c -o src/aide-list.o `test -f 'src/list.c' || echo '$(srcdir)/'`src/list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-list.Tpo src/$(DEPDIR)/aide-list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/list.c' object='src/aide-list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-list.o `test -f 'src/list.c' || echo '$(srcdir)/'`src/list.c src/aide-list.obj: src/list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-list.obj -MD -MP -MF src/$(DEPDIR)/aide-list.Tpo -c -o src/aide-list.obj `if test -f 'src/list.c'; then $(CYGPATH_W) 'src/list.c'; else $(CYGPATH_W) '$(srcdir)/src/list.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-list.Tpo src/$(DEPDIR)/aide-list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/list.c' object='src/aide-list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-list.obj `if test -f 'src/list.c'; then $(CYGPATH_W) 'src/list.c'; else $(CYGPATH_W) '$(srcdir)/src/list.c'; fi` src/aide-log.o: src/log.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-log.o -MD -MP -MF src/$(DEPDIR)/aide-log.Tpo -c -o src/aide-log.o `test -f 'src/log.c' || echo '$(srcdir)/'`src/log.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-log.Tpo src/$(DEPDIR)/aide-log.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/log.c' object='src/aide-log.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-log.o `test -f 'src/log.c' || echo '$(srcdir)/'`src/log.c src/aide-log.obj: src/log.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-log.obj -MD -MP -MF src/$(DEPDIR)/aide-log.Tpo -c -o src/aide-log.obj `if test -f 'src/log.c'; then $(CYGPATH_W) 'src/log.c'; else $(CYGPATH_W) '$(srcdir)/src/log.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-log.Tpo src/$(DEPDIR)/aide-log.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/log.c' object='src/aide-log.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-log.obj `if test -f 'src/log.c'; then $(CYGPATH_W) 'src/log.c'; else $(CYGPATH_W) '$(srcdir)/src/log.c'; fi` src/aide-md.o: src/md.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-md.o -MD -MP -MF src/$(DEPDIR)/aide-md.Tpo -c -o src/aide-md.o `test -f 'src/md.c' || echo '$(srcdir)/'`src/md.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-md.Tpo src/$(DEPDIR)/aide-md.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md.c' object='src/aide-md.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-md.o `test -f 'src/md.c' || echo '$(srcdir)/'`src/md.c src/aide-md.obj: src/md.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-md.obj -MD -MP -MF src/$(DEPDIR)/aide-md.Tpo -c -o src/aide-md.obj `if test -f 'src/md.c'; then $(CYGPATH_W) 'src/md.c'; else $(CYGPATH_W) '$(srcdir)/src/md.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-md.Tpo src/$(DEPDIR)/aide-md.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md.c' object='src/aide-md.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-md.obj `if test -f 'src/md.c'; then $(CYGPATH_W) 'src/md.c'; else $(CYGPATH_W) '$(srcdir)/src/md.c'; fi` src/aide-queue.o: src/queue.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-queue.o -MD -MP -MF src/$(DEPDIR)/aide-queue.Tpo -c -o src/aide-queue.o `test -f 'src/queue.c' || echo '$(srcdir)/'`src/queue.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-queue.Tpo src/$(DEPDIR)/aide-queue.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/queue.c' object='src/aide-queue.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-queue.o `test -f 'src/queue.c' || echo '$(srcdir)/'`src/queue.c src/aide-queue.obj: src/queue.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-queue.obj -MD -MP -MF src/$(DEPDIR)/aide-queue.Tpo -c -o src/aide-queue.obj `if test -f 'src/queue.c'; then $(CYGPATH_W) 'src/queue.c'; else $(CYGPATH_W) '$(srcdir)/src/queue.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-queue.Tpo src/$(DEPDIR)/aide-queue.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/queue.c' object='src/aide-queue.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-queue.obj `if test -f 'src/queue.c'; then $(CYGPATH_W) 'src/queue.c'; else $(CYGPATH_W) '$(srcdir)/src/queue.c'; fi` src/aide-progress.o: src/progress.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-progress.o -MD -MP -MF src/$(DEPDIR)/aide-progress.Tpo -c -o src/aide-progress.o `test -f 'src/progress.c' || echo '$(srcdir)/'`src/progress.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-progress.Tpo src/$(DEPDIR)/aide-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/progress.c' object='src/aide-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-progress.o `test -f 'src/progress.c' || echo '$(srcdir)/'`src/progress.c src/aide-progress.obj: src/progress.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-progress.obj -MD -MP -MF src/$(DEPDIR)/aide-progress.Tpo -c -o src/aide-progress.obj `if test -f 'src/progress.c'; then $(CYGPATH_W) 'src/progress.c'; else $(CYGPATH_W) '$(srcdir)/src/progress.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-progress.Tpo src/$(DEPDIR)/aide-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/progress.c' object='src/aide-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-progress.obj `if test -f 'src/progress.c'; then $(CYGPATH_W) 'src/progress.c'; else $(CYGPATH_W) '$(srcdir)/src/progress.c'; fi` src/aide-seltree.o: src/seltree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-seltree.o -MD -MP -MF src/$(DEPDIR)/aide-seltree.Tpo -c -o src/aide-seltree.o `test -f 'src/seltree.c' || echo '$(srcdir)/'`src/seltree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-seltree.Tpo src/$(DEPDIR)/aide-seltree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/seltree.c' object='src/aide-seltree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-seltree.o `test -f 'src/seltree.c' || echo '$(srcdir)/'`src/seltree.c src/aide-seltree.obj: src/seltree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-seltree.obj -MD -MP -MF src/$(DEPDIR)/aide-seltree.Tpo -c -o src/aide-seltree.obj `if test -f 'src/seltree.c'; then $(CYGPATH_W) 'src/seltree.c'; else $(CYGPATH_W) '$(srcdir)/src/seltree.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-seltree.Tpo src/$(DEPDIR)/aide-seltree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/seltree.c' object='src/aide-seltree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-seltree.obj `if test -f 'src/seltree.c'; then $(CYGPATH_W) 'src/seltree.c'; else $(CYGPATH_W) '$(srcdir)/src/seltree.c'; fi` src/aide-symboltable.o: src/symboltable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-symboltable.o -MD -MP -MF src/$(DEPDIR)/aide-symboltable.Tpo -c -o src/aide-symboltable.o `test -f 'src/symboltable.c' || echo '$(srcdir)/'`src/symboltable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-symboltable.Tpo src/$(DEPDIR)/aide-symboltable.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/symboltable.c' object='src/aide-symboltable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-symboltable.o `test -f 'src/symboltable.c' || echo '$(srcdir)/'`src/symboltable.c src/aide-symboltable.obj: src/symboltable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-symboltable.obj -MD -MP -MF src/$(DEPDIR)/aide-symboltable.Tpo -c -o src/aide-symboltable.obj `if test -f 'src/symboltable.c'; then $(CYGPATH_W) 'src/symboltable.c'; else $(CYGPATH_W) '$(srcdir)/src/symboltable.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-symboltable.Tpo src/$(DEPDIR)/aide-symboltable.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/symboltable.c' object='src/aide-symboltable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-symboltable.obj `if test -f 'src/symboltable.c'; then $(CYGPATH_W) 'src/symboltable.c'; else $(CYGPATH_W) '$(srcdir)/src/symboltable.c'; fi` src/aide-tree.o: src/tree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-tree.o -MD -MP -MF src/$(DEPDIR)/aide-tree.Tpo -c -o src/aide-tree.o `test -f 'src/tree.c' || echo '$(srcdir)/'`src/tree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-tree.Tpo src/$(DEPDIR)/aide-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/tree.c' object='src/aide-tree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-tree.o `test -f 'src/tree.c' || echo '$(srcdir)/'`src/tree.c src/aide-tree.obj: src/tree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-tree.obj -MD -MP -MF src/$(DEPDIR)/aide-tree.Tpo -c -o src/aide-tree.obj `if test -f 'src/tree.c'; then $(CYGPATH_W) 'src/tree.c'; else $(CYGPATH_W) '$(srcdir)/src/tree.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-tree.Tpo src/$(DEPDIR)/aide-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/tree.c' object='src/aide-tree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-tree.obj `if test -f 'src/tree.c'; then $(CYGPATH_W) 'src/tree.c'; else $(CYGPATH_W) '$(srcdir)/src/tree.c'; fi` src/aide-url.o: src/url.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-url.o -MD -MP -MF src/$(DEPDIR)/aide-url.Tpo -c -o src/aide-url.o `test -f 'src/url.c' || echo '$(srcdir)/'`src/url.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-url.Tpo src/$(DEPDIR)/aide-url.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/url.c' object='src/aide-url.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-url.o `test -f 'src/url.c' || echo '$(srcdir)/'`src/url.c src/aide-url.obj: src/url.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-url.obj -MD -MP -MF src/$(DEPDIR)/aide-url.Tpo -c -o src/aide-url.obj `if test -f 'src/url.c'; then $(CYGPATH_W) 'src/url.c'; else $(CYGPATH_W) '$(srcdir)/src/url.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-url.Tpo src/$(DEPDIR)/aide-url.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/url.c' object='src/aide-url.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-url.obj `if test -f 'src/url.c'; then $(CYGPATH_W) 'src/url.c'; else $(CYGPATH_W) '$(srcdir)/src/url.c'; fi` src/aide-util.o: src/util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-util.o -MD -MP -MF src/$(DEPDIR)/aide-util.Tpo -c -o src/aide-util.o `test -f 'src/util.c' || echo '$(srcdir)/'`src/util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-util.Tpo src/$(DEPDIR)/aide-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/util.c' object='src/aide-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-util.o `test -f 'src/util.c' || echo '$(srcdir)/'`src/util.c src/aide-util.obj: src/util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-util.obj -MD -MP -MF src/$(DEPDIR)/aide-util.Tpo -c -o src/aide-util.obj `if test -f 'src/util.c'; then $(CYGPATH_W) 'src/util.c'; else $(CYGPATH_W) '$(srcdir)/src/util.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-util.Tpo src/$(DEPDIR)/aide-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/util.c' object='src/aide-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-util.obj `if test -f 'src/util.c'; then $(CYGPATH_W) 'src/util.c'; else $(CYGPATH_W) '$(srcdir)/src/util.c'; fi` src/aide-e2fsattrs.o: src/e2fsattrs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-e2fsattrs.o -MD -MP -MF src/$(DEPDIR)/aide-e2fsattrs.Tpo -c -o src/aide-e2fsattrs.o `test -f 'src/e2fsattrs.c' || echo '$(srcdir)/'`src/e2fsattrs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-e2fsattrs.Tpo src/$(DEPDIR)/aide-e2fsattrs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/e2fsattrs.c' object='src/aide-e2fsattrs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-e2fsattrs.o `test -f 'src/e2fsattrs.c' || echo '$(srcdir)/'`src/e2fsattrs.c src/aide-e2fsattrs.obj: src/e2fsattrs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-e2fsattrs.obj -MD -MP -MF src/$(DEPDIR)/aide-e2fsattrs.Tpo -c -o src/aide-e2fsattrs.obj `if test -f 'src/e2fsattrs.c'; then $(CYGPATH_W) 'src/e2fsattrs.c'; else $(CYGPATH_W) '$(srcdir)/src/e2fsattrs.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-e2fsattrs.Tpo src/$(DEPDIR)/aide-e2fsattrs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/e2fsattrs.c' object='src/aide-e2fsattrs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-e2fsattrs.obj `if test -f 'src/e2fsattrs.c'; then $(CYGPATH_W) 'src/e2fsattrs.c'; else $(CYGPATH_W) '$(srcdir)/src/e2fsattrs.c'; fi` src/aide-fopen.o: src/fopen.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-fopen.o -MD -MP -MF src/$(DEPDIR)/aide-fopen.Tpo -c -o src/aide-fopen.o `test -f 'src/fopen.c' || echo '$(srcdir)/'`src/fopen.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-fopen.Tpo src/$(DEPDIR)/aide-fopen.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/fopen.c' object='src/aide-fopen.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-fopen.o `test -f 'src/fopen.c' || echo '$(srcdir)/'`src/fopen.c src/aide-fopen.obj: src/fopen.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -MT src/aide-fopen.obj -MD -MP -MF src/$(DEPDIR)/aide-fopen.Tpo -c -o src/aide-fopen.obj `if test -f 'src/fopen.c'; then $(CYGPATH_W) 'src/fopen.c'; else $(CYGPATH_W) '$(srcdir)/src/fopen.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/aide-fopen.Tpo src/$(DEPDIR)/aide-fopen.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/fopen.c' object='src/aide-fopen.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(aide_CFLAGS) $(CFLAGS) -c -o src/aide-fopen.obj `if test -f 'src/fopen.c'; then $(CYGPATH_W) 'src/fopen.c'; else $(CYGPATH_W) '$(srcdir)/src/fopen.c'; fi` tests/check_aide-check_aide.o: tests/check_aide.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_aide.o -MD -MP -MF tests/$(DEPDIR)/check_aide-check_aide.Tpo -c -o tests/check_aide-check_aide.o `test -f 'tests/check_aide.c' || echo '$(srcdir)/'`tests/check_aide.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_aide.Tpo tests/$(DEPDIR)/check_aide-check_aide.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_aide.c' object='tests/check_aide-check_aide.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_aide.o `test -f 'tests/check_aide.c' || echo '$(srcdir)/'`tests/check_aide.c tests/check_aide-check_aide.obj: tests/check_aide.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_aide.obj -MD -MP -MF tests/$(DEPDIR)/check_aide-check_aide.Tpo -c -o tests/check_aide-check_aide.obj `if test -f 'tests/check_aide.c'; then $(CYGPATH_W) 'tests/check_aide.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_aide.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_aide.Tpo tests/$(DEPDIR)/check_aide-check_aide.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_aide.c' object='tests/check_aide-check_aide.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_aide.obj `if test -f 'tests/check_aide.c'; then $(CYGPATH_W) 'tests/check_aide.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_aide.c'; fi` tests/check_aide-check_attributes.o: tests/check_attributes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_attributes.o -MD -MP -MF tests/$(DEPDIR)/check_aide-check_attributes.Tpo -c -o tests/check_aide-check_attributes.o `test -f 'tests/check_attributes.c' || echo '$(srcdir)/'`tests/check_attributes.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_attributes.Tpo tests/$(DEPDIR)/check_aide-check_attributes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_attributes.c' object='tests/check_aide-check_attributes.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_attributes.o `test -f 'tests/check_attributes.c' || echo '$(srcdir)/'`tests/check_attributes.c tests/check_aide-check_attributes.obj: tests/check_attributes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_attributes.obj -MD -MP -MF tests/$(DEPDIR)/check_aide-check_attributes.Tpo -c -o tests/check_aide-check_attributes.obj `if test -f 'tests/check_attributes.c'; then $(CYGPATH_W) 'tests/check_attributes.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_attributes.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_attributes.Tpo tests/$(DEPDIR)/check_aide-check_attributes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_attributes.c' object='tests/check_aide-check_attributes.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_attributes.obj `if test -f 'tests/check_attributes.c'; then $(CYGPATH_W) 'tests/check_attributes.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_attributes.c'; fi` src/check_aide-attributes.o: src/attributes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-attributes.o -MD -MP -MF src/$(DEPDIR)/check_aide-attributes.Tpo -c -o src/check_aide-attributes.o `test -f 'src/attributes.c' || echo '$(srcdir)/'`src/attributes.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-attributes.Tpo src/$(DEPDIR)/check_aide-attributes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/attributes.c' object='src/check_aide-attributes.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-attributes.o `test -f 'src/attributes.c' || echo '$(srcdir)/'`src/attributes.c src/check_aide-attributes.obj: src/attributes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-attributes.obj -MD -MP -MF src/$(DEPDIR)/check_aide-attributes.Tpo -c -o src/check_aide-attributes.obj `if test -f 'src/attributes.c'; then $(CYGPATH_W) 'src/attributes.c'; else $(CYGPATH_W) '$(srcdir)/src/attributes.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-attributes.Tpo src/$(DEPDIR)/check_aide-attributes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/attributes.c' object='src/check_aide-attributes.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-attributes.obj `if test -f 'src/attributes.c'; then $(CYGPATH_W) 'src/attributes.c'; else $(CYGPATH_W) '$(srcdir)/src/attributes.c'; fi` tests/check_aide-check_base64.o: tests/check_base64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_base64.o -MD -MP -MF tests/$(DEPDIR)/check_aide-check_base64.Tpo -c -o tests/check_aide-check_base64.o `test -f 'tests/check_base64.c' || echo '$(srcdir)/'`tests/check_base64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_base64.Tpo tests/$(DEPDIR)/check_aide-check_base64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_base64.c' object='tests/check_aide-check_base64.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_base64.o `test -f 'tests/check_base64.c' || echo '$(srcdir)/'`tests/check_base64.c tests/check_aide-check_base64.obj: tests/check_base64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_base64.obj -MD -MP -MF tests/$(DEPDIR)/check_aide-check_base64.Tpo -c -o tests/check_aide-check_base64.obj `if test -f 'tests/check_base64.c'; then $(CYGPATH_W) 'tests/check_base64.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_base64.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_base64.Tpo tests/$(DEPDIR)/check_aide-check_base64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_base64.c' object='tests/check_aide-check_base64.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_base64.obj `if test -f 'tests/check_base64.c'; then $(CYGPATH_W) 'tests/check_base64.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_base64.c'; fi` src/check_aide-base64.o: src/base64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-base64.o -MD -MP -MF src/$(DEPDIR)/check_aide-base64.Tpo -c -o src/check_aide-base64.o `test -f 'src/base64.c' || echo '$(srcdir)/'`src/base64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-base64.Tpo src/$(DEPDIR)/check_aide-base64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/base64.c' object='src/check_aide-base64.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-base64.o `test -f 'src/base64.c' || echo '$(srcdir)/'`src/base64.c src/check_aide-base64.obj: src/base64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-base64.obj -MD -MP -MF src/$(DEPDIR)/check_aide-base64.Tpo -c -o src/check_aide-base64.obj `if test -f 'src/base64.c'; then $(CYGPATH_W) 'src/base64.c'; else $(CYGPATH_W) '$(srcdir)/src/base64.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-base64.Tpo src/$(DEPDIR)/check_aide-base64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/base64.c' object='src/check_aide-base64.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-base64.obj `if test -f 'src/base64.c'; then $(CYGPATH_W) 'src/base64.c'; else $(CYGPATH_W) '$(srcdir)/src/base64.c'; fi` tests/check_aide-check_hashsum.o: tests/check_hashsum.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_hashsum.o -MD -MP -MF tests/$(DEPDIR)/check_aide-check_hashsum.Tpo -c -o tests/check_aide-check_hashsum.o `test -f 'tests/check_hashsum.c' || echo '$(srcdir)/'`tests/check_hashsum.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_hashsum.Tpo tests/$(DEPDIR)/check_aide-check_hashsum.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_hashsum.c' object='tests/check_aide-check_hashsum.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_hashsum.o `test -f 'tests/check_hashsum.c' || echo '$(srcdir)/'`tests/check_hashsum.c tests/check_aide-check_hashsum.obj: tests/check_hashsum.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_hashsum.obj -MD -MP -MF tests/$(DEPDIR)/check_aide-check_hashsum.Tpo -c -o tests/check_aide-check_hashsum.obj `if test -f 'tests/check_hashsum.c'; then $(CYGPATH_W) 'tests/check_hashsum.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_hashsum.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_hashsum.Tpo tests/$(DEPDIR)/check_aide-check_hashsum.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_hashsum.c' object='tests/check_aide-check_hashsum.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_hashsum.obj `if test -f 'tests/check_hashsum.c'; then $(CYGPATH_W) 'tests/check_hashsum.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_hashsum.c'; fi` src/check_aide-hashsum.o: src/hashsum.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-hashsum.o -MD -MP -MF src/$(DEPDIR)/check_aide-hashsum.Tpo -c -o src/check_aide-hashsum.o `test -f 'src/hashsum.c' || echo '$(srcdir)/'`src/hashsum.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-hashsum.Tpo src/$(DEPDIR)/check_aide-hashsum.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/hashsum.c' object='src/check_aide-hashsum.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-hashsum.o `test -f 'src/hashsum.c' || echo '$(srcdir)/'`src/hashsum.c src/check_aide-hashsum.obj: src/hashsum.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-hashsum.obj -MD -MP -MF src/$(DEPDIR)/check_aide-hashsum.Tpo -c -o src/check_aide-hashsum.obj `if test -f 'src/hashsum.c'; then $(CYGPATH_W) 'src/hashsum.c'; else $(CYGPATH_W) '$(srcdir)/src/hashsum.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-hashsum.Tpo src/$(DEPDIR)/check_aide-hashsum.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/hashsum.c' object='src/check_aide-hashsum.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-hashsum.obj `if test -f 'src/hashsum.c'; then $(CYGPATH_W) 'src/hashsum.c'; else $(CYGPATH_W) '$(srcdir)/src/hashsum.c'; fi` tests/check_aide-check_seltree.o: tests/check_seltree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_seltree.o -MD -MP -MF tests/$(DEPDIR)/check_aide-check_seltree.Tpo -c -o tests/check_aide-check_seltree.o `test -f 'tests/check_seltree.c' || echo '$(srcdir)/'`tests/check_seltree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_seltree.Tpo tests/$(DEPDIR)/check_aide-check_seltree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_seltree.c' object='tests/check_aide-check_seltree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_seltree.o `test -f 'tests/check_seltree.c' || echo '$(srcdir)/'`tests/check_seltree.c tests/check_aide-check_seltree.obj: tests/check_seltree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_seltree.obj -MD -MP -MF tests/$(DEPDIR)/check_aide-check_seltree.Tpo -c -o tests/check_aide-check_seltree.obj `if test -f 'tests/check_seltree.c'; then $(CYGPATH_W) 'tests/check_seltree.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_seltree.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_seltree.Tpo tests/$(DEPDIR)/check_aide-check_seltree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_seltree.c' object='tests/check_aide-check_seltree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_seltree.obj `if test -f 'tests/check_seltree.c'; then $(CYGPATH_W) 'tests/check_seltree.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_seltree.c'; fi` src/check_aide-seltree.o: src/seltree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-seltree.o -MD -MP -MF src/$(DEPDIR)/check_aide-seltree.Tpo -c -o src/check_aide-seltree.o `test -f 'src/seltree.c' || echo '$(srcdir)/'`src/seltree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-seltree.Tpo src/$(DEPDIR)/check_aide-seltree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/seltree.c' object='src/check_aide-seltree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-seltree.o `test -f 'src/seltree.c' || echo '$(srcdir)/'`src/seltree.c src/check_aide-seltree.obj: src/seltree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-seltree.obj -MD -MP -MF src/$(DEPDIR)/check_aide-seltree.Tpo -c -o src/check_aide-seltree.obj `if test -f 'src/seltree.c'; then $(CYGPATH_W) 'src/seltree.c'; else $(CYGPATH_W) '$(srcdir)/src/seltree.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-seltree.Tpo src/$(DEPDIR)/check_aide-seltree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/seltree.c' object='src/check_aide-seltree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-seltree.obj `if test -f 'src/seltree.c'; then $(CYGPATH_W) 'src/seltree.c'; else $(CYGPATH_W) '$(srcdir)/src/seltree.c'; fi` tests/check_aide-check_progress.o: tests/check_progress.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_progress.o -MD -MP -MF tests/$(DEPDIR)/check_aide-check_progress.Tpo -c -o tests/check_aide-check_progress.o `test -f 'tests/check_progress.c' || echo '$(srcdir)/'`tests/check_progress.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_progress.Tpo tests/$(DEPDIR)/check_aide-check_progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_progress.c' object='tests/check_aide-check_progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_progress.o `test -f 'tests/check_progress.c' || echo '$(srcdir)/'`tests/check_progress.c tests/check_aide-check_progress.obj: tests/check_progress.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT tests/check_aide-check_progress.obj -MD -MP -MF tests/$(DEPDIR)/check_aide-check_progress.Tpo -c -o tests/check_aide-check_progress.obj `if test -f 'tests/check_progress.c'; then $(CYGPATH_W) 'tests/check_progress.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_progress.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_aide-check_progress.Tpo tests/$(DEPDIR)/check_aide-check_progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_progress.c' object='tests/check_aide-check_progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o tests/check_aide-check_progress.obj `if test -f 'tests/check_progress.c'; then $(CYGPATH_W) 'tests/check_progress.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_progress.c'; fi` src/check_aide-md.o: src/md.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-md.o -MD -MP -MF src/$(DEPDIR)/check_aide-md.Tpo -c -o src/check_aide-md.o `test -f 'src/md.c' || echo '$(srcdir)/'`src/md.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-md.Tpo src/$(DEPDIR)/check_aide-md.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md.c' object='src/check_aide-md.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-md.o `test -f 'src/md.c' || echo '$(srcdir)/'`src/md.c src/check_aide-md.obj: src/md.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-md.obj -MD -MP -MF src/$(DEPDIR)/check_aide-md.Tpo -c -o src/check_aide-md.obj `if test -f 'src/md.c'; then $(CYGPATH_W) 'src/md.c'; else $(CYGPATH_W) '$(srcdir)/src/md.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-md.Tpo src/$(DEPDIR)/check_aide-md.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md.c' object='src/check_aide-md.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-md.obj `if test -f 'src/md.c'; then $(CYGPATH_W) 'src/md.c'; else $(CYGPATH_W) '$(srcdir)/src/md.c'; fi` src/check_aide-file.o: src/file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-file.o -MD -MP -MF src/$(DEPDIR)/check_aide-file.Tpo -c -o src/check_aide-file.o `test -f 'src/file.c' || echo '$(srcdir)/'`src/file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-file.Tpo src/$(DEPDIR)/check_aide-file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/file.c' object='src/check_aide-file.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-file.o `test -f 'src/file.c' || echo '$(srcdir)/'`src/file.c src/check_aide-file.obj: src/file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-file.obj -MD -MP -MF src/$(DEPDIR)/check_aide-file.Tpo -c -o src/check_aide-file.obj `if test -f 'src/file.c'; then $(CYGPATH_W) 'src/file.c'; else $(CYGPATH_W) '$(srcdir)/src/file.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-file.Tpo src/$(DEPDIR)/check_aide-file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/file.c' object='src/check_aide-file.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-file.obj `if test -f 'src/file.c'; then $(CYGPATH_W) 'src/file.c'; else $(CYGPATH_W) '$(srcdir)/src/file.c'; fi` src/check_aide-log.o: src/log.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-log.o -MD -MP -MF src/$(DEPDIR)/check_aide-log.Tpo -c -o src/check_aide-log.o `test -f 'src/log.c' || echo '$(srcdir)/'`src/log.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-log.Tpo src/$(DEPDIR)/check_aide-log.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/log.c' object='src/check_aide-log.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-log.o `test -f 'src/log.c' || echo '$(srcdir)/'`src/log.c src/check_aide-log.obj: src/log.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-log.obj -MD -MP -MF src/$(DEPDIR)/check_aide-log.Tpo -c -o src/check_aide-log.obj `if test -f 'src/log.c'; then $(CYGPATH_W) 'src/log.c'; else $(CYGPATH_W) '$(srcdir)/src/log.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-log.Tpo src/$(DEPDIR)/check_aide-log.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/log.c' object='src/check_aide-log.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-log.obj `if test -f 'src/log.c'; then $(CYGPATH_W) 'src/log.c'; else $(CYGPATH_W) '$(srcdir)/src/log.c'; fi` src/check_aide-util.o: src/util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-util.o -MD -MP -MF src/$(DEPDIR)/check_aide-util.Tpo -c -o src/check_aide-util.o `test -f 'src/util.c' || echo '$(srcdir)/'`src/util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-util.Tpo src/$(DEPDIR)/check_aide-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/util.c' object='src/check_aide-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-util.o `test -f 'src/util.c' || echo '$(srcdir)/'`src/util.c src/check_aide-util.obj: src/util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-util.obj -MD -MP -MF src/$(DEPDIR)/check_aide-util.Tpo -c -o src/check_aide-util.obj `if test -f 'src/util.c'; then $(CYGPATH_W) 'src/util.c'; else $(CYGPATH_W) '$(srcdir)/src/util.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-util.Tpo src/$(DEPDIR)/check_aide-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/util.c' object='src/check_aide-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-util.obj `if test -f 'src/util.c'; then $(CYGPATH_W) 'src/util.c'; else $(CYGPATH_W) '$(srcdir)/src/util.c'; fi` src/check_aide-list.o: src/list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-list.o -MD -MP -MF src/$(DEPDIR)/check_aide-list.Tpo -c -o src/check_aide-list.o `test -f 'src/list.c' || echo '$(srcdir)/'`src/list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-list.Tpo src/$(DEPDIR)/check_aide-list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/list.c' object='src/check_aide-list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-list.o `test -f 'src/list.c' || echo '$(srcdir)/'`src/list.c src/check_aide-list.obj: src/list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-list.obj -MD -MP -MF src/$(DEPDIR)/check_aide-list.Tpo -c -o src/check_aide-list.obj `if test -f 'src/list.c'; then $(CYGPATH_W) 'src/list.c'; else $(CYGPATH_W) '$(srcdir)/src/list.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-list.Tpo src/$(DEPDIR)/check_aide-list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/list.c' object='src/check_aide-list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-list.obj `if test -f 'src/list.c'; then $(CYGPATH_W) 'src/list.c'; else $(CYGPATH_W) '$(srcdir)/src/list.c'; fi` src/check_aide-tree.o: src/tree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-tree.o -MD -MP -MF src/$(DEPDIR)/check_aide-tree.Tpo -c -o src/check_aide-tree.o `test -f 'src/tree.c' || echo '$(srcdir)/'`src/tree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-tree.Tpo src/$(DEPDIR)/check_aide-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/tree.c' object='src/check_aide-tree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-tree.o `test -f 'src/tree.c' || echo '$(srcdir)/'`src/tree.c src/check_aide-tree.obj: src/tree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-tree.obj -MD -MP -MF src/$(DEPDIR)/check_aide-tree.Tpo -c -o src/check_aide-tree.obj `if test -f 'src/tree.c'; then $(CYGPATH_W) 'src/tree.c'; else $(CYGPATH_W) '$(srcdir)/src/tree.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-tree.Tpo src/$(DEPDIR)/check_aide-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/tree.c' object='src/check_aide-tree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-tree.obj `if test -f 'src/tree.c'; then $(CYGPATH_W) 'src/tree.c'; else $(CYGPATH_W) '$(srcdir)/src/tree.c'; fi` src/check_aide-rx_rule.o: src/rx_rule.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-rx_rule.o -MD -MP -MF src/$(DEPDIR)/check_aide-rx_rule.Tpo -c -o src/check_aide-rx_rule.o `test -f 'src/rx_rule.c' || echo '$(srcdir)/'`src/rx_rule.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-rx_rule.Tpo src/$(DEPDIR)/check_aide-rx_rule.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rx_rule.c' object='src/check_aide-rx_rule.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-rx_rule.o `test -f 'src/rx_rule.c' || echo '$(srcdir)/'`src/rx_rule.c src/check_aide-rx_rule.obj: src/rx_rule.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -MT src/check_aide-rx_rule.obj -MD -MP -MF src/$(DEPDIR)/check_aide-rx_rule.Tpo -c -o src/check_aide-rx_rule.obj `if test -f 'src/rx_rule.c'; then $(CYGPATH_W) 'src/rx_rule.c'; else $(CYGPATH_W) '$(srcdir)/src/rx_rule.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/check_aide-rx_rule.Tpo src/$(DEPDIR)/check_aide-rx_rule.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rx_rule.c' object='src/check_aide-rx_rule.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_aide_CFLAGS) $(CFLAGS) -c -o src/check_aide-rx_rule.obj `if test -f 'src/rx_rule.c'; then $(CYGPATH_W) 'src/rx_rule.c'; else $(CYGPATH_W) '$(srcdir)/src/rx_rule.c'; fi` .l.c: $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) .y.c: $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-man5: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man5dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.5[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ done; } uninstall-man5: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man5dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.5[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) $(AM_V_at)$(MKDIR_P) "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -$(am__rm_f) $(CLEANFILES) distclean-generic: -$(am__rm_f) $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) -$(am__rm_f) src/$(DEPDIR)/$(am__dirstamp) -$(am__rm_f) src/$(am__dirstamp) -$(am__rm_f) tests/$(DEPDIR)/$(am__dirstamp) -$(am__rm_f) tests/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -$(am__rm_f) $(BUILT_SOURCES) -$(am__rm_f) src/conf_lex.c -$(am__rm_f) src/conf_yacc.c -$(am__rm_f) src/conf_yacc.h clean: clean-am clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f src/$(DEPDIR)/aide-aide.Po -rm -f src/$(DEPDIR)/aide-attributes.Po -rm -f src/$(DEPDIR)/aide-base64.Po -rm -f src/$(DEPDIR)/aide-be.Po -rm -f src/$(DEPDIR)/aide-commandconf.Po -rm -f src/$(DEPDIR)/aide-conf_ast.Po -rm -f src/$(DEPDIR)/aide-conf_eval.Po -rm -f src/$(DEPDIR)/aide-conf_lex.Po -rm -f src/$(DEPDIR)/aide-conf_yacc.Po -rm -f src/$(DEPDIR)/aide-db.Po -rm -f src/$(DEPDIR)/aide-db_disk.Po -rm -f src/$(DEPDIR)/aide-db_file.Po -rm -f src/$(DEPDIR)/aide-db_list.Po -rm -f src/$(DEPDIR)/aide-do_md.Po -rm -f src/$(DEPDIR)/aide-e2fsattrs.Po -rm -f src/$(DEPDIR)/aide-file.Po -rm -f src/$(DEPDIR)/aide-fopen.Po -rm -f src/$(DEPDIR)/aide-gen_list.Po -rm -f src/$(DEPDIR)/aide-getopt.Po -rm -f src/$(DEPDIR)/aide-getopt1.Po -rm -f src/$(DEPDIR)/aide-hashsum.Po -rm -f src/$(DEPDIR)/aide-list.Po -rm -f src/$(DEPDIR)/aide-log.Po -rm -f src/$(DEPDIR)/aide-md.Po -rm -f src/$(DEPDIR)/aide-progress.Po -rm -f src/$(DEPDIR)/aide-queue.Po -rm -f src/$(DEPDIR)/aide-report.Po -rm -f src/$(DEPDIR)/aide-report_json.Po -rm -f src/$(DEPDIR)/aide-report_plain.Po -rm -f src/$(DEPDIR)/aide-rx_rule.Po -rm -f src/$(DEPDIR)/aide-seltree.Po -rm -f src/$(DEPDIR)/aide-symboltable.Po -rm -f src/$(DEPDIR)/aide-tree.Po -rm -f src/$(DEPDIR)/aide-url.Po -rm -f src/$(DEPDIR)/aide-util.Po -rm -f src/$(DEPDIR)/check_aide-attributes.Po -rm -f src/$(DEPDIR)/check_aide-base64.Po -rm -f src/$(DEPDIR)/check_aide-file.Po -rm -f src/$(DEPDIR)/check_aide-hashsum.Po -rm -f src/$(DEPDIR)/check_aide-list.Po -rm -f src/$(DEPDIR)/check_aide-log.Po -rm -f src/$(DEPDIR)/check_aide-md.Po -rm -f src/$(DEPDIR)/check_aide-rx_rule.Po -rm -f src/$(DEPDIR)/check_aide-seltree.Po -rm -f src/$(DEPDIR)/check_aide-tree.Po -rm -f src/$(DEPDIR)/check_aide-util.Po -rm -f tests/$(DEPDIR)/check_aide-check_aide.Po -rm -f tests/$(DEPDIR)/check_aide-check_attributes.Po -rm -f tests/$(DEPDIR)/check_aide-check_base64.Po -rm -f tests/$(DEPDIR)/check_aide-check_hashsum.Po -rm -f tests/$(DEPDIR)/check_aide-check_progress.Po -rm -f tests/$(DEPDIR)/check_aide-check_seltree.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-man5 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f src/$(DEPDIR)/aide-aide.Po -rm -f src/$(DEPDIR)/aide-attributes.Po -rm -f src/$(DEPDIR)/aide-base64.Po -rm -f src/$(DEPDIR)/aide-be.Po -rm -f src/$(DEPDIR)/aide-commandconf.Po -rm -f src/$(DEPDIR)/aide-conf_ast.Po -rm -f src/$(DEPDIR)/aide-conf_eval.Po -rm -f src/$(DEPDIR)/aide-conf_lex.Po -rm -f src/$(DEPDIR)/aide-conf_yacc.Po -rm -f src/$(DEPDIR)/aide-db.Po -rm -f src/$(DEPDIR)/aide-db_disk.Po -rm -f src/$(DEPDIR)/aide-db_file.Po -rm -f src/$(DEPDIR)/aide-db_list.Po -rm -f src/$(DEPDIR)/aide-do_md.Po -rm -f src/$(DEPDIR)/aide-e2fsattrs.Po -rm -f src/$(DEPDIR)/aide-file.Po -rm -f src/$(DEPDIR)/aide-fopen.Po -rm -f src/$(DEPDIR)/aide-gen_list.Po -rm -f src/$(DEPDIR)/aide-getopt.Po -rm -f src/$(DEPDIR)/aide-getopt1.Po -rm -f src/$(DEPDIR)/aide-hashsum.Po -rm -f src/$(DEPDIR)/aide-list.Po -rm -f src/$(DEPDIR)/aide-log.Po -rm -f src/$(DEPDIR)/aide-md.Po -rm -f src/$(DEPDIR)/aide-progress.Po -rm -f src/$(DEPDIR)/aide-queue.Po -rm -f src/$(DEPDIR)/aide-report.Po -rm -f src/$(DEPDIR)/aide-report_json.Po -rm -f src/$(DEPDIR)/aide-report_plain.Po -rm -f src/$(DEPDIR)/aide-rx_rule.Po -rm -f src/$(DEPDIR)/aide-seltree.Po -rm -f src/$(DEPDIR)/aide-symboltable.Po -rm -f src/$(DEPDIR)/aide-tree.Po -rm -f src/$(DEPDIR)/aide-url.Po -rm -f src/$(DEPDIR)/aide-util.Po -rm -f src/$(DEPDIR)/check_aide-attributes.Po -rm -f src/$(DEPDIR)/check_aide-base64.Po -rm -f src/$(DEPDIR)/check_aide-file.Po -rm -f src/$(DEPDIR)/check_aide-hashsum.Po -rm -f src/$(DEPDIR)/check_aide-list.Po -rm -f src/$(DEPDIR)/check_aide-log.Po -rm -f src/$(DEPDIR)/check_aide-md.Po -rm -f src/$(DEPDIR)/check_aide-rx_rule.Po -rm -f src/$(DEPDIR)/check_aide-seltree.Po -rm -f src/$(DEPDIR)/check_aide-tree.Po -rm -f src/$(DEPDIR)/check_aide-util.Po -rm -f tests/$(DEPDIR)/check_aide-check_aide.Po -rm -f tests/$(DEPDIR)/check_aide-check_attributes.Po -rm -f tests/$(DEPDIR)/check_aide-check_base64.Po -rm -f tests/$(DEPDIR)/check_aide-check_hashsum.Po -rm -f tests/$(DEPDIR)/check_aide-check_progress.Po -rm -f tests/$(DEPDIR)/check_aide-check_seltree.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 uninstall-man5 .MAKE: all check check-am install install-am install-exec \ install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \ check-TESTS check-am clean clean-binPROGRAMS \ clean-checkPROGRAMS clean-cscope clean-generic cscope \ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ dist-zstd distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-man5 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-man uninstall-man1 uninstall-man5 .PRECIOUS: Makefile src/conf_yacc.c: src/conf_yacc.y $(YACC) $(AM_YFLAGS) -Wno-yacc -Wall -Werror -o $@ -p conf $< src/conf_lex.c: src/conf_lex.l src/conf_yacc.c $(LEX) $(AM_LFLAGS) -o$@ -Pconf $< autoreconf-clean: maintainer-clean -rm -f INSTALL Makefile.in aclocal.m4 compile config.guess \ include/config.h.in include/config.h.in~ config.sub configure configure~ depcomp \ install-sh missing version.m4 ylwrap -rmdir src/.deps tests/.deps # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Tell GNU make to disable its built-in pattern rules. %:: %,v %:: RCS/%,v %:: RCS/% %:: s.% %:: SCCS/s.% aide-0.19/SECURITY.md0000644000175000017500000002075714613411450007631 # Security Policy ## Supported Versions Generally the latest release (e.g. `v0.18.x`) is supported with security updates. ## Reporting a Vulnerability *PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY* If you have found a security issue in AIDE, please disclose it privately and responsibly by sending a PGP encrypted email (no HTML please) to `hannes(at)vonhaugwitz(dot)com`. You should receive a response within a few days. If for some reason you do not, please follow up via email to ensure we received your original message. Please add the address above as safe senders in your email client. Your message should include any of the following (if possible): - type of issue (e.g. buffer overflow) - affected versions - step-by-step instructions to reproduce the issue (if known) - proof-of-concept or exploit code (if available) - impact of the issue, including how an attacker might exploit the issue - your PGP key - your name and affiliation (if any), if you wish to get recognition - whether the vulnerability is public or known to third parties (if so please provide details) Encrypt your mail (preferably in `PGP/MIME` format) using the following PGP key: ``` pub rsa4096/0xF6947DAB68E7B931 2011-06-28 [C] Key fingerprint = 2BBB D30F AAB2 9B32 53BC FBA6 F694 7DAB 68E7 B931 uid [ultimate] Hannes von Haugwitz uid [ultimate] Hannes von Haugwitz sub rsa3072/0x18EE86386022EF57 2011-06-28 [S] sub rsa3072/0x57C198E495A601C7 2011-06-28 [E] sub rsa3072/0xF4B483CB268B1790 2011-06-28 [A] ``` ``` -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBE4J+9wBEADaOHrCu7XWLSs4RzDPQMv4vCdtMASJJFBzXZzxaqUaDTZpwOxR 6wMw8PFwC0UphzbX/UBSZ1Q+31Xq0sCMOBfKA4hFVY7uDwLqommVVrctlvpcKNa4 O1lov0pg7yessUnaidO+DoJ2SJW7pvvXcI6FWLXNENzsOWL8zzgIXrkU73hV3moL yrfPXwwj+tppSXeOg7HgxRSUfoqKwVkCdtQEyvBI1ue33jhwL1/9RUg4m8ph2unk QXJIloivIu7Yv0S3TgcbNzJJ7V1B/M+v1EjVKhtImp1iocxLctzE5d9G2MKfpAkg c/9McV9+KdflpS5gWZIMHHKnsJ0dzh/LZGKi47298W0h4ce3BM9gGetNyu1f7hQi 9pumoUeMymkuPeuQv3NaecLY9LSvAF9KLWRwXXxoihDYlr4cbpMyS4jT/nFCd3cu 5CXBBIoeO2w+bpxs16LD83MQdg9vRKC77sgOC/O+gWIJDh31l4aystomOOHek069 pWoOb1aIbFtaSYtVntyZ8DmyoDWvB3b/PXbxle5CkN/NPw9VDjZxqPSliTdUf1LG EDPx22fFTHfMhjgC5XqceoWWCmvqy+4grHaLSkYKimI1DlhhVH6jYnhfBzcWDb4n LyoRGOAKa0FurW5//I78wpkZCvTA4lTvJPHBI77+HlfiDjuuCMdFbyp6GQARAQAB tCtIYW5uZXMgdm9uIEhhdWd3aXR6IDxodmhhdWd3aXR6QGRlYmlhbi5vcmc+iQJU BBMBCgA+AhsBBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAFiEEK7vTD6qymzJTvPum 9pR9q2jnuTEFAmR8KDkFCRw1asMACgkQ9pR9q2jnuTH0/xAAgl3mNLOdSvUwTC6d raw8jeQE2CmFroUVTvmMl3Ukwz946K/ba+eD8QZaFhcQ3UltxvCur518+EBo9nJ9 WvBnd/Oi3j2ReL5Md038vrlXPd/lchK9RpOtrGIAraLk76rpPgnD9dVucqJpWL2M gyTrjVyoaAzp2nJysENP1bBczDxduTSiahz6S7vAjb3IXRhrMrX3dQg3EBDloJFZ mkoFYwnqdNzshqad8ehMaKc6doFg66DuEAilueESYBNLNNmqZqQD3in14DEDR9bj b3XjFKTuf78ptTAf8ZsU9VrU+XCfx2o74kbfnOvkhMzGOIYX0B/z+06YV60GvFrD UerXOZN4V5izVEdTkcHx0f+3SVnMieY1EGi3O+1dtvGeHS4qiuJPVOHlXPNoMjsX McZNcNe4V0w1XO9tWRboM4lPM9gfz88gy1hO04y5NcNUq9JJi/RioOEFkcXs/Y0N G8wOvHeBJ2mDJs7Gv06mmgFUrh1TwCiXw0+877nQpYfuL0h1zrsOC9Zvxqpm34Z5 h5+HXD3RIbjkNjX7uQZKOEKNa+7P94XssZNOdsL2O6kw2NB/Hek0NatDq6O1yUwj J9dx+VhX/suMXxPGW/ls36oiUZ1R7CV2Aya8YwIybTZWPK8gDec6uhkHH5O5e4I2 guzttrtrKHJklOP9KIG8rE000Z20LEhhbm5lcyB2b24gSGF1Z3dpdHogPGhhbm5l c0B2b25oYXVnd2l0ei5jb20+iQJXBBMBCgBBAhsBBQsJCAcDBRUKCQgLBRYCAwEA Ah4BAheAAhkBFiEEK7vTD6qymzJTvPum9pR9q2jnuTEFAmR8KB8FCRw1asMACgkQ 9pR9q2jnuTEepw//ZGDHnwD8XVr3N0Ky6HoM1Jzoa+WiUQaFkrGIf7evyy27gTwH fsI2Eupnrd6rBV8Osy5iGSlxP3tsg08pR7zvOxfMXSDuvcWabxQtNDTkpG47SSne zHUup5ptFVrcggMXjKGnEq0WvNlB53qFdbg4og8K1BTT5/zwNcVp3PewGpyU6mu4 xqdX+Ezt9oSpJ3c/UZBZD1lCEQQRD4ZubyxDJVTdQISCotkEe/SV5Pf9p29KTlMZ ZINVR/eBYldQ+KO1E2GMheqpsnOP7Z9XMYCY9W3VyjJi1HSkJrzouRdlhPSwOsep Y4zH58dwZJn5WMPRTsS7dMVqBndcWoYWjWILk/MXWj6Z+IYV0ffwfo23Aprh/EvB IHfbG0yuys6CgvxfPZlMAJnG3bw/5IRRbWVBD/hWDEu7gzxBV0RnBBdBZJnEhBly xJEPTPjkumGDjrwSTPe1UFUHBxgwVBm/+bo30rU3R8ggtGjCwM9un5e+zZlw/6Y9 TLmWc8lWqTRnWD+7zFG+Cr1Rm/YgV3OmwX5v1bYNOORYVoj0wNx4qSe3VrW15SGz rYu9LAQLvd1gFOZPjIXdL9x8nTQ3rNAQz6gl7hIUo0pKb3YLHM/vG2uVA7nK155j BiC9w/8A3YR0Q7jikbLRl9YtSvkaAPeQ6qU7C1cCWaQhOcqVMZ10V2yU8zi5AY0E Tgn8cgEMAM6Nv21neMk8LSH2HPDirz0w0UWnpkqdmk1oPCw+b4SILyJwNnOi1G5N OP9ubGLDgr1HIzVnG18k429rScgKK9gddT0dqFmmQnFvGAVaMQPTNQVZFvPiZ27j DjwupwcN5vnMlZ6Hqwk4vwTDqVi0qQ3lOnPYa9p4VLRmZO5a1A1F+CJsczifmohM nCsbcoB1iqBV3/YgQa/RW2Gqjecq/g9fmvIMgj0+O03PAp4KGizRAhcBTkebpVrR GedM9wFtn+rXNJ0PzVt0Ez2yJ+0FIKn0o/dT40h6oSDdXOce0WIW+jcAkKtpzTkf 9bleRqfRDYz2tvLbRrij1EO5POj6Z54BA/lzTCZFz9IRkrvOHyzPr6C5aP1BOJGd NhWLXNuuxykMFyoQ591qSetDFH6egnjIFaIR7TNZITew49cZi1ZcYaIEb00EdjlR 6gMzX/WOA/tptfAcaK4r8A5NnDh0cxcaGQPN9WMtcyeWIJogFFMTC07YXB13l4yU d/WfXI2l6QARAQABiQPbBBgBCgAmAhsCFiEEK7vTD6qymzJTvPum9pR9q2jnuTEF AmR8KHMFCRpUNwEBqcDdIAQZAQgABgUCTgn8cgAKCRAY7oY4YCLvV/x3C/44CpgL VRUZT8bxDp7ZjIpyxTB43f+tpGlykSFMYS3/Cw/i7ar1fjoAeVonXAp0PpqeuJ9w +p9r3UWPZeVlmibYybLujnNDnV6RmeNtzc4HUtgPP/s7rynU6RFX46T5YRUBo/aC hjFcWVi+YUaNfBdgaKyf4INWtuNTndLXlOJkuqGCikKOuuwReJ4pvs49whVj9Nug jsotEf4/+tzsrCIWLtSF2BI/Fz0xV2vlmCzsB5fN4nC/ksaaXAL7jHwaUbTMLJ3W 9pcqBzyUd5CEMlE0bwPihyVItLLdTErbuN7M5v3iYSRakRzm0xCpyb01Ho/KWsTW znaGh3XK6e05Avss8mIaju+Zf/Vk+oLNzGqI+YAgczWyK82yDbuxXfWauBI32nmF XDwqN8pvPGGEm8BgMQxfKnV0mt3BezPTYBSuPw22+wVbao3xMJSIlIbFitw2ZOSL mit64IYYVGaWr3awn65MSK/Db9SRaGv52gOR6ylDul7wkjNE8ohlaos0y9sJEPaU fato57kxHA8QANbsBb9seSTd0jNBsqsSh2QWWaFU55DRSixz4AiTQZOwxQ6Bv0gi gnWbKmPNuxzUXfTTK1PG8z7R3tfTObXFslrwjLmnZR0o7EYz9wJKLGBFhSxa+KJZ chTRrWI7AALbBULgAgxP9nOLni1cRD+NhKfbipsph4jB97fgTqOi4Fglp5E7aC+8 tfLiVgi3g8c+IWRgO4T1PT0JWzy/V78j1C+sv343zjtvwZAk35Z7mfX6KSjFsTWG CFUSLT9FzgvJfTvlaneNdaE9mT1Ldb/2O2J1BF2FzL1EkQBVBkS83r3EtdN/tuZl nJk+E1IrJ63ilgkzmM38SeGvwj7K8lK/EuRT3/+qTD1/f6uGOE8DNqi6CF8gi1bP zDGfN1EbyR3ZQmfNey6nMBYDkS0bmAtNrvifeiVpwvNcRBHhCnpsOSZGPVEsJ2Wo AslY0FOkgF+CUrxUb9TpCKY+9eXgQhCk3EqR7f0rKgsCp8w4Vbp4R0jII7jzrDkQ x0mN2gbKz2PsJPxnQkEBFxfrVq/aMGyDsVL0Vz6K/MZWvUKheaLeatVudntE/Vso lC9G3UsAAMDChecOrAnge/kyySqosJcfvfCvgLLxZlHHv+QWpFDaaQE9JZdDuaru GkA33Xp0WFc0GhiEfnBR4iqoAqtdb8rp+vPQiA6sHu13NkThfsSiQn4CuQGNBE4J /TQBDACoLGAOK8w/Mv1B3SZN/mfUYXgjJnOS1lqCNdKRG8MVQQCBVEe9QPU8yavh /MpraEvPZhz6WSg7k1pHNMbKsDfv80ZX5WM95uMN69nmF/l+qo+eBJU8YIHWabkv MSWTBeD1roo8CwHOl102ajgo0XzhCqeb4MkUCZCZxdTaoHcD+IW+4IbajozgzTYV EQnyJdZwmB/EjRAncKDNCDoimHzjENQ9KOO/cPoGTFNfy9czoAmOY8gWt7b4wELD Mx/tP06V3n9Zjpxx+sBId9xDv+Yd+JSJHbNk8FxQtRtZVGNv7SP0rIWv3AP+d93k t/djtijzFTS5JxFViJtjwsDMdXQYnb+ReP4Jza5gLr/8gjbCRlLv/Bh1D9SyXFmf tEcZyhJIUU2b2ybdCkwg/BdouoQxHN94bESy686djt1wiXLZa6s4jiFuMA3qfF+K HDIbdjMBZzi0+XgJwwiqLlRkvLiG8/mGCijwFY+zzZ2lxKCOAEo8bUexOBz16Sw1 Fj55vgsAEQEAAYkCPAQYAQoAJgIbDBYhBCu70w+qspsyU7z7pvaUfato57kxBQJk fCiTBQkaVDZfAAoJEPaUfato57kxgtEQAMqDVz4YzHUHI6jvJTm+SQQP3TnNJLsi MQshA+651W7dTgmIWKKEgXiuvQ33WWRDc3GoTC/TVGLXA1BNBejTJmtStsyQ+RVp a4Y7KIPA3Va90IzPMqFUQztQgh689h+NIqgJovLmyZBmzIZ5f+LllfQ4ZCfeyBTz qWbX8cDxP1hyD7ifd6IXuPtr7sycmPCHnhisttM/6WxCOgS3fmJuFjBaO3qB8nOz vPRSsiYdBBpXd6v6GGJ3UhcBsYdAkVj9iQdkIkok3d9NnDlHklfjfE6Uj+MYEIzn UOcQNOf3d0tlEYE5B1lUijYIJ5b0sdGl2z2PzQlJvvKIQrVKsc0KYiK61kbh6Tu+ ldiiozyodUN3T6J82BSJp1blsRFnWK6kpaDz0geG275jViIuPnYIeVKSLFVvh0ji Y0MxBv5kyKBpz33Y40tIdrGRo7Q3t07jACzyJT3aurKCnMK4jV/dPA45FunoAIck 16HTK8ShDQuEXP4Pu80z0Wv5V5MDRnJ0g/XhXjpNxNlhKvPEytIhDAVShWP0Rccp J4ewy3QyapnS5FhldVHYQGowvpS8fS7MX8cqTDC83be0wcOKIGSjL6dQbVpXFT0/ DV57ejodQ1OIFfKMtqLPqndQdU3BGxHh+1mD7XIR2H70vwXW0/vKG4yy0kMLEZ67 gilA4+BAW5U+uQGNBE4J/a0BDADFSeNMstJh2Sx8LlLxTVoBVSPdm2G15kBsikDG pWN4LiscKQT4Rmzi0uBuA1z+kD+eA+4G2nCqM7xO0RJAPLQi2zcfehdrbdwDBsFb eCTe2lnbLqGodn0ff7YDlCyopKszgINOQQwXr4VSqG7cOGDGC38taaX5UBR7XJs0 DMb4Hg0Oer7kN3kfSnOwihfS9lgunFIp3dNN1iUEp1NAVOyJhS//4zGh5EYiTd7y QYQC21H6eiJTmnnvLm/nskiBeR4RFm8ozGAizcji+qwjR1AeeM7ifoIxtuVFH23A Y7KGzId4y4Bh+Ni8uQO1eTGcc2XITAj5oFdYdC61wJ3B2i1w24gAYNqAJ8bodnYA JatFRncuaYT6X5bNKHGT+u4KqedR55njEP7XxkXyfL06gI4ri1ef22d8X0kJIY3d d2LD81qGfAEU8Q/qboPdeaVEtG0FfMCTqQ1yyct1jkbKZMUK/EPompgUZb6JTQov bRGUPZFbhpq8nVAsu+jRRPVFzmkAEQEAAYkCPAQYAQoAJgIbIBYhBCu70w+qspsy U7z7pvaUfato57kxBQJkfCiTBQkaVDXmAAoJEPaUfato57kx2aoQAMmvNTQYIRZE GbUnHhfDlPKFHuQWUTZNgn8QzksUUF6JORdCoU3MqN/6Z2nHQ3LLiM07a9byk7zh +W3K3J//UzZ24p5FfC3YOKzIOBP08Ij0EvuCajCeR5o/P7zHu5WBhoEgr5tEnFQC oaeWdeL5GEBRrSmntUivhSUxWs0ntqk4cC0ncRgUb+28ZBGNa0ljqYoiatIHkTpR E9RgJiaUsnmE5THkZ3xcvIemNFRjzQ5CjP65zlRbfrCJXsYiXF1gcOIPFoKaxtBi w5HkgVd7cmHzClCkq/RTM+dDVo3V9b3zHB//1D8XwiQWvF7gMYymCCrnH+onKPi4 XCDrCfm6toP6fEQa/nPJ92JtQiPLDpu1AxfpwNfZV/FIApNGuZ/Egs3sK7aVI76B jvQs4chZUYfIY6axIJYceceXg1SFqiv15vjXLXi3RrtN7HaCDOCpSMQUG6gJ4dRh VsKHK+wkqCmiIAPQt8rYkabev5dg+B+LGjj6oCmUyrCaoXubnkuX7pFqOCMDUw2b ihb2H4k48HVxZdke3d4wPgq0oPCx3/04vFExq3PqOW9s0MTIC0XOY9GXJwJcFumQ suOSVzMPRvWnBQnJYTfBtWehaxHG5dqNdOsNTdFfPfeD/qtHQ56RyYoqjZ87IY7q E5GuuIiJTEypzeYfM0OkPPmPL4ku3B5J =MtRc -----END PGP PUBLIC KEY BLOCK----- ``` aide-0.19/depcomp0000755000175000017500000005621714774244724007435 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2024-06-19.01; # UTC # Copyright (C) 1999-2024 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . GNU Automake home page: . General help using GNU software: . EOF exit $? ;; -v | --v*) echo "depcomp (GNU Automake) $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interference from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsolete pre-3.x GCC compilers. ## but also to in-use compilers like IBM xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: aide-0.19/ylwrap0000755000175000017500000001545714774244724007325 #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2024-06-19.01; # UTC # Copyright (C) 1996-2024 Free Software Foundation, Inc. # # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . get_dirname () { case $1 in */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; # Otherwise, we want the empty string (not "."). esac } # guard FILE # ---------- # The CPP macro used to guard inclusion of FILE. guard () { printf '%s\n' "$1" \ | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ -e 's/__*/_/g' } # quote_for_sed [STRING] # ---------------------- # Return STRING (or stdin) quoted to be used as a sed pattern. quote_for_sed () { case $# in 0) cat;; 1) printf '%s\n' "$1";; esac \ | sed -e 's|[][\\.*]|\\&|g' } case "$1" in '') echo "$0: No files given. Try '$0 --help' for more information." 1>&2 exit 1 ;; -h|--h*) cat <<\EOF Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to . GNU Automake home page: . General help using GNU software: . EOF exit $? ;; -v|--v*) echo "ylwrap (GNU Automake) $scriptversion" exit $? ;; esac # The input. input=$1 shift # We'll later need for a correct munging of "#line" directives. input_sub_rx=`get_dirname "$input" | quote_for_sed` case $input in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. input=`pwd`/$input ;; esac input_rx=`get_dirname "$input" | quote_for_sed` # Since DOS filename conventions don't allow two dots, # the DOS version of Bison writes out y_tab.c instead of y.tab.c # and y_tab.h instead of y.tab.h. Test to see if this is the case. y_tab_nodot=false if test -f y_tab.c || test -f y_tab.h; then y_tab_nodot=true fi # The parser itself, the first file, is the destination of the .y.c # rule in the Makefile. parser=$1 # A sed program to s/FROM/TO/g for all the FROM/TO so that, for # instance, we rename #include "y.tab.h" into #include "parse.h" # during the conversion from y.tab.c to parse.c. sed_fix_filenames= # Also rename header guards, as Bison 2.7 for instance uses its header # guard in its implementation file. sed_fix_header_guards= while test $# -ne 0; do if test x"$1" = x"--"; then shift break fi from=$1 # Handle y_tab.c and y_tab.h output by DOS if $y_tab_nodot; then case $from in "y.tab.c") from=y_tab.c;; "y.tab.h") from=y_tab.h;; esac fi shift to=$1 shift sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" done # The program to run. prog=$1 shift # Make any relative path in $prog absolute. case $prog in [\\/]* | ?:[\\/]*) ;; *[\\/]*) prog=`pwd`/$prog ;; esac dirname=ylwrap$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 mkdir $dirname || exit 1 cd $dirname case $# in 0) "$prog" "$input" ;; *) "$prog" "$@" "$input" ;; esac ret=$? if test $ret -eq 0; then for from in * do to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend '../'. case $to in [\\/]* | ?:[\\/]*) target=$to;; *) target=../$to;; esac # Do not overwrite unchanged header files to avoid useless # recompilations. Always update the parser itself: it is the # destination of the .y.c rule in the Makefile. Divert the # output of all other files to a temporary file so we can # compare them to existing versions. if test $from != $parser; then realtarget=$target target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi # Munge "#line" or "#" directives. Don't let the resulting # debug information point at an absolute srcdir. Use the real # output file name, not yy.lex.c for instance. Adjust the # include guards too. sed -e "/^#/!b" \ -e "s|$input_rx|$input_sub_rx|" \ -e "$sed_fix_filenames" \ -e "$sed_fix_header_guards" \ "$from" >"$target" || ret=$? # Check whether files must be updated. if test "$from" != "$parser"; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then echo "$to is unchanged" rm -f "$target" else echo "updating $to" mv -f "$target" "$realtarget" fi fi else # A missing file is only an error for the parser. This is a # blatant hack to let us support using "yacc -d". If -d is not # specified, don't fail when the header file is "missing". if test "$from" = "$parser"; then ret=1 fi fi done fi # Remove the directory. cd .. rm -rf $dirname exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: aide-0.19/compile0000755000175000017500000001670514774244724007434 #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2024-06-19.01; # UTC # Copyright (C) 1999-2024 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.lo | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . GNU Automake home page: . General help using GNU software: . EOF exit $? ;; -v | --v*) echo "compile (GNU Automake) $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: aide-0.19/INSTALL0000644000175000017500000003777114774244724007115 Installation Instructions ************************* Basic Installation ================== The following shell commands: test -f configure || ./bootstrap ./configure make make install should configure, build, and install this package. The first line, which bootstraps, is intended for developers; when building from distribution tarballs it does nothing and can be skipped. The following more-detailed instructions are generic; see the ‘README’ file for instructions specific to this package. Some packages provide this ‘INSTALL’ file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in the GNU Coding Standards. Many packages have scripts meant for developers instead of ordinary builders, as they may use developer tools that are less commonly installed, or they may access the network, which has privacy implications. If the ‘bootstrap’ shell script exists, it attempts to build the ‘configure’ shell script and related files, possibly using developer tools or the network. Because the output of ‘bootstrap’ is system-independent, it is normally run by a package developer so that its output can be put into the distribution tarball and ordinary builders and users need not run ‘bootstrap’. Some packages have commands like ‘./autopull.sh’ and ‘./autogen.sh’ that you can run instead of ‘./bootstrap’, for more fine-grained control over bootstrapping. The ‘configure’ shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a ‘Makefile’ in each directory of the package. It may also create one or more ‘.h’ files containing system-dependent definitions. Finally, it creates a shell script ‘config.status’ that you can run in the future to recreate the current configuration, and a file ‘config.log’ containing output useful for debugging ‘configure’. It can also use an optional file (typically called ‘config.cache’ and enabled with ‘--cache-file=config.cache’ or simply ‘-C’) that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how ‘configure’ could check whether to do them, and mail diffs or instructions to the address given in the ‘README’ so they can be considered for the next release. If you are using the cache, and at some point ‘config.cache’ contains results you don’t want to keep, you may remove or edit it. The ‘autoconf’ program generates ‘configure’ from the file ‘configure.ac’. Normally you should edit ‘configure.ac’ instead of editing ‘configure’ directly. The simplest way to compile this package is: 1. ‘cd’ to the directory containing the package’s source code. 2. If this is a developer checkout and file ‘configure’ does not yet exist, type ‘./bootstrap’ to create it. You may need special developer tools and network access to bootstrap, and the network access may have privacy implications. 3. Type ‘./configure’ to configure the package for your system. This might take a while. While running, ‘configure’ prints messages telling which features it is checking for. 4. Type ‘make’ to compile the package. 5. Optionally, type ‘make check’ to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 6. Type ‘make install’ to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the ‘make install’ phase executed with root privileges. 7. Optionally, type ‘make installcheck’ to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior ‘make install’ required root privileges, verifies that the installation completed correctly. 8. You can remove the program binaries and object files from the source code directory by typing ‘make clean’. To also remove the files that ‘configure’ created (so you can compile the package for a different kind of computer), type ‘make distclean’. There is also a ‘make maintainer-clean’ target, but that is intended mainly for the package’s developers. If you use it, you may have to bootstrap again. 9. If the package follows the GNU Coding Standards, you can type ‘make uninstall’ to remove the installed files. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the ‘configure’ script does not know about. Run ‘./configure --help’ for details on some of the pertinent environment variables. You can give ‘configure’ initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=gcc CFLAGS=-g LIBS=-lposix See “Defining Variables” for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each system in their own directory. To do this, you can use GNU ‘make’. ‘cd’ to the directory where you want the object files and executables to go and run the ‘configure’ script. ‘configure’ automatically checks for the source code in the directory that ‘configure’ is in and in ‘..’. This is known as a “VPATH” build. With a non-GNU ‘make’, it is safer to compile the package for one system at a time in the source code directory. After you have installed the package for one system, use ‘make distclean’ before reconfiguring for another system. Some platforms, notably macOS, support “fat” or “universal” binaries, where a single binary can execute on different architectures. On these platforms you can configure and compile just once, with options specific to that platform. Installation Names ================== By default, ‘make install’ installs the package’s commands under ‘/usr/local/bin’, include files under ‘/usr/local/include’, etc. You can specify an installation prefix other than ‘/usr/local’ by giving ‘configure’ the option ‘--prefix=PREFIX’, where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option ‘--exec-prefix=PREFIX’ to ‘configure’, the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like ‘--bindir=DIR’ to specify different values for particular kinds of files. Run ‘configure --help’ for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of ‘${prefix}’, so that specifying just ‘--prefix’ will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to ‘configure’; however, many packages provide one or both of the following shortcuts of passing variable assignments to the ‘make install’ command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, ‘make install prefix=/alternate/directory’ will choose an alternate location for all directory configuration variables that were expressed in terms of ‘${prefix}’. Any directories that were specified during ‘configure’, but not in terms of ‘${prefix}’, must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the ‘DESTDIR’ variable. For example, ‘make install DESTDIR=/alternate/directory’ will prepend ‘/alternate/directory’ before all installation names. The approach of ‘DESTDIR’ overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of ‘${prefix}’ at ‘configure’ time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving ‘configure’ the option ‘--program-prefix=PREFIX’ or ‘--program-suffix=SUFFIX’. Some packages pay attention to ‘--enable-FEATURE’ and ‘--disable-FEATURE’ options to ‘configure’, where FEATURE indicates an optional part of the package. They may also pay attention to ‘--with-PACKAGE’ and ‘--without-PACKAGE’ options, where PACKAGE is something like ‘gnu-ld’. ‘./configure --help’ should mention the ‘--enable-...’ and ‘--with-...’ options that the package recognizes. Some packages offer the ability to configure how verbose the execution of ‘make’ will be. For these packages, running ‘./configure --enable-silent-rules’ sets the default to minimal output, which can be overridden with ‘make V=1’; while running ‘./configure --disable-silent-rules’ sets the default to verbose, which can be overridden with ‘make V=0’. Specifying a System Type ======================== By default ‘configure’ builds for the current system. To create binaries that can run on a different system type, specify a ‘--host=TYPE’ option along with compiler variables that specify how to generate object code for TYPE. For example, to create binaries intended to run on a 64-bit ARM processor: ./configure --host=aarch64-linux-gnu \ CC=aarch64-linux-gnu-gcc \ CXX=aarch64-linux-gnu-g++ If done on a machine that can execute these binaries (e.g., via ‘qemu-aarch64’, ‘$QEMU_LD_PREFIX’, and Linux’s ‘binfmt_misc’ capability), the build behaves like a native build. Otherwise it is a cross-build: ‘configure’ will make cross-compilation guesses instead of running test programs, and ‘make check’ will not work. A system type can either be a short name like ‘mingw64’, or a canonical name like ‘x86_64-pc-linux-gnu’. Canonical names have the form CPU-COMPANY-SYSTEM where SYSTEM is either OS or KERNEL-OS. To canonicalize and validate a system type, you can run the command ‘config.sub’, which is often squirreled away in a subdirectory like ‘build-aux’. For example: $ build-aux/config.sub arm64-linux aarch64-unknown-linux-gnu $ build-aux/config.sub riscv-lnx Invalid configuration 'riscv-lnx': OS 'lnx' not recognized You can look at the ‘config.sub’ file to see which types are recognized. If the file is absent, this package does not need the system type. If ‘configure’ fails with the diagnostic “cannot guess build type”. ‘config.sub’ did not recognize your system’s type. In this case, first fetch the newest versions of these files from the GNU config package (https://savannah.gnu.org/projects/config). If that fixes things, please report it to the maintainers of the package containing ‘configure’. Otherwise, you can try the configure option ‘--build=TYPE’ where TYPE comes close to your system type; also, please report the problem to . For more details about configuring system types, see the Autoconf documentation. Sharing Defaults ================ If you want to set default values for ‘configure’ scripts to share, you can create a site shell script called ‘config.site’ that gives default values for variables like ‘CC’, ‘cache_file’, and ‘prefix’. ‘configure’ looks for ‘PREFIX/share/config.site’ if it exists, then ‘PREFIX/etc/config.site’ if it exists. Or, you can set the ‘CONFIG_SITE’ environment variable to the location of the site script. A warning: not all ‘configure’ scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to ‘configure’. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the ‘configure’ command line, using ‘VAR=value’. For example: ./configure CC=/usr/local2/bin/gcc causes the specified ‘gcc’ to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for ‘CONFIG_SHELL’ due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash ‘configure’ Invocation ====================== ‘configure’ recognizes the following options to control how it operates. ‘--help’ ‘-h’ Print a summary of all of the options to ‘configure’, and exit. ‘--help=short’ ‘--help=recursive’ Print a summary of the options unique to this package’s ‘configure’, and exit. The ‘short’ variant lists options used only in the top level, while the ‘recursive’ variant lists options also present in any nested packages. ‘--version’ ‘-V’ Print the version of Autoconf used to generate the ‘configure’ script, and exit. ‘--cache-file=FILE’ Enable the cache: use and save the results of the tests in FILE, traditionally ‘config.cache’. FILE defaults to ‘/dev/null’ to disable caching. ‘--config-cache’ ‘-C’ Alias for ‘--cache-file=config.cache’. ‘--srcdir=DIR’ Look for the package’s source code in directory DIR. Usually ‘configure’ can determine that directory automatically. ‘--prefix=DIR’ Use DIR as the installation prefix. See “Installation Names” for more details, including other options available for fine-tuning the installation locations. ‘--host=TYPE’ Build binaries for system TYPE. See “Specifying a System Type”. ‘--enable-FEATURE’ ‘--disable-FEATURE’ Enable or disable the optional FEATURE. See “Optional Features”. ‘--with-PACKAGE’ ‘--without-PACKAGE’ Use or omit PACKAGE when building. See “Optional Features”. ‘--quiet’ ‘--silent’ ‘-q’ Do not print messages saying which checks are being made. To suppress all normal output, redirect it to ‘/dev/null’ (any error messages will still be shown). ‘--no-create’ ‘-n’ Run the configure checks, but stop before creating any output files. ‘configure’ also recognizes several environment variables, and accepts some other, less widely useful, options. Run ‘configure --help’ for more details. Copyright notice ================ Copyright © 1994–1996, 1999–2002, 2004–2017, 2020–2024 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. aide-0.19/NEWS0000644000175000017500000003550714774244714006555 Version 0.19 (2025-04-05) * BACKWARDS INCOMPATIBLE CHANGES - switch from libmhash to libnettle - semantic change of unrestricted negative rules (!): The children and sub-directories of matching directories are no longer ignored by default but recursed into and only ignored if they also match the regular expression. This makes the behaviour consistent with restricted (recursive) negative rules. Use the new non-recursive negative rules (-) to always ignore children and sub-directories of matched directories. - 'database' config option is no longer supported, use 'database_in' instead - 'summarize_changes' config option is no longer supported, use 'report_summarize_changes' instead - 'grouped' config option is no longer supported, use 'report_grouped' instead - an incomplete written input database is now handled as an error - SIGHUP and SIGTERM are no longer ignored - SIGINT, SIGTERM or SIGHUP are now handled by removing an incompletely written database (if file was created by aide) and exiting aide (code 25) - move COMPARE log level before RULE log level - switch hashsum in default R group from md5 to sha3_256 - remove unsupported hashsums (haval, crc32, crc32b, tiger, whirlpool) - H default group now contains all compiled in hashsums that are not deprecated - rules are no longer applied to the database entries but only to the file system entries, meaning aide displays files/directories that are no longer matched by any rule as removed entries in the report - require pthread (remove --without-pthread configure option) - remove contrib/ scripts * Deprecations (to be removed in the release after next): - md5 hashsum - sha1 hashsum - rmd160 hashsum - gost hashsum * Add support for file system type restricted rules (Linux only) - add 'fstype' attribute - add '--without-fstype' configure option * Add 'version_ge' boolean operator * Add limited support for hashsum transitions (see aide.conf(5) for details) * Add 'sha512_256', sha3_256, and 'sha3_512' hashsums * Add AIDE_VERSION macro variable * Add progress bar (add '--no-progress' parameter) * Add log level 'limit' * Add colors to log output (add '--no-color' parameter) * Add '--list' command (to list database in human readable format) * Add new error codes - 24: database error - 25: received SIGINT, SIGTERM or SIGHUP signal * Performance improvements * Improve error handling * Improve logging * Update documentation * Bug fixes * Code clean up * Add more unit tests Version 0.18 (2023-02-06) * BACKWARDS INCOMPATIBLE CHANGES - remove Prelink support (--with-prelink configure option) * Switch from PCRE to PCRE2 * Enable dynamic linking by default * Support multithreading for hashsum calculation - add num_workers config option (default to single worker thread) - add new '--workers' parameter - add new log level 'thread' - add new exit code 23 for thread errors - add --without-pthread configure option - require Autoconf Macro Archive (autoconf-archive) * Remove mmap support for hashsum calculation * Deprecations (to be removed in the release after next): - 'S' attribute is now deprecated, use 'growing+s' attributes instead - '@@ifdef', macro is now deprecated, use '@@if defined' instead - '@@ifndef', macro is now deprecated, use '@@if not defined' instead - '@@ifhost', macro is now deprecated, use '@@if hostname' instead - '@@ifnhost', macro is now deprecated, use '@@if not hostname' instead * Add new 'growing' attribute * Add new 'compressed' attribute * Add new log level 'compare' * Replace 'S' attribute in '>' compound group with 'growing+s' * Add 'report_format' option (available formats: `plain`, `json`) * Add @@if macro * Add 'exists' boolean function * Add 'config_check_warn_unrestricted_rules' option * Support restricted rules with empty restriction * Add prefix option to directory include macros * Add exit code 22 for memory allocation errors * Update e2fs attributes to match upstream - the 'h' attribute has been removed - use `report_ignore_e2fsattrs=VNIE` to ignore read only attributes * Support CRLF line-endings in config files * Use pkg-config to get link flags * Add SECURITY.md * Improve logging * Improve error messages during config parsing * Update documentation * Minor bug fixes * Code clean up Version 0.17.4 (2022-01-19) * SECURITY FIX - Precalculate buffer size in base64 functions (CVE-2021-45417) Version 0.17.3 (2021-02-10) * Fix group usage in '--after' config line Version 0.17.2 (2021-02-06) * Fix null pointer dereference in db_close() * Fix out-of-bounds read of attributes array Version 0.17.1 (2021-01-30) * Require file type for --path-check * Fix issue where 'different attributes' message is not shown * Remove leftover include of 'error.h' (fixes build on macOS) * Fix typos Version 0.17 (2021-01-23) * BACKWARDS INCOMPATIBLE CHANGES - '--verbose' command line option and 'verbose' config option are no longer supported, use 'log_level' and 'report_level' options instead - '--report' command line option is no longer supported, use 'report_url' config option instead - 'ignore_list' config option is no longer supported, use 'report_ignore_changed_attrs' instead - 'report_attributes' config option is no longer supported, use 'report_force_attrs' instead - (restricted) regular rules must start with literal '/', i.e. the rule cannot begin with a macro variable - config lines must end with new line - '@' and ' ' in the configuration are now escaped with '\', that means to match a '\' you have to use four backslashes '\\\\' in your rules - 'gzip_dbout=false' fails now with config error when no zlib support is compiled in - remove '--with-initial-errors' configure option - remove PostgreSQL database backend support - remove Sun ACL support - remove config and database signing support * Enhancements: - add new '--log-level' command line option and 'log_level' config option - introduce named log levels - add new 'report' log level to help to debug rule matching - add new 'config' log level to help to debug config and rule parsing - aad new '--dry-init' command - add new '--path-check' command - add directory support for @@include - add new @@x_include config macro - add new @@x_include_setenv config macro - add new default compound group 'H' (all compiled-in hashsums) - add support for per-report_url options - add new 'report_level' config option - add new 'report_append' config option - add exit code 21 for file lock errors - add default config values, available hashsums and compound groups to '--version' output - add Linux capabilities support - show changed attributes in 'different attributes' message - enable 'gost' and 'whirlpool' checksums when using gcrypt - add 'stribog256' and 'stribog512' gcrypt algorithms - add config file names to log output * Miscellaneous behaviour changes: - 'report_summarize_changes': hashsum changes are now indicated with 'H' - print '--help' and '--verion' output to stdout - log messages and errors are always written to stderr - initialise report URLs after configuration parsing - allow empty values for macro variables - SIGUSR1 now toggles debug log level - fail on errors in regular expressions during config parsing - fail on invalid URLs during config check - Fail on double slash in rule path - cache log lines when 'log_level' is not yet set * Deprecations: - 'database' config option is now deprecated, use 'database_in' instead - 'summarize_changes' config option is now deprecated, use 'report_summarize_changes' instead - 'grouped' config option is now deprecated, use 'report_grouped' instead - non-alphanumeric group names are deprecated * Notable bug fixes: - fix line numbers in log messages - remove warning when input database is '/dev/null' - correctly handle UTF-8 in path names and rules - fix compilation with curl and gcrypt - warn on unsupported hash algorithms - improve large-file support * Build system changes: - require C99 compatible compiler - require pkg-config - '--disable-default-db configure option disables default database values - '--without-config' configure option now disables default config file * Remove obsolete aide-attributes.sh script * Remove outdated example aide.conf and manual.html * Fix compiler warnings * Update documentation * Minor bug fixes * Code clean up Version 0.16.2 (2019-05-19) * Bug fixes - Fix handling of directory-restricted negative rules - Don't lock '/dev/null' when used as output database - Fix parsing of rules containing '?' quantifier - Fix extended attributes support (xattrs) - Fix processing of go files * Please note: - The addition of the "trusted.*", "user.*" and the "security.*" namespaces to the xattrs attribute might lead to a vast amount of reported changed entries during your next AIDE run. You can use the `report_ignore_changed_attrs` option (see aide.conf(5)) to ignore changes of the xattrs attribute; but be aware that this will exclude the expected but also the unexpected (potentially malicious) changes. Version 0.16.1 (2019-02-25) * Move to GitHub * Update documentation * Bug fixes Version 0.16 (2016-07-25) * BACKWARDS INCOMPATIBLE CHANGES: - Negative selection lines of the form '! ' are no longer supported (use '!' instead) - The switch to Perl 5 Compatible Regular Expressions and the fix of '.*'-rule matching may result in different rule matching behaviour * Support restricted selection lines * Switch to PCRE library (drops bundled GNU regexp library) * New config options: - database_add_metadata - database_attrs - report_base16 - report_detailed_init - report_force_attrs (deprecates report_attributes) - report_ignore_added_attrs - report_ignore_removed_attrs - report_ignore_changed_attrs (deprecates ignore_list) - report_ignore_e2fsattrs - report_quiet - root_prefix * New '--limit' parameter * Report changes: - enable summarize_changes by default - use '|' to separate the old value from the new one - wrap attribute values instead of cut them off - side-by-side output of acl and xattrs values - adjust file type letters in summarize_changes output - add numeric timezone to time string - add info about verbose level to report if it differs from standard value - add info about number of entries if aide found no changes or the database has been initialized - add run time to report - print "End timestamp" message in report - print human-readable info about ignored and forced attributes in report - print checksums of databases in verbose level 2 or higher - print added and removed attribute values of changed entries in verbose level 6 or higher - print details about added and removed entries in verbose level 7 or higher - print added or removed attributes of changed entries if forced via report_force_attrs * New default group: X * Fix '.*'-rule matching * Handle tilde (~) in database paths and report urls * Sort entries of database file * Compare database entries just once * Add warning if a group is redefined * Update documentation * Bug fixes * Code clean up Version 0.15.1 * Fixed bug with DB_CHECKINODE Version 0.15 * Added new grouped option * Sort files in report by filename * Added support for e2fsattrs attribute * Added support for ftype attribute * Bug fixes Version 0.14.2 * Report correct file type in "Detailed information about changes" section * Bug fixes Version 0.14.1 * Added aide-attributes.sh contrib script * Bug fixes Version 0.14 * Renewed autoconf mechanism * Resolved licensing conflicts * New feature to summarize changes * Added prelink support * Many bugfixes Version 0.13.1 * Fixed bug with reading gzipped aide.db files * Removed dead ustat code Version 0.13 * Added support for selinux and xattr attributes (kindly contributed by Red Hat) * Added support for the Linux Audit System (kindly contributed by Red Hat) * Fixed usage of libgcrypt instead of libmhash * Added file locking for output files * Fixed bugs Version 0.12 * Fixed bugs * Allow http/https/ftp URLs through libcurl * Support posix_fadvice() to avoid caching files Version 0.11 * Fixed many bugs * Updated automake/autoconf scripts * Use snprintf by Mark Martinec if not in C library * Support for more (legacy) Unix systems and cygwin * Open files with O_NOATIME on supported Linux systems * Added I/ANF/ARF directives Version 0.10 * Fixed bugs * Moved project over to sourceforge.net * Change of project ownership Version 0.9 * Fixed bugs * Added support for keyed md check of db and config * Removed dependancy on libgcrypt * Added dependancy on mhash Version 0.8 * Fixed loads and loads of bugs * Added syslog backend * Report format changed * added lots of parameters see man page and configure --help * added ACL support for SunOS 5.x (and compatibles) * libgcrypt is now separate and required Version 0.7 * Bug fixes * Compressed database support * Linkname checking * Mhash support (version 0.8.1 of mhash required) Version 0.6 * Bug fixes * Mhash support fixed * MD sums fixed for now Version 0.5 * Bug fixes * ignore_list support * Mhash library support (version 0.6.1 of mhash required) * Disclaimer notices Version 0.4 * Bug fixes Version 0.3 * Added --update command * some bugfixes Version 0.2 * Bugfix release Version 0.1 * Implemented lots of stuff Version 0.0.0.1 * Nothing yet aide-0.19/tests/0000755000175000017500000000000014774244735007271 5aide-0.19/tests/check_attributes.c0000644000175000017500000001006514613411450012660 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2019-2020 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include "attributes.h" typedef struct { DB_ATTR_TYPE a; DB_ATTR_TYPE b; const char *expected_string; } diff_attributes_t; static diff_attributes_t diff_attributes_tests[] = { { 0, 0, "" }, /* { 0, ATTR(attr_filename), "filename" }, */ { 0, ATTR(attr_linkname), "l" }, { 0, ATTR(attr_perm), "p" }, { 0, ATTR(attr_uid), "u" }, { 0, ATTR(attr_gid), "g" }, { 0, ATTR(attr_size), "s" }, { 0, ATTR(attr_atime), "a" }, { 0, ATTR(attr_ctime), "c" }, { 0, ATTR(attr_mtime), "m" }, { 0, ATTR(attr_inode), "i" }, { 0, ATTR(attr_bcount), "b" }, { 0, ATTR(attr_linkcount), "n" }, { 0, ATTR(attr_md5), "md5" }, { 0, ATTR(attr_sha1), "sha1" }, { 0, ATTR(attr_rmd160), "rmd160" }, { 0, ATTR(attr_tiger), "tiger" }, { 0, ATTR(attr_crc32), "crc32" }, { 0, ATTR(attr_haval), "haval" }, { 0, ATTR(attr_gostr3411_94), "gost" }, { 0, ATTR(attr_crc32b), "crc32b" }, /* { 0, ATTR(attr_attr), "attr" }, */ { 0, ATTR(attr_acl), "acl" }, /* { 0, ATTR(attr_bsize), "bsize" }, */ /* { 0, ATTR(attr_rdev), "rdev" }, */ /* { 0, ATTR(attr_dev), "dev" }, */ /* { 0, ATTR(attr_allhashsums), "H" }, */ { 0, ATTR(attr_sizeg), "S" }, { 0, ATTR(attr_checkinode), "I" }, { 0, ATTR(attr_allownewfile) , "ANF" }, { 0, ATTR(attr_allowrmfile), "ARF" }, { 0, ATTR(attr_sha256), "sha256" }, { 0, ATTR(attr_sha512), "sha512" }, { 0, ATTR(attr_selinux), "selinux" }, { 0, ATTR(attr_xattrs), "xattrs" }, { 0, ATTR(attr_whirlpool), "whirlpool" }, { 0, ATTR(attr_ftype), "ftype" }, { 0, ATTR(attr_e2fsattrs), "e2fsattrs" }, { 0, ATTR(attr_capabilities), "caps" }, { 0, ATTR(attr_linkname)|ATTR(attr_perm), "l+p" }, { 0, ATTR(attr_ctime)|ATTR(attr_ftype), "c+ftype" }, { 0, ATTR(attr_linkname)|ATTR(attr_perm)|ATTR(attr_uid)|ATTR(attr_gid)|ATTR(attr_size)|ATTR(attr_bcount)|ATTR(attr_linkcount)|ATTR(attr_sha256)|ATTR(attr_tiger)|ATTR(attr_haval)|ATTR(attr_sha512)|ATTR(attr_ftype), "l+p+u+g+s+b+n+tiger+haval+sha256+sha512+ftype" }, { ATTR(attr_linkname), 0 , "-l" }, { ATTR(attr_linkname), ATTR(attr_linkname) , "" }, { ATTR(attr_linkname), ATTR(attr_linkname)|ATTR(attr_perm) , "+p" }, { ATTR(attr_linkname)|ATTR(attr_perm), ATTR(attr_linkname) , "-p" }, { ATTR(attr_perm)|ATTR(attr_mtime), ATTR(attr_perm)|ATTR(attr_uid)|ATTR(attr_gid)|ATTR(attr_size)|ATTR(attr_bcount)|ATTR(attr_linkcount), "+u+g+s-m+b+n" }, }; static int num_diff_attributes_tests = sizeof diff_attributes_tests / sizeof(diff_attributes_t); START_TEST (test_diff_attributes) { char *str = diff_attributes(diff_attributes_tests[_i].a, diff_attributes_tests[_i].b); ck_assert_msg(strcmp(diff_attributes_tests[_i].expected_string, str) == 0, "diff_attributes: %llu %llu: string returned '%s' != '%s'", diff_attributes_tests[_i].a, diff_attributes_tests[_i].b, str, diff_attributes_tests[_i].expected_string); free(str); } END_TEST Suite *make_attributes_suite(void) { Suite *s = suite_create ("attributes"); TCase *tc_diff_attributes = tcase_create ("diff_attributes"); tcase_add_loop_test (tc_diff_attributes, test_diff_attributes, 0, num_diff_attributes_tests); suite_add_tcase (s, tc_diff_attributes); return s; } aide-0.19/tests/check_aide.h0000644000175000017500000000177014644417440011415 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2019,2024 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include Suite *make_attributes_suite(void); Suite *make_base64_suite(void); Suite *make_progress_suite(void); Suite *make_seltree_suite(void); Suite *make_hashsum_suite(void); aide-0.19/tests/check_base64.c0000644000175000017500000000510214613411450011552 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2024 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include #include "base64.h" typedef struct { char* orig; char* base64; } base64_t; static base64_t base64_tests[] = { { "A", "QQ==" }, { "AA", "QUE=" }, { "AAA", "QUFB" }, { "AAAA", "QUFBQQ==" }, { "AAAAA", "QUFBQUE=" }, { "AAAAAA", "QUFBQUFB" }, { "AAAAAAA", "QUFBQUFBQQ==" }, { "AAAAAAA", "QUFBQUFBQQ==" }, }; static int num_base64_tests = sizeof base64_tests / sizeof(base64_t); START_TEST (test_base64) { size_t orig_length = strlen(base64_tests[_i].orig); char *base64 = encode_base64((byte *) base64_tests[_i].orig, orig_length); ck_assert_msg(strcmp(base64_tests[_i].base64, base64) == 0, "\n" "encode_base64('%s', %zu ):\n" "string returned '%s'\n" " expected '%s'", base64_tests[_i].orig, orig_length, base64, base64_tests[_i].base64); size_t orig_length_pointer; size_t base64_length = strlen(base64); byte *orig = decode_base64(base64, base64_length, &orig_length_pointer); ck_assert_msg(strcmp(base64_tests[_i].orig, (char *) orig) == 0, "\n" "padded decode_base64('%s', %zu ):\n" "string returned '%s'\n" " expected '%s'", base64, base64_length, orig, base64_tests[_i].orig); ck_assert_msg(orig_length_pointer == orig_length, "padded decode_base64(' %s', %zu) returned length %zu (expected: %zu)", base64, base64_length, orig_length_pointer, orig_length); free(orig); free(base64); } END_TEST Suite *make_base64_suite(void) { Suite *s = suite_create ("base64"); TCase *tc_base64 = tcase_create ("base64"); tcase_add_loop_test (tc_base64, test_base64, 0, num_base64_tests); suite_add_tcase (s, tc_base64); return s; } aide-0.19/tests/check_aide.c0000644000175000017500000000271314644417440011406 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2019,2024 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include "check_aide.h" #include "hashsum.h" #include "log.h" int main (void) { int number_failed; SRunner *sr; init_hashsum_lib(); sr = srunner_create (make_attributes_suite()); srunner_add_suite(sr, make_base64_suite()); srunner_add_suite(sr, make_progress_suite()); srunner_add_suite(sr, make_seltree_suite()); srunner_add_suite(sr, make_hashsum_suite()); set_log_level(LOG_LEVEL_DEBUG); set_colored_log(false); srunner_run_all (sr, CK_NORMAL); number_failed = srunner_ntests_failed (sr); srunner_free (sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } aide-0.19/tests/check_progress.c0000644000175000017500000002561214613411450012342 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2024 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include "util.h" typedef struct { char * path; long unsigned entries; long unsigned skipped; int length; const char *expected_string; } progress_test_t; static progress_test_t progress_tests[] = { { NULL, 0, 0, 50, "[00:01] scan file system> 0 files" }, { NULL, 0, 0, 40, "[00:01] scan file system> 0 files" }, { NULL, 0, 0, 33, "[00:01] scan file system> 0 files" }, { NULL, 0, 0, 30, "[00:01] scan file system> 0 fi" }, { NULL, 0, 0, 20, "[00:01] scan file sy" }, { NULL, 0, 0, 10, "[00:01] sc" }, { NULL, 0, 0, 5, "[00:0" }, { NULL, 0, 0, 1, "[" }, { NULL, 0, 1230, 60, "[00:01] scan file system> 0 files (1230 skipped)" }, { NULL, 0, 1230, 50, "[00:01] scan file system> 0 files (1230 skipped)" }, { NULL, 0, 1230, 48, "[00:01] scan file system> 0 files (1230 skipped)" }, { NULL, 0, 1230, 40, "[00:01] scan file system> 0 files (1230 " }, { NULL, 0, 1230, 30, "[00:01] scan file system> 0 fi" }, { NULL, 0, 1230, 20, "[00:01] scan file sy" }, { NULL, 0, 1230, 10, "[00:01] sc" }, { NULL, 0, 1230, 5, "[00:0" }, { NULL, 0, 1230, 1, "[" }, { "/etc/fstab", 1, 0, 60, "[00:01] scan file system> 1 file, last /etc/fstab" }, { "/etc/fstab", 1, 0, 50, "[00:01] scan file system> 1 file, last /etc/fstab" }, { "/etc/fstab", 1, 0, 49, "[00:01] scan file system> 1 file, last /etc/fstab" }, { "/etc/fstab", 1, 0, 43, "[00:01] scan file system> 1 file, last /etc" }, { "/etc/fstab", 1, 0, 40, "[00:01] scan file system> 1 file, last /" }, { "/etc/fstab", 1, 0, 30, "[00:01] scan file system> 1 fi" }, { "/etc/fstab", 1, 0, 20, "[00:01] scan file sy" }, { "/etc/fstab", 1, 0, 10, "[00:01] sc" }, { "/etc/fstab", 1, 0, 5, "[00:0" }, { "/etc/fstab", 1, 0, 1, "[" }, { "/", 3100, 12310, 70, "[00:01] scan file system> 3100 files (12310 skipped), last /" }, { "/", 3100, 12310, 60, "[00:01] scan file system> 3100 files (12310 skipped), last /" }, { "/", 3100, 12310, 50, "[00:01] scan file system> 3100 files (12310 skippe" }, { "/", 3100, 12310, 40, "[00:01] scan file system> 3100 files (12" }, { "/", 3100, 12310, 30, "[00:01] scan file system> 3100" }, { "/", 3100, 12310, 20, "[00:01] scan file sy" }, { "/", 3100, 12310, 10, "[00:01] sc" }, { "/", 3100, 12310, 5, "[00:0" }, { "/", 3100, 12310, 1, "[" }, { "/system", 3100, 12310, 80, "[00:01] scan file system> 3100 files (12310 skipped), last /system" }, { "/system", 3100, 12310, 70, "[00:01] scan file system> 3100 files (12310 skipped), last /system" }, { "/system", 3100, 12310, 66, "[00:01] scan file system> 3100 files (12310 skipped), last /system" }, { "/system", 3100, 12310, 63, "[00:01] scan file system> 3100 files (12310 skipped), last /sys" }, { "/system", 3100, 12310, 60, "[00:01] scan file system> 3100 files (12310 skipped), last /" }, { "/system", 3100, 12310, 50, "[00:01] scan file system> 3100 files (12310 skippe" }, { "/system", 3100, 12310, 40, "[00:01] scan file system> 3100 files (12" }, { "/system", 3100, 12310, 30, "[00:01] scan file system> 3100" }, { "/system", 3100, 12310, 20, "[00:01] scan file sy" }, { "/system", 3100, 12310, 10, "[00:01] sc" }, { "/system", 3100, 12310, 5, "[00:0" }, { "/system", 3100, 12310, 1, "[" }, { "/etc/fstab", 100, 10, 80, "[00:01] scan file system> 100 files (10 skipped), last /etc/fstab" }, { "/etc/fstab", 100, 10, 70, "[00:01] scan file system> 100 files (10 skipped), last /etc/fstab" }, { "/etc/fstab", 100, 10, 65, "[00:01] scan file system> 100 files (10 skipped), last /etc/fstab" }, { "/etc/fstab", 100, 10, 60, "[00:01] scan file system> 100 files (10 skipped), last /etc/" }, { "/etc/fstab", 100, 10, 50, "[00:01] scan file system> 100 files (10 skipped), " }, { "/etc/fstab", 100, 10, 40, "[00:01] scan file system> 100 files (10 " }, { "/etc/fstab", 100, 10, 30, "[00:01] scan file system> 100 " }, { "/etc/fstab", 100, 10, 20, "[00:01] scan file sy" }, { "/etc/fstab", 100, 10, 10, "[00:01] sc" }, { "/etc/fstab", 100, 10, 5, "[00:0" }, { "/etc/fstab", 100, 10, 1, "[" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 130, "[00:01] scan file system> 6393 files (230 skipped), last /usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 129, "[00:01] scan file system> 6393 files (230 skipped), last /usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 120, "[00:01] scan file system> 6393 files (230 skipped), last /usr/.../device-mapper/libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 110, "[00:01] scan file system> 6393 files (230 skipped), last /usr/.../libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 100, "[00:01] scan file system> 6393 files (230 skipped), last /usr/.../libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 90, "[00:01] scan file system> 6393 files (230 skipped), last /usr/.../libdevmapper-event-lvm2m" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 80, "[00:01] scan file system> 6393 files (230 skipped), last /usr/.../libdevmapper-e" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 70, "[00:01] scan file system> 6393 files (230 skipped), last /usr/.../libd" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 60, "[00:01] scan file system> 6393 files (230 skipped), last /us" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 50, "[00:01] scan file system> 6393 files (230 skipped)" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 40, "[00:01] scan file system> 6393 files (23" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 30, "[00:01] scan file system> 6393" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 20, "[00:01] scan file sy" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 10, "[00:01] sc" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 5, "[00:0" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 6393, 230, 1, "[" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 120, "[00:01] scan file system> 1 file, last /usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 111, "[00:01] scan file system> 1 file, last /usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 110, "[00:01] scan file system> 1 file, last /usr/.../device-mapper/libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 100, "[00:01] scan file system> 1 file, last /usr/.../device-mapper/libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 90, "[00:01] scan file system> 1 file, last /usr/.../libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 80, "[00:01] scan file system> 1 file, last /usr/.../libdevmapper-event-lvm2mirror.so" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 70, "[00:01] scan file system> 1 file, last /usr/.../libdevmapper-event-lvm" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 60, "[00:01] scan file system> 1 file, last /usr/.../libdevmapper" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 50, "[00:01] scan file system> 1 file, last /usr/.../li" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 40, "[00:01] scan file system> 1 file, last /" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 30, "[00:01] scan file system> 1 fi" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 20, "[00:01] scan file sy" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 10, "[00:01] sc" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 5, "[00:0" }, { "/usr/lib/x86_64-linux-gnu/device-mapper/libdevmapper-event-lvm2mirror.so", 1, 0, 1, "[" }, }; static int num_diff_progress_tests = sizeof progress_tests / sizeof(progress_test_t); START_TEST (get_progress_bar_string_test) { char *str = get_progress_bar_string("scan file system", progress_tests[_i].path, progress_tests[_i].entries, progress_tests[_i].skipped, 1, progress_tests[_i].length); ck_assert_msg(strcmp(progress_tests[_i].expected_string, str) == 0, "\n" "get_progress_bar_string(path: '%s', entries: %lu, skipped: %lu, length: %d):\n" " string returned '%s'\n" " expected '%s'", progress_tests[_i].path, progress_tests[_i].entries, progress_tests[_i].skipped, progress_tests[_i].length, str, progress_tests[_i].expected_string); free(str); } END_TEST Suite *make_progress_suite(void) { Suite *s = suite_create ("progress"); TCase *tc_get_progress_bar_string = tcase_create ("get_progress_bar_string"); tcase_add_loop_test (tc_get_progress_bar_string, get_progress_bar_string_test, 0, num_diff_progress_tests); suite_add_tcase (s, tc_get_progress_bar_string); return s; } aide-0.19/tests/check_hashsum.c0000644000175000017500000002004114770012376012145 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2024,2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include "attributes.h" #include "hashsum.h" #include "md.h" #include "util.h" typedef struct { size_t size; char expected[num_hashes][128 + 1]; } hashsum_test_t; static char *message = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"; static hashsum_test_t hashsum_tests[] = { { .size = 0, .expected = { "d41d8cd98f00b204e9800998ecf8427e", /* md5 */ "da39a3ee5e6b4b0d3255bfef95601890afd80709", /* sha1 */ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", /* sha256 */ "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", /* sha512 */ "9c1185a5c5e9fc54612808977ee8f548b2258d31", /* rmd160 */ "24f0130c63ac933216166e76b1bb925ff373de2d49584e7a", /* tiger */ "00000000", /* crc32 */ "00000000", /* crc32b */ "4f6938531f0bc8991f62da7bbd6f7de3fad44562b8c6f4ebf146d5b4e46f7c17", /* haval */ "19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83be698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3", /* whirlpool */ "ce85b99cc46752fffee35cab9a7b0278abb4c2d2055cff685af4912c49490f8d", /* gost */ "3f539a213e97c802cc229d474c6aa32a825a360b2a933a949fd925208d9ce1bb", /* stribog256 */ "8e945da209aa869f0455928529bcae4679e9873ab707b55315f56ceb98bef0a7362f715528356ee83cda5f2aac4c6ad2ba3a715c1bcd81cb8e9f90bf4c1c1a8a", /* stribog512 */ "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a", /* sha512_256 */ "a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a", /* sha3-256 */ "a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26", /* sha3-512 */ } }, { .size = 12, .expected = { "2b0dc568e588e46a5a7cd56dcec348af", /* md5 */ "2aa36a1111059c0bbd7ad0c6bba108f50df8e867", /* sha1 */ "922429ccdb7045d11143e2e3982a11afc11b537bf259d88d2425fa8806e86e78", /* sha256 */ "5d8b766d3b37ce8aa68dd354a50af9c94201286d7993d42e20bb7a93c0cc9897fd2714a2860ec8c4d79912376c8234dfb52e841eff0eb960370a84ea5735e8b3", /* sha512 */ "14d3deb9667ab31c0f76a57ef5055f29f4bc432e", /* rmd160 */ "0c26dd2215a6d6168ece5bce5a8d02afcfcd57c4759da8e5", /* tiger */ "634a5234", /* crc32 */ "34524a63", /* crc32b */ "3e3ae002124d7fabd23b04e596bbaab7760ad02b9d46ae761a724c3a0751e143", /* haval */ "8535c1b311244a56aba746411d74b1a2bafe1238983def9da7aaa61e3e80d365ab00d7be6753341b45ade19d858d2b9f8a0cf27a5a7b2ff77952b8a780d8d587", /* whirlpool */ "5ecd800c05dea7b6badd7aba7e329c7aca5b42e38784b6a0efb83bd65a7c50ec", /* gost */ "c367afdb2a05726b46f82e1cd32d6a8cb06c7a03b5cebfc94df0d1a4153e90af", /* stribog256 */ "f4d24b77221fe6734eaefe2c85899ba7dc66f88be0fbde61f4a9e34198f606501ac67ad246d0f44e4722b42c5837d0c0af5e0a32d3f891ee8dd90e6dceef7f9b", /* stribog512 */ "e39ab44f3128533b5a3092a13c6de7e759f0d048a58df860fe3d9d5341e1b507", /* sha512_256 */ "d99428764cc43a2ff5c1ac4db1e5da826a97dae5530e268650318adb2e2e246f", /* sha3-256 */ "644f8950457497a7ad3b89ff1bae0d5104604dfe7191b95fed4750a551bb0705173fba66cb71bac5e89dbef418096a76f74db060298c3e2ab54a3513fe50b9ea", /* sha3-512 */ } }, { .size = 62, .expected = { "bef25ba0f6a4d8f8ec8d5d5122241a10", /* md5 */ "bb814cf15cf9478829e6b85205824b0f1fd8ca08", /* sha1 */ "4931ea748296a1cd4fed8cf6275ecb0f2df8e11bafa9457b9ab62c47bc0bc2df", /* sha256 */ "509fdf28fefbc5ef33e88ef0b239115ab620ed1e94a7adf95549b03f23359c9a38131ad8056957c279e8f74b9c23feba57bd6501bb2d06546398242079fefbb7", /* sha512 */ "93a67b62a5e060ef799259c41430c49f9a4e0a10", /* rmd160 */ "266b9f823d34ec3acf51ce37f28040f885cd24494c9a682b", /* tiger */ "9f5b8ff1", /* crc32 */ "f18f5b9f", /* crc32b */ "46d100b49ce74d6a1a02af140f3720d9d65bde7342b36ca3c92fcf893451f021", /* haval */ "fc63bb82de354304a63af835e2596136639f365aec5be609a4a1264fa496c4a5eadb3d615d9f9c06f3aa9eb4654780b461b51b79ad25a15aebe1033babc120c8", /* whirlpool */ "8fd10ed0d94fbacef168095b733cc82ba091e98f1947b12cb46090dafa345150", /* gost */ "82985767032f0a24c7b0be97daf3fde20b0a26c58ba0fc629488f0006b061c05", /* stribog256 */ "11115c0e8f26b6c9ad6b94f04c7fb4269c32c9ef841c10068df1f0a0f031df3b010bcbd6442e1f4ac35ea50e5a01f96e1a196ae9654da51cb7dec4daf22aed23", /* stribog512 */ "f288ffd88561cb7fa728dbaa80fe195016a188959be61f1c297826fec2a11864", /* sha512_256 */ "4d877e02ff6f9ffdf4fe894a5814fb8836db7b1e18f8c94788cf8144d6eca616", /* sha3-256 */ "15b6d95c749b322c9d91e92bc5498cdabe0919fb7a7d3d7f9940092077e61370f96b46079b4858ee14906c929d0217acaf58d3fa8c2d622b29a95dd643978cd6", /* sha3-512 */ } }, }; static int num_hashsum_tests = sizeof hashsum_tests / sizeof(hashsum_test_t); START_TEST(test_hashsum) { char *dummy_filename = ""; md_hashsums md; struct md_container mdc; mdc.todo_attr = get_hashes(false); init_md(&mdc, dummy_filename, NULL); update_md(&mdc, message, hashsum_tests[_i].size); close_md(&mdc, &md, dummy_filename, NULL); for (int i = 0; i < num_hashes; ++i) { if (algorithms[i] >= 0) { char *hashsum = byte_to_base16(md.hashsums[i], hashsums[i].length); ck_assert_msg(stricmp(hashsum, hashsum_tests[_i].expected[i]) == 0, "\n" "%10s hashsum retruned: %s\n" " expected: %s", attributes[hashsums[i].attribute].config_name, hashsum, hashsum_tests[_i].expected[i]); free(hashsum); } } } END_TEST Suite *make_hashsum_suite(void) { Suite *s = suite_create("hashsum"); TCase *tc_hashsum = tcase_create("hashsum"); tcase_add_loop_test(tc_hashsum, test_hashsum, 0, num_hashsum_tests); suite_add_tcase(s, tc_hashsum); return s; } aide-0.19/tests/check_seltree.c0000644000175000017500000012514114770012442012141 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2024,2015 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include #include "seltree.h" #include "rx_rule.h" #include "log.h" #include "file.h" typedef struct { char *regex; AIDE_RULE_TYPE type; rx_restriction_t restriction; } check_seltree_rule_t; typedef struct { file_t file; match_result expected_match; } check_seltree_test_t; static seltree *add_rules(check_seltree_rule_t rules[], size_t num_of_rules) { seltree *tree = init_tree(); char* node_path = NULL; for (size_t i = 0 ; i < num_of_rules ; i++) { add_rx_to_tree(rules[i].regex, rules[i].restriction, rules[i].type, tree, i, "check_seltree", "n/a", &node_path); } log_tree(LOG_LEVEL_RULE, tree, 0); return tree; } static void test_rules(seltree *tree, check_seltree_test_t tests[], size_t num_of_tests) { for (size_t i = 0 ; i < num_of_tests ; i++) { log_msg(LOG_LEVEL_RULE, "\u252c check '%s' (filetype: %c)", tests[i].file.name, get_f_type_char_from_f_type(tests[i].file.type)); match_t match = check_seltree(tree, tests[i].file, true, NULL); log_msg(LOG_LEVEL_RULE, "\u2534 result: %s", get_match_result_string(match.result)); ck_assert_msg(tests[i].expected_match == match.result , "check_seltree %s (f_type: %c): returned %s (%d) (expected: %s (%d))", tests[i].file.name, get_f_type_char_from_f_type(tests[i].file.type), get_match_result_string(match.result), match.result, get_match_result_string(tests[i].expected_match), tests[i].expected_match); } } START_TEST (test_unrestricted_equal_rule) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_equal_rule"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_EQUAL_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_EQUAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_equal_rule_slash) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_equal_rule_slash"); check_seltree_rule_t rules[] = { { .regex = "/dev/", .type = AIDE_EQUAL_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_EQUAL_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_EQUAL_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_recursive_negative_rule_eol) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_recursive_negative_rule_eol"); check_seltree_rule_t rules[] = { { .regex = "/dev$", .type = AIDE_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_recursive_negative_rule) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_recursive_negative_rule"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_non_recursive_negative_rule_eol) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_non_recursive_negative_rule_eol"); check_seltree_rule_t rules[] = { { .regex = "/dev$", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_non_recursive_negative_rule) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_non_recursive_negative_rule"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_recursive_negative_rule_deep_selective) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_recursive_negative_rule_deep_selective"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/dev/pts", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_recursive_negative_rule_eol_deep_selective) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_recursive_negative_rule_eol_deep_selective"); check_seltree_rule_t rules[] = { { .regex = "/dev$", .type = AIDE_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/dev/pts", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_non_recursive_negative_rule_deep_selective) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_non_recursive_negative_rule_deep_selective"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/dev/pts", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_non_recursive_negative_rule_eol_deep_selective) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_non_recursive_negative_rule_eol_deep_selective"); check_seltree_rule_t rules[] = { { .regex = "/dev$", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/dev/pts", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_deep_selective_rule) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_deep_selective_rule"); check_seltree_rule_t rules[] = { { .regex = "/dev/.*/[0-9]", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/etc/deep/down/0", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_unrestricted_forbid_root) { log_msg(LOG_LEVEL_INFO, "test_unrestricted_forbid_root"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, { .regex = "/", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_f_type_restricted_equal_rule) { log_msg(LOG_LEVEL_INFO, "test_f_type_restricted_equal_rule"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_EQUAL_RULE, .restriction = { .f_type = FT_DIR } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_EQUAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_f_type_restricted_equal_rule_slash) { log_msg(LOG_LEVEL_INFO, "test_f_type_restricted_equal_rule_slash"); check_seltree_rule_t rules[] = { { .regex = "/dev/", .type = AIDE_EQUAL_RULE, .restriction = { .f_type = FT_DIR } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_EQUAL_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_f_type_restricted_recursive_negative_rule_eol) { log_msg(LOG_LEVEL_INFO, "test_f_type_restricted_recursive_negative_rule_eol"); check_seltree_rule_t rules[] = { { .regex = "/dev$", .type = AIDE_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_DIR } }, { .regex = "/", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_f_type_restricted_recursive_negative_rule) { log_msg(LOG_LEVEL_INFO, "test_f_type_restricted_recursive_negative_rule"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_DIR } }, { .regex = "/", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_f_type_restricted_non_recursive_negative_rule_eol) { log_msg(LOG_LEVEL_INFO, "test_f_type_restricted_non_recursive_negative_rule_eol"); check_seltree_rule_t rules[] = { { .regex = "/dev$", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_DIR } }, { .regex = "/", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_restricted_recursive_negative_rule_deep_selective) { log_msg(LOG_LEVEL_INFO, "test_restricted_recursive_negative_rule_deep_selective"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_DIR } }, { .regex = "/dev/pts", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_restricted_recursive_negative_rule_eol_deep_selective) { log_msg(LOG_LEVEL_INFO, "test_restricted_recursive_negative_rule_eol_deep_selective"); check_seltree_rule_t rules[] = { { .regex = "/dev$", .type = AIDE_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_DIR } }, { .regex = "/dev/pts", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_restricted_non_recursive_negative_rule_deep_selective) { log_msg(LOG_LEVEL_INFO, "test_restricted_non_recursive_negative_rule_deep_selective"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_DIR } }, { .regex = "/dev/pts", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_restricted_non_recursive_negative_rule_eol_deep_selective) { log_msg(LOG_LEVEL_INFO, "test_restricted_non_recursive_negative_rule_eol_deep_selective"); check_seltree_rule_t rules[] = { { .regex = "/dev$", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_DIR } }, { .regex = "/dev/pts", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NO_RULE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NO_RULE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_f_type_restricted_non_recursive_negative_rule) { log_msg(LOG_LEVEL_INFO, "test_f_type_restricted_non_recursive_negative_rule"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_DIR } }, { .regex = "/", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_NULL } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_f_type_restricted_deep_selective_rule) { log_msg(LOG_LEVEL_INFO, "test_f_type_restricted_deep_selective_rule"); check_seltree_rule_t rules[] = { { .regex = "/dev/.*/[0-9]", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_BLK } }, { .regex = "/etc/deep/down/0", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_REG } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_BLK }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_SELECTIVE_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_PARTIAL_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_SELECTIVE_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST START_TEST (test_f_type_restricted_forbid_root) { log_msg(LOG_LEVEL_INFO, "test_f_type_restricted_forbid_root"); check_seltree_rule_t rules[] = { { .regex = "/dev", .type = AIDE_SELECTIVE_RULE, .restriction = { .f_type = FT_BLK } }, { .regex = "/", .type = AIDE_NON_RECURSIVE_NEGATIVE_RULE, .restriction = { .f_type = FT_DIR } }, }; check_seltree_test_t tests[] = { { (file_t){ .name = "/", .type = FT_DIR }, .expected_match = RESULT_NON_RECURSIVE_NEGATIVE_MATCH }, { (file_t){ .name = "/dev", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/sda", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/0", .type = FT_BLK }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/dev/pts/deep/down/0", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc", .type = FT_DIR }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, { (file_t){ .name = "/etc/deep/down/0", .type = FT_REG }, .expected_match = RESULT_NEGATIVE_PARENT_MATCH }, }; test_rules(add_rules(rules, sizeof(rules)/sizeof(check_seltree_rule_t)), tests, sizeof(tests)/sizeof(check_seltree_test_t)); } END_TEST Suite *make_seltree_suite(void) { Suite *s = suite_create ("seltree"); TCase *tc_check_seltree = tcase_create ("check_seltree"); tcase_add_test(tc_check_seltree, test_unrestricted_equal_rule); tcase_add_test(tc_check_seltree, test_unrestricted_equal_rule_slash); tcase_add_test(tc_check_seltree, test_unrestricted_recursive_negative_rule_eol); tcase_add_test(tc_check_seltree, test_unrestricted_recursive_negative_rule); tcase_add_test(tc_check_seltree, test_unrestricted_non_recursive_negative_rule_eol); tcase_add_test(tc_check_seltree, test_unrestricted_non_recursive_negative_rule); tcase_add_test(tc_check_seltree, test_unrestricted_recursive_negative_rule_deep_selective); tcase_add_test(tc_check_seltree, test_unrestricted_recursive_negative_rule_eol_deep_selective); tcase_add_test(tc_check_seltree, test_unrestricted_non_recursive_negative_rule_deep_selective); tcase_add_test(tc_check_seltree, test_unrestricted_non_recursive_negative_rule_eol_deep_selective); tcase_add_test(tc_check_seltree, test_unrestricted_deep_selective_rule); tcase_add_test(tc_check_seltree, test_unrestricted_forbid_root); tcase_add_test(tc_check_seltree, test_f_type_restricted_equal_rule); tcase_add_test(tc_check_seltree, test_f_type_restricted_equal_rule_slash); tcase_add_test(tc_check_seltree, test_f_type_restricted_recursive_negative_rule_eol); tcase_add_test(tc_check_seltree, test_f_type_restricted_recursive_negative_rule); tcase_add_test(tc_check_seltree, test_f_type_restricted_non_recursive_negative_rule_eol); tcase_add_test(tc_check_seltree, test_f_type_restricted_non_recursive_negative_rule); tcase_add_test(tc_check_seltree, test_restricted_recursive_negative_rule_deep_selective); tcase_add_test(tc_check_seltree, test_restricted_recursive_negative_rule_eol_deep_selective); tcase_add_test(tc_check_seltree, test_restricted_non_recursive_negative_rule_deep_selective); tcase_add_test(tc_check_seltree, test_restricted_non_recursive_negative_rule_eol_deep_selective); tcase_add_test(tc_check_seltree, test_f_type_restricted_deep_selective_rule); tcase_add_test(tc_check_seltree, test_f_type_restricted_forbid_root); suite_add_tcase (s, tc_check_seltree); return s; } aide-0.19/install-sh0000755000175000017500000003611514774244724010057 #!/bin/sh # install - install a program, script, or datafile scriptversion=2024-06-19.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Report bugs to . GNU Automake home page: . General help using GNU software: ." while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 (GNU Automake) $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibility with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: aide-0.19/config.sub0000755000175000017500000011544114774244724010036 #! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale timestamp='2024-05-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in cloudabi*-eabi* \ | kfreebsd*-gnu* \ | knetbsd*-gnu* \ | kopensolaris*-gnu* \ | linux-* \ | managarm-* \ | netbsd*-eabi* \ | netbsd*-gnu* \ | nto-qnx* \ | os2-emx* \ | rtmk-nova* \ | storm-chaos* \ | uclinux-gnu* \ | uclinux-uclibc* \ | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) case $field1-$field2 in # Shorthands that happen to contain a single dash convex-c[12] | convex-c3[248]) basic_machine=$field2-convex basic_os= ;; decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Do not treat sunos as a manufacturer sun*os*) basic_machine=$field1 basic_os=$field2 ;; # Manufacturers 3100* \ | 32* \ | 3300* \ | 3600* \ | 7300* \ | acorn \ | altos* \ | apollo \ | apple \ | atari \ | att* \ | axis \ | be \ | bull \ | cbm \ | ccur \ | cisco \ | commodore \ | convergent* \ | convex* \ | cray \ | crds \ | dec* \ | delta* \ | dg \ | digital \ | dolphin \ | encore* \ | gould \ | harris \ | highlevel \ | hitachi* \ | hp \ | ibm* \ | intergraph \ | isi* \ | knuth \ | masscomp \ | microblaze* \ | mips* \ | motorola* \ | ncr* \ | news \ | next \ | ns \ | oki \ | omron* \ | pc533* \ | rebel \ | rom68k \ | rombug \ | semi \ | sequent* \ | siemens \ | sgi* \ | siemens \ | sim \ | sni \ | sony* \ | stratus \ | sun \ | sun[234]* \ | tektronix \ | tti* \ | ultra \ | unicom* \ | wec \ | winbond \ | wrs) basic_machine=$field1-$field2 basic_os= ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) cpu=m68k vendor=motorola ;; # This used to be dpx2*, but that gets the RS6000-based # DPX/20 and the x86-based DPX/2-100 wrong. See # https://oldskool.silicium.org/stations/bull_dpx20.htm # https://www.feb-patrimoine.com/english/bull_dpx2.htm # https://www.feb-patrimoine.com/english/unix_and_bull.htm dpx2 | dpx2[23]00 | dpx2[23]xx) cpu=m68k vendor=bull ;; dpx2100 | dpx21xx) cpu=i386 vendor=bull ;; dpx20) cpu=rs6000 vendor=bull ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x"$basic_os" != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. obj= case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) saved_IFS=$IFS IFS="-" read kernel os <&2 fi ;; *) echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 exit 1 ;; esac case $obj in aout* | coff* | elf* | pe*) ;; '') # empty is fine ;; *) echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 exit 1 ;; esac # Here we handle the constraint that a (synthetic) cpu and os are # valid only in combination with each other and nowhere else. case $cpu-$os in # The "javascript-unknown-ghcjs" triple is used by GHC; we # accept it here in order to tolerate that, but reject any # variations. javascript-ghcjs) ;; javascript-* | *-ghcjs) echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os-$obj in linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ | linux-mlibc*- | linux-musl*- | linux-newlib*- \ | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) ;; uclinux-uclibc*- | uclinux-gnu*- ) ;; managarm-mlibc*- | managarm-kernel*- ) ;; windows*-msvc*-) ;; -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; -kernel*- ) echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; *-kernel*- ) echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; *-msvc*- ) echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) ;; vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ;; nto-qnx*-) ;; os2-emx-) ;; rtmk-nova-) ;; *-eabi*- | *-gnueabi*-) ;; none--*) # None (no kernel, i.e. freestanding / bare metal), # can be paired with an machine code file format ;; -*-) # Blank kernel with real OS is always fine. ;; --*) # Blank kernel and OS with real machine code file format is always fine. ;; *-*-*) echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos* | *-solaris*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: aide-0.19/missing0000755000175000017500000001706014774244724007450 #! /bin/sh # Common wrapper for a few potentially missing GNU and other programs. scriptversion=2024-06-07.14; # UTC # shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells # Copyright (C) 1996-2024 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autogen autoheader autom4te automake autoreconf bison flex help2man lex makeinfo perl yacc Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Report bugs to . GNU Automake home page: . General help using GNU software: ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing (GNU Automake) $scriptversion" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake|autoreconf) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; *) : ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" autoheader_deps="'acconfig.h'" automake_deps="'Makefile.am'" aclocal_deps="'acinclude.m4'" case $normalized_program in aclocal*) echo "You should only need it if you modified $aclocal_deps or" echo "$configure_deps." ;; autoconf*) echo "You should only need it if you modified $configure_deps." ;; autogen*) echo "You should only need it if you modified a '.def' or '.tpl' file." echo "You may want to install the GNU AutoGen package:" echo "<$gnu_software_URL/autogen/>" ;; autoheader*) echo "You should only need it if you modified $autoheader_deps or" echo "$configure_deps." ;; automake*) echo "You should only need it if you modified $automake_deps or" echo "$configure_deps." ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." ;; autoreconf*) echo "You should only need it if you modified $aclocal_deps or" echo "$automake_deps or $autoheader_deps or $automake_deps or" echo "$configure_deps." ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; perl*) echo "You should only need it to run GNU Autoconf, GNU Automake, " echo " assorted other tools, or if you modified a Perl source file." echo "You may want to install the Perl 5 language interpreter:" echo "<$perl_URL>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac program_details "$normalized_program" } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: aide-0.19/configure0000755000175000017500000131677114774244724007774 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.72 for aide 0.19. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case e in #( e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else case e in #( e) exitcode=1; echo positional parameters were not saved. ;; esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else case e in #( e) as_have_required=no ;; esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi ;; esac fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi ;; esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' t clear :clear s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='aide' PACKAGE_TARNAME='aide' PACKAGE_VERSION='0.19' PACKAGE_STRING='aide 0.19' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= enable_year2038=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS AIDE_DEFS HAVE_CHECK_FALSE HAVE_CHECK_TRUE CHECK_LIBS CHECK_CFLAGS HAVE_LOCALE_FALSE HAVE_LOCALE_TRUE HAVE_AUDIT_FALSE HAVE_AUDIT_TRUE AUDIT_LIBS AUDIT_CFLAGS HAVE_GCRYPT_FALSE HAVE_GCRYPT_TRUE HAVE_NETTLE_FALSE HAVE_NETTLE_TRUE GCRYPT_LIBS GCRYPT_CFLAGS NETTLE_LIBS NETTLE_CFLAGS HAVE_CURL_FALSE HAVE_CURL_TRUE CURL_LIBS CURL_CFLAGS HAVE_E2FSATTRS_FALSE HAVE_E2FSATTRS_TRUE E2FSATTRS_LIBS E2FSATTRS_CFLAGS HAVE_CAPABILITIES_FALSE HAVE_CAPABILITIES_TRUE CAPABILITIES_LIBS CAPABILITIES_CFLAGS HAVE_XATTR_FALSE HAVE_XATTR_TRUE XATTR_LIBS XATTR_CFLAGS HAVE_SELINUX_FALSE HAVE_SELINUX_TRUE SELINUX_LIBS SELINUX_CFLAGS HAVE_POSIX_ACL_FALSE HAVE_POSIX_ACL_TRUE POSIX_ACL_LIBS POSIX_ACL_CFLAGS HAVE_ZLIB_FALSE HAVE_ZLIB_TRUE ZLIB_LIBS ZLIB_CFLAGS PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CXX PTHREAD_CC ax_pthread_config CPP SED PCRE2_LIBS PCRE2_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG LD LEXLIB LEX_OUTPUT_ROOT LEX YFLAGS YACC RANLIB am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC am__xargs_n am__rm_f_notfound AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_largefile with_extra_includes with_extra_libs with_extra_link_libs enable_static with_fstype with_zlib with_posix_acl with_selinux with_xattr with_capabilities with_e2fsattrs with_curl with_nettle with_gcrypt with_audit with_locale with_syslog_ident with_syslog_logopt with_syslog_priority with_syslog_facility with_config_file enable_default_db enable_year2038 ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS YACC YFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PCRE2_CFLAGS PCRE2_LIBS CPP ZLIB_CFLAGS ZLIB_LIBS POSIX_ACL_CFLAGS POSIX_ACL_LIBS SELINUX_CFLAGS SELINUX_LIBS XATTR_CFLAGS XATTR_LIBS CAPABILITIES_CFLAGS CAPABILITIES_LIBS E2FSATTRS_CFLAGS E2FSATTRS_LIBS CURL_CFLAGS CURL_LIBS NETTLE_CFLAGS NETTLE_LIBS GCRYPT_CFLAGS GCRYPT_LIBS AUDIT_CFLAGS AUDIT_LIBS CHECK_CFLAGS CHECK_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: '$ac_option' Try '$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF 'configure' configures aide 0.19 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, 'make install' will install all the files in '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify an installation prefix other than '$ac_default_prefix' using '--prefix', for instance '--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/aide] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of aide 0.19:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-largefile omit support for large files --enable-static enable static linking (might increase the security of aide, see README for details) --disable-default-db do not set default values for database_in and database_out config options --enable-year2038 support timestamps after 2038 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-extra-includes Specify additional paths with -I to find headerfiles --with-extra-libs Specify additional paths with -L to find libraries --with-extra-link-libs Specify additional libraries to link --without-fstype Disable file system type support for restricted rules (Linux only) --with-zlib use zlib compression (default: yes) --with-posix-acl use POSIX ACLs (default: no) --with-selinux use SELinux (default: no) --with-xattr use xattr (default: no) --with-capabilities use POSIX 1003.1e capabilities (default: no) --with-e2fsattrs use e2fsattrs (default: no) --with-curl use cURL (default: no) --with-nettle use Nettle crypto library (default: check) --with-gcrypt use GNU crypto library (default: check) --with-audit use Linux Auditing Framework (default: no) --with-locale locale (default: no) --with-syslog-ident syslog ident (default: "aide") --with-syslog-logopt syslog logopt (default: LOG_CONS) --with-syslog-priority syslog priority (default: LOG_NOTICE) --with-syslog-facility default syslog facility (default: LOG_LOCAL0) --with-config-file=config-file specify default config file (use --without-config-file to disable default config file) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory YACC The 'Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: 'bison -y', 'byacc', 'yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of '-d' given by some make applications. PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path PCRE2_CFLAGS C compiler flags for PCRE2, overriding pkg-config PCRE2_LIBS linker flags for PCRE2, overriding pkg-config CPP C preprocessor ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config ZLIB_LIBS linker flags for ZLIB, overriding pkg-config POSIX_ACL_CFLAGS C compiler flags for POSIX_ACL, overriding pkg-config POSIX_ACL_LIBS linker flags for POSIX_ACL, overriding pkg-config SELINUX_CFLAGS C compiler flags for SELINUX, overriding pkg-config SELINUX_LIBS linker flags for SELINUX, overriding pkg-config XATTR_CFLAGS C compiler flags for XATTR, overriding pkg-config XATTR_LIBS linker flags for XATTR, overriding pkg-config CAPABILITIES_CFLAGS C compiler flags for CAPABILITIES, overriding pkg-config CAPABILITIES_LIBS linker flags for CAPABILITIES, overriding pkg-config E2FSATTRS_CFLAGS C compiler flags for E2FSATTRS, overriding pkg-config E2FSATTRS_LIBS linker flags for E2FSATTRS, overriding pkg-config CURL_CFLAGS C compiler flags for CURL, overriding pkg-config CURL_LIBS linker flags for CURL, overriding pkg-config NETTLE_CFLAGS C compiler flags for NETTLE, overriding pkg-config NETTLE_LIBS linker flags for NETTLE, overriding pkg-config GCRYPT_CFLAGS C compiler flags for GCRYPT, overriding pkg-config GCRYPT_LIBS linker flags for GCRYPT, overriding pkg-config AUDIT_CFLAGS C compiler flags for AUDIT, overriding pkg-config AUDIT_LIBS linker flags for AUDIT, overriding pkg-config CHECK_CFLAGS C compiler flags for CHECK, overriding pkg-config CHECK_LIBS linker flags for CHECK, overriding pkg-config Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF aide configure 0.19 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (void); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status ;; esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) eval "$3=yes" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break else case e in #( e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break else case e in #( e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else case e in #( e) ac_lo= ac_hi= ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid else case e in #( e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval (void) { return $2; } static unsigned long int ulongval (void) { return $2; } #include #include int main (void) { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by aide $as_me 0.19, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See 'config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (char **p, int i) { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* C89 style stringification. */ #define noexpand_stringify(a) #a const char *stringified = noexpand_stringify(arbitrary+token=sequence); /* C89 style token pasting. Exercises some of the corner cases that e.g. old MSVC gets wrong, but not very hard. */ #define noexpand_concat(a,b) a##b #define expand_concat(a,b) noexpand_concat(a,b) extern int vA; extern int vbee; #define aye A #define bee B int *pvA = &expand_concat(v,aye); int *pvbee = &noexpand_concat(v,bee); /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' /* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif // See if C++-style comments work. #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Work around memory leak warnings. free (ia); // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' /* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" # Auxiliary files required by this configure script. ac_aux_files="compile missing install-sh config.guess config.sub" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; esac fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 printf %s "checking target system type... " >&6; } if test ${ac_cv_target+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 printf "%s\n" "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.17' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir ;; esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5 printf %s "checking whether sleep supports fractional seconds... " >&6; } if test ${am_cv_sleep_fractional_seconds+y} then : printf %s "(cached) " >&6 else case e in #( e) if sleep 0.001 2>/dev/null then : am_cv_sleep_fractional_seconds=yes else case e in #( e) am_cv_sleep_fractional_seconds=no ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5 printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem timestamp resolution" >&5 printf %s "checking filesystem timestamp resolution... " >&6; } if test ${am_cv_filesystem_timestamp_resolution+y} then : printf %s "(cached) " >&6 else case e in #( e) # Default to the worst case. am_cv_filesystem_timestamp_resolution=2 # Only try to go finer than 1 sec if sleep can do it. # Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, # - 1 sec is not much of a win compared to 2 sec, and # - it takes 2 seconds to perform the test whether 1 sec works. # # Instead, just use the default 2s on platforms that have 1s resolution, # accept the extra 1s delay when using $sleep in the Automake tests, in # exchange for not incurring the 2s delay for running the test for all # packages. # am_try_resolutions= if test "$am_cv_sleep_fractional_seconds" = yes; then # Even a millisecond often causes a bunch of false positives, # so just try a hundredth of a second. The time saved between .001 and # .01 is not terribly consequential. am_try_resolutions="0.01 0.1 $am_try_resolutions" fi # In order to catch current-generation FAT out, we must *modify* files # that already exist; the *creation* timestamp is finer. Use names # that make ls -t sort them differently when they have equal # timestamps than when they have distinct timestamps, keeping # in mind that ls -t prints the *newest* file first. rm -f conftest.ts? : > conftest.ts1 : > conftest.ts2 : > conftest.ts3 # Make sure ls -t actually works. Do 'set' in a subshell so we don't # clobber the current shell's arguments. (Outer-level square brackets # are removed by m4; they're present so that m4 does not expand # ; be careful, easy to get confused.) if ( set X `ls -t conftest.ts[12]` && { test "$*" != "X conftest.ts1 conftest.ts2" || test "$*" != "X conftest.ts2 conftest.ts1"; } ); then :; else # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". printf "%s\n" ""Bad output from ls -t: \"`ls -t conftest.ts[12]`\""" >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "ls -t produces unexpected output. Make sure there is not a broken ls alias in your environment. See 'config.log' for more details" "$LINENO" 5; } fi for am_try_res in $am_try_resolutions; do # Any one fine-grained sleep might happen to cross the boundary # between two values of a coarser actual resolution, but if we do # two fine-grained sleeps in a row, at least one of them will fall # entirely within a coarse interval. echo alpha > conftest.ts1 sleep $am_try_res echo beta > conftest.ts2 sleep $am_try_res echo gamma > conftest.ts3 # We assume that 'ls -t' will make use of high-resolution # timestamps if the operating system supports them at all. if (set X `ls -t conftest.ts?` && test "$2" = conftest.ts3 && test "$3" = conftest.ts2 && test "$4" = conftest.ts1); then # # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, # because we don't need to test make. make_ok=true if test $am_try_res != 1; then # But if we've succeeded so far with a subsecond resolution, we # have one more thing to check: make. It can happen that # everything else supports the subsecond mtimes, but make doesn't; # notably on macOS, which ships make 3.81 from 2006 (the last one # released under GPLv2). https://bugs.gnu.org/68808 # # We test $MAKE if it is defined in the environment, else "make". # It might get overridden later, but our hope is that in practice # it does not matter: it is the system "make" which is (by far) # the most likely to be broken, whereas if the user overrides it, # probably they did so with a better, or at least not worse, make. # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html # # Create a Makefile (real tab character here): rm -f conftest.mk echo 'conftest.ts1: conftest.ts2' >conftest.mk echo ' touch conftest.ts2' >>conftest.mk # # Now, running # touch conftest.ts1; touch conftest.ts2; make # should touch ts1 because ts2 is newer. This could happen by luck, # but most often, it will fail if make's support is insufficient. So # test for several consecutive successes. # # (We reuse conftest.ts[12] because we still want to modify existing # files, not create new ones, per above.) n=0 make=${MAKE-make} until test $n -eq 3; do echo one > conftest.ts1 sleep $am_try_res echo two > conftest.ts2 # ts2 should now be newer than ts1 if $make -f conftest.mk | grep 'up to date' >/dev/null; then make_ok=false break # out of $n loop fi n=`expr $n + 1` done fi # if $make_ok; then # Everything we know to check worked out, so call this resolution good. am_cv_filesystem_timestamp_resolution=$am_try_res break # out of $am_try_res loop fi # Otherwise, we'll go on to check the next resolution. fi done rm -f conftest.ts? # (end _am_filesystem_timestamp_resolution) ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5 printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; } # This check should not be cached, as it may vary across builds of # different projects. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). am_build_env_is_sane=no am_has_slept=no rm -f conftest.file for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi test "$2" = conftest.file ); then am_build_env_is_sane=yes break fi # Just in case. sleep "$am_cv_filesystem_timestamp_resolution" am_has_slept=yes done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_build_env_is_sane" >&5 printf "%s\n" "$am_build_env_is_sane" >&6; } if test "$am_build_env_is_sane" = no; then as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1 then : else case e in #( e) ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! ;; esac fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was 's,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS ;; esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use plain mkdir -p, # in the hope it doesn't have the bugs of ancient mkdir. MKDIR_P='mkdir -p' fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else case e in #( e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make ;; esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AM_DEFAULT_VERBOSITY=1 # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } AM_BACKSLASH='\' am__rm_f_notfound= if (rm -f && rm -fr && rm -rf) 2>/dev/null then : else case e in #( e) am__rm_f_notfound='""' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5 printf %s "checking xargs -n works... " >&6; } if test ${am_cv_xargs_n_works+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 3" then : am_cv_xargs_n_works=yes else case e in #( e) am_cv_xargs_n_works=no ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5 printf "%s\n" "$am_cv_xargs_n_works" >&6; } if test "$am_cv_xargs_n_works" = yes then : am__xargs_n='xargs -n' else case e in #( e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }' ;; esac fi if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='aide' VERSION='0.19' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi printf "%s\n" "#define AIDEVERSION \"0.19\"" >>confdefs.h ac_config_headers="$ac_config_headers include/config.h" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else case e in #( e) ac_file='' ;; esac fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will # work properly (i.e., refer to 'conftest.exe'), while it won't with # 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); if (!f) return 1; return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use '--host'. See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext \ conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else case e in #( e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$ac_cv_prog_cc_c99" = xno; then as_fn_error $? "AIDE needs a C99 compatible compiler" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else case e in #( e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make ;; esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_YACC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 printf "%s\n" "$YACC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" if test "x${YACC}" != "xbison -y"; then echo "AIDE requires GNU bison" exit 5 fi for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LEX+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 printf "%s\n" "$LEX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %{ #ifdef __cplusplus extern "C" #endif int yywrap(void); %} %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ #ifdef __cplusplus yyless ((yyinput () != 0)); #else yyless ((input () != 0)); #endif } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int yywrap (void) { return 1; } int main (void) { return ! yylex (); } _ACEOF { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5 printf %s "checking for lex output file root... " >&6; } if test ${ac_cv_prog_lex_root+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_lex_root=unknown { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 printf "%s\n" "$ac_cv_prog_lex_root" >&6; } if test "$ac_cv_prog_lex_root" = unknown then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5 printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;} LEX=: LEXLIB= fi LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test ${LEXLIB+y} then : else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5 printf %s "checking for lex library... " >&6; } if test ${ac_cv_lib_lex+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_LIBS="$LIBS" ac_found=false for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do case $ac_cv_lib_lex in #( 'none needed') : ;; #( 'not found') : break ;; #( *) : LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #( *) : ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_found=: fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if $ac_found; then break fi done LIBS="$ac_save_LIBS" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 printf "%s\n" "$ac_cv_lib_lex" >&6; } if test "$ac_cv_lib_lex" = 'not found' then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5 printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;} LEX=: LEXLIB= elif test "$ac_cv_lib_lex" = 'none needed' then : LEXLIB='' else case e in #( e) LEXLIB=$ac_cv_lib_lex ;; esac fi ;; esac fi if test "$LEX" != : then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 printf %s "checking whether yytext is a pointer... " >&6; } if test ${ac_cv_prog_lex_yytext_pointer+y} then : printf %s "(cached) " >&6 else case e in #( e) # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h fi fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi if test "x${LEX}" != "xflex"; then echo "AIDE requires GNU flex" exit 5 fi for ac_prog in ld do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$LD"; then ac_cv_prog_LD="$LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LD="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi LD=$ac_cv_prog_LD if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$LD" && break done if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="no" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi # Check whether --enable-largefile was given. if test ${enable_largefile+y} then : enableval=$enable_largefile; fi if test "$enable_largefile,$enable_year2038" != no,no then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5 printf %s "checking for $CC option to enable large file support... " >&6; } if test ${ac_cv_sys_largefile_opts+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CC="$CC" ac_opt_found=no for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do if test x"$ac_opt" != x"none needed" then : CC="$ac_save_CC $ac_opt" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef FTYPE # define FTYPE off_t #endif /* Check that FTYPE can represent 2**63 - 1 correctly. We can't simply define LARGE_FTYPE to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31)) int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721 && LARGE_FTYPE % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_opt" = x"none needed" then : # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t. CC="$CC -DFTYPE=ino_t" if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) CC="$CC -D_FILE_OFFSET_BITS=64" if ac_fn_c_try_compile "$LINENO" then : ac_opt='-D_FILE_OFFSET_BITS=64' fi rm -f core conftest.err conftest.$ac_objext conftest.beam ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam fi ac_cv_sys_largefile_opts=$ac_opt ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test $ac_opt_found = no || break done CC="$ac_save_CC" test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5 printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; } ac_have_largefile=yes case $ac_cv_sys_largefile_opts in #( "none needed") : ;; #( "supported through gnulib") : ;; #( "support not detected") : ac_have_largefile=no ;; #( "-D_FILE_OFFSET_BITS=64") : printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h ;; #( "-D_LARGE_FILES=1") : printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h ;; #( "-n32") : CC="$CC -n32" ;; #( *) : as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;; esac if test "$enable_year2038" != no then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5 printf %s "checking for $CC option for timestamps after 2038... " >&6; } if test ${ac_cv_sys_year2038_opts+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CPPFLAGS="$CPPFLAGS" ac_opt_found=no for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do if test x"$ac_opt" != x"none needed" then : CPPFLAGS="$ac_save_CPPFLAGS $ac_opt" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that time_t can represent 2**32 - 1 correctly. */ #define LARGE_TIME_T \\ ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))) int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535 && LARGE_TIME_T % 65537 == 0) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_year2038_opts="$ac_opt" ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test $ac_opt_found = no || break done CPPFLAGS="$ac_save_CPPFLAGS" test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5 printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; } ac_have_year2038=yes case $ac_cv_sys_year2038_opts in #( "none needed") : ;; #( "support not detected") : ac_have_year2038=no ;; #( "-D_TIME_BITS=64") : printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h ;; #( "-D__MINGW_USE_VC2005_COMPAT") : printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h ;; #( "-U_USE_32_BIT_TIME_T"*) : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It will stop working after mid-January 2038. Remove _USE_32BIT_TIME_T from the compiler flags. See 'config.log' for more details" "$LINENO" 5; } ;; #( *) : as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;; esac fi fi # Check whether --with-extra-includes was given. if test ${with_extra_includes+y} then : withval=$with_extra_includes; CPPFLAGS="$CPPFLAGS $withval" fi # Check whether --with-extra-libs was given. if test ${with_extra_libs+y} then : withval=$with_extra_libs; LDFLAGS="$LDFLAGS $withval" fi # Check whether --with-extra-link-libs was given. if test ${with_extra_link_libs+y} then : withval=$with_extra_link_libs; LIBS="$LIBS $withval" fi AIDE_DEFS="-D_GNU_SOURCE" if test $ac_cv_c_compiler_gnu = yes; then LD_STATIC_FLAG='-static' case "$host_os" in beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # we not sure about C++ programs. LD_STATIC_FLAG="$LD_STATIC_FLAG ${wl}-lC" ;; cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. ## pic_flag='-m68020 -resident32 -malways-restore-a4' ;; sysv4*MP*) ## if test -d /usr/nec; then ## pic_flag=-Kconform_pic ## fi ;; *) ## pic_flag='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) # 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' ;; sysv4*MP*) if test -d /usr/nec ;then ## pic_flag='-Kconform_pic' LD_STATIC_FLAG='-Bstatic' fi ;; *) ## can_build_shared=no ;; esac fi # Check whether static linking has explicitly been enabled # Check whether --enable-static was given. if test ${enable_static+y} then : enableval=$enable_static; aide_static_choice=$enableval else case e in #( e) aide_static_choice=no ;; esac fi cc_supports_flag() { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports \"$@\"" >&5 printf %s "checking whether $CC supports \"$@\"... " >&6; } Cfile=/tmp/foo${$} touch ${Cfile}.c $CC -c "$@" ${Cfile}.c -o ${Cfile}.o >/dev/null 2>&1 rc=$? rm -f ${Cfile}.c ${Cfile}.o case $rc in 0) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; };; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; };; esac return $rc } ld_supports_flag() { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $LD supports \"$@\"" >&5 printf %s "checking whether $LD supports \"$@\"... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int one(void) { return 1; } int two(void) { return 2; } int main (void) { two(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : _ac_ld_flag_supported=yes else case e in #( e) _ac_ld_flag_supported=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$_ac_ld_flag_supported" = "yes"; then rm -f conftest.c touch conftest.c if $CC -c conftest.c; then ld_out=`$LD $@ -o conftest conftest.o 2>&1` ld_ret=$? if test $ld_ret -ne 0 ; then _ac_ld_flag_supported=no elif echo "$ld_out" | egrep 'option ignored|^usage:|unrecognized option|illegal option' >/dev/null ; then _ac_ld_flag_supported=no fi fi rm -f conftest.c conftest.o conftest fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_ac_ld_flag_supported" >&5 printf "%s\n" "$_ac_ld_flag_supported" >&6; } if test "$_ac_ld_flag_supported" = "yes" ; then return 0 else return 1 fi } if test "$aide_static_choice" != "yes"; then LD_STATIC_FLAG="" EXTRA_LDFLAGS="" EXTRA_CFLAGS="" if test x$CC = "xgcc"; then if ld_supports_flag -z,relro; then EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-z,relro" fi if ld_supports_flag -z,now; then EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-z,now" fi if cc_supports_flag -fPIE -DPIE; then EXTRA_CFLAGS="$EXTRA_CFLAGS -fPIE -DPIE" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -pie" fi if cc_supports_flag -Wundef; then EXTRA_CFLAGS="$EXTRA_CFLAGS -Wundef" fi if cc_supports_flag -Wmissing-format-attribute; then EXTRA_CFLAGS="$EXTRA_CFLAGS -Wmissing-format-attribute" fi if cc_supports_flag -Wshadow; then EXTRA_CFLAGS="$EXTRA_CFLAGS -Wshadow" fi if cc_supports_flag -Wlogical-op; then EXTRA_CFLAGS="$EXTRA_CFLAGS -Wlogical-op" fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing syslog" >&5 printf %s "checking for library containing syslog... " >&6; } if test ${ac_cv_search_syslog+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char syslog (void); int main (void) { return syslog (); ; return 0; } _ACEOF for ac_lib in '' bsd socket inet do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_syslog=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_syslog+y} then : break fi done if test ${ac_cv_search_syslog+y} then : else case e in #( e) ac_cv_search_syslog=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_syslog" >&5 printf "%s\n" "$ac_cv_search_syslog" >&6; } ac_res=$ac_cv_search_syslog if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" printf "%s\n" "#define HAVE_SYSLOG 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog" if test "x$ac_cv_func_vsyslog" = xyes then : printf "%s\n" "#define HAVE_VSYSLOG 1" >>confdefs.h fi ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO" then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else case e in #( e) ac_cv_c_bigendian=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else case e in #( e) ac_cv_c_bigendian=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; unsigned short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } unsigned short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; unsigned short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } int main (int argc, char **argv) { /* Intimidate the compiler so that it does not optimize the arrays away. */ char *p = argv[0]; ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; return use_ascii (argc) == use_ebcdic (*p); } _ACEOF if ac_fn_c_try_link "$LINENO" then : if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no else case e in #( e) ac_cv_c_bigendian=yes ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) printf "%s\n" "#define BIG_ENDIAN_HOST 1" >>confdefs.h ;; #( no) printf "%s\n" "#define LITTLE_ENDIAN_HOST 1" >>confdefs.h ;; #( universal) printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ac_fn_c_check_type "$LINENO" "byte" "ac_cv_type_byte" "$ac_includes_default" if test "x$ac_cv_type_byte" = xyes then : printf "%s\n" "#define HAVE_BYTE 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ushort" "ac_cv_type_ushort" "$ac_includes_default" if test "x$ac_cv_type_ushort" = xyes then : printf "%s\n" "#define HAVE_USHORT 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ulong" "ac_cv_type_ulong" "$ac_includes_default" if test "x$ac_cv_type_ulong" = xyes then : printf "%s\n" "#define HAVE_ULONG 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u16" "ac_cv_type_u16" "$ac_includes_default" if test "x$ac_cv_type_u16" = xyes then : printf "%s\n" "#define HAVE_U16 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u32" "ac_cv_type_u32" "$ac_includes_default" if test "x$ac_cv_type_u32" = xyes then : printf "%s\n" "#define HAVE_U32 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u64" "ac_cv_type_u64" "$ac_includes_default" if test "x$ac_cv_type_u64" = xyes then : printf "%s\n" "#define HAVE_U64 1" >>confdefs.h fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5 printf %s "checking size of unsigned short... " >&6; } if test ${ac_cv_sizeof_unsigned_short+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_unsigned_short" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned short) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_short=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_short" >&5 printf "%s\n" "$ac_cv_sizeof_unsigned_short" >&6; } printf "%s\n" "#define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 printf %s "checking size of unsigned int... " >&6; } if test ${ac_cv_sizeof_unsigned_int+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_unsigned_int" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned int) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_int=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5 printf "%s\n" "$ac_cv_sizeof_unsigned_int" >&6; } printf "%s\n" "#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 printf %s "checking size of unsigned long... " >&6; } if test ${ac_cv_sizeof_unsigned_long+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_unsigned_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned long) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; } printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 printf %s "checking size of unsigned long long... " >&6; } if test ${ac_cv_sizeof_unsigned_long_long+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_unsigned_long_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned long long) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long_long=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_unsigned_long_long" >&6; } printf "%s\n" "#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_int" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_long_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uid_t" >&5 printf %s "checking size of uid_t... " >&6; } if test ${ac_cv_sizeof_uid_t+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uid_t))" "ac_cv_sizeof_uid_t" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_uid_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (uid_t) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_uid_t=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uid_t" >&5 printf "%s\n" "$ac_cv_sizeof_uid_t" >&6; } printf "%s\n" "#define SIZEOF_UID_T $ac_cv_sizeof_uid_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of gid_t" >&5 printf %s "checking size of gid_t... " >&6; } if test ${ac_cv_sizeof_gid_t+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (gid_t))" "ac_cv_sizeof_gid_t" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_gid_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (gid_t) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_gid_t=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_gid_t" >&5 printf "%s\n" "$ac_cv_sizeof_gid_t" >&6; } printf "%s\n" "#define SIZEOF_GID_T $ac_cv_sizeof_gid_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of ino_t" >&5 printf %s "checking size of ino_t... " >&6; } if test ${ac_cv_sizeof_ino_t+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ino_t))" "ac_cv_sizeof_ino_t" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_ino_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (ino_t) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_ino_t=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ino_t" >&5 printf "%s\n" "$ac_cv_sizeof_ino_t" >&6; } printf "%s\n" "#define SIZEOF_INO_T $ac_cv_sizeof_ino_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of nlink_t" >&5 printf %s "checking size of nlink_t... " >&6; } if test ${ac_cv_sizeof_nlink_t+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (nlink_t))" "ac_cv_sizeof_nlink_t" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_nlink_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (nlink_t) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_nlink_t=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_nlink_t" >&5 printf "%s\n" "$ac_cv_sizeof_nlink_t" >&6; } printf "%s\n" "#define SIZEOF_NLINK_T $ac_cv_sizeof_nlink_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 printf %s "checking size of off_t... " >&6; } if test ${ac_cv_sizeof_off_t+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_off_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 printf "%s\n" "$ac_cv_sizeof_off_t" >&6; } printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of blkcnt_t" >&5 printf %s "checking size of blkcnt_t... " >&6; } if test ${ac_cv_sizeof_blkcnt_t+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (blkcnt_t))" "ac_cv_sizeof_blkcnt_t" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_blkcnt_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (blkcnt_t) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_blkcnt_t=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_blkcnt_t" >&5 printf "%s\n" "$ac_cv_sizeof_blkcnt_t" >&6; } printf "%s\n" "#define SIZEOF_BLKCNT_T $ac_cv_sizeof_blkcnt_t" >>confdefs.h ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" if test "x$ac_cv_func_strtoll" = xyes then : printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" if test "x$ac_cv_func_strtoimax" = xyes then : printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir" if test "x$ac_cv_func_readdir" = xyes then : printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp" if test "x$ac_cv_func_stricmp" = xyes then : printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strnstr" "ac_cv_func_strnstr" if test "x$ac_cv_func_strnstr" = xyes then : printf "%s\n" "#define HAVE_STRNSTR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" if test "x$ac_cv_func_strnlen" = xyes then : printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" if test "x$ac_cv_func_fcntl" = xyes then : printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" if test "x$ac_cv_func_ftruncate" = xyes then : printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise" if test "x$ac_cv_func_posix_fadvise" = xyes then : printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" if test "x$ac_cv_func_asprintf" = xyes then : printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes then : printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" if test "x$ac_cv_func_vasprintf" = xyes then : printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" if test "x$ac_cv_func_vsnprintf" = xyes then : printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "va_copy" "ac_cv_func_va_copy" if test "x$ac_cv_func_va_copy" = xyes then : printf "%s\n" "#define HAVE_VA_COPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "__va_copy" "ac_cv_func___va_copy" if test "x$ac_cv_func___va_copy" = xyes then : printf "%s\n" "#define HAVE___VA_COPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sigabbrev_np" "ac_cv_func_sigabbrev_np" if test "x$ac_cv_func_sigabbrev_np" = xyes then : printf "%s\n" "#define HAVE_SIGABBREV_NP 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default" if test "x$ac_cv_header_sys_prctl_h" = xyes then : printf "%s\n" "#define HAVE_SYS_PRCTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes then : printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = xyes then : printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes then : printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default" if test "x$ac_cv_header_ctype_h" = xyes then : printf "%s\n" "#define HAVE_CTYPE_H 1" >>confdefs.h fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpcre2-8" >&5 printf %s "checking for libpcre2-8... " >&6; } if test -n "$PCRE2_CFLAGS"; then pkg_cv_PCRE2_CFLAGS="$PCRE2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCRE2_CFLAGS=`$PKG_CONFIG --cflags "libpcre2-8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PCRE2_LIBS"; then pkg_cv_PCRE2_LIBS="$PCRE2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCRE2_LIBS=`$PKG_CONFIG --libs "libpcre2-8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PCRE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre2-8" 2>&1` else PCRE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre2-8" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PCRE2_PKG_ERRORS" >&5 as_fn_error $? "libpcre2-8 not found by pkg-config - Try to add directory containing libpcre2-8.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libpcre2-8 not found by pkg-config - Try to add directory containing libpcre2-8.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else PCRE2_CFLAGS=$pkg_cv_PCRE2_CFLAGS PCRE2_LIBS=$pkg_cv_PCRE2_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpcre2-8" >&5 printf %s "checking for libpcre2-8... " >&6; } if test -n "$PCRE2_CFLAGS"; then pkg_cv_PCRE2_CFLAGS="$PCRE2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCRE2_CFLAGS=`$PKG_CONFIG --cflags "libpcre2-8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PCRE2_LIBS"; then pkg_cv_PCRE2_LIBS="$PCRE2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCRE2_LIBS=`$PKG_CONFIG --libs "libpcre2-8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PCRE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre2-8" 2>&1` else PCRE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre2-8" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PCRE2_PKG_ERRORS" >&5 as_fn_error $? "libpcre2-8 not found by pkg-config - Try to add directory containing libpcre2-8.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libpcre2-8 not found by pkg-config - Try to add directory containing libpcre2-8.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else PCRE2_CFLAGS=$pkg_cv_PCRE2_CFLAGS PCRE2_LIBS=$pkg_cv_PCRE2_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi compoptionstring="${compoptionstring}use pcre2: mandatory\\n" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 else case e in #( e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : break fi done ac_cv_prog_CPP=$CPP ;; esac fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See 'config.log' for more details" "$LINENO" 5; } ;; esac fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 printf %s "checking for egrep -e... " >&6; } if test ${ac_cv_path_EGREP_TRADITIONAL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then : fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi if test "$ac_cv_path_EGREP_TRADITIONAL" then : ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on Tru64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then ax_pthread_save_CC="$CC" ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" if test "x$PTHREAD_CC" != "x" then : CC="$PTHREAD_CC" fi if test "x$PTHREAD_CXX" != "x" then : CXX="$PTHREAD_CXX" fi CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char pthread_join (void); int main (void) { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 printf "%s\n" "$ax_pthread_ok" >&6; } if test "x$ax_pthread_ok" = "xno"; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi CC="$ax_pthread_save_CC" CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items with a "," contain both # C compiler flags (before ",") and linker flags (after ","). Other items # starting with a "-" are C compiler flags, and remaining items are # library names, except for "none" which indicates that we try without # any flags at all, and "pthread-config" which is a program returning # the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 # (Note: HP C rejects this with "bad form for `-t' option") # -pthreads: Solaris/gcc (Note: HP C also rejects) # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads and # -D_REENTRANT too), HP C (must be checked before -lpthread, which # is present but should not be used directly; and before -mthreads, # because the compiler interprets this as "-mt" + "-hreads") # -mthreads: Mingw32/gcc, Lynx/gcc # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case $host_os in freebsd*) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) ax_pthread_flags="-kthread lthread $ax_pthread_flags" ;; hpux*) # From the cc(1) man page: "[-mt] Sets various -D flags to enable # multi-threading and also sets -lpthread." ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" ;; openedition*) # IBM z/OS requires a feature-test macro to be defined in order to # enable POSIX threads at all, so give the user a hint if this is # not set. (We don't define these ourselves, as they can affect # other portions of the system API in unpredictable ways.) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) AX_PTHREAD_ZOS_MISSING # endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} fi rm -rf conftest* ;; solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (N.B.: The stubs are missing # pthread_cleanup_push, or rather a function called by this macro, # so we could check for that, but who knows whether they'll stub # that too in a future libc.) So we'll check first for the # standard Solaris way of linking pthreads (-mt -lpthread). ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" ;; esac # Are we compiling with Clang? { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 printf %s "checking whether $CC is Clang... " >&6; } if test ${ax_cv_PTHREAD_CLANG+y} then : printf %s "(cached) " >&6 else case e in #( e) ax_cv_PTHREAD_CLANG=no # Note that Autoconf sets GCC=yes for Clang as well as GCC if test "x$GCC" = "xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ # if defined(__clang__) && defined(__llvm__) AX_PTHREAD_CC_IS_CLANG # endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 then : ax_cv_PTHREAD_CLANG=yes fi rm -rf conftest* fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; } ax_pthread_clang="$ax_cv_PTHREAD_CLANG" # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) # Note that for GCC and Clang -pthread generally implies -lpthread, # except when -nostdlib is passed. # This is problematic using libtool to build C++ shared libraries with pthread: # [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 # [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 # [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 # To solve this, first try -pthread together with -lpthread for GCC if test "x$GCC" = "xyes" then : ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags" fi # Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first if test "x$ax_pthread_clang" = "xyes" then : ax_pthread_flags="-pthread,-lpthread -pthread" fi # The presence of a feature test macro requesting re-entrant function # definitions is, on some systems, a strong hint that pthreads support is # correctly enabled case $host_os in darwin* | hpux* | linux* | osf* | solaris*) ax_pthread_check_macro="_REENTRANT" ;; aix*) ax_pthread_check_macro="_THREAD_SAFE" ;; *) ax_pthread_check_macro="--" ;; esac if test "x$ax_pthread_check_macro" = "x--" then : ax_pthread_check_cond=0 else case e in #( e) ax_pthread_check_cond="!defined($ax_pthread_check_macro)" ;; esac fi if test "x$ax_pthread_ok" = "xno"; then for ax_pthread_try_flag in $ax_pthread_flags; do case $ax_pthread_try_flag in none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 printf %s "checking whether pthreads work without any flags... " >&6; } ;; *,*) PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5 printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; } ;; -*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } PTHREAD_CFLAGS="$ax_pthread_try_flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ax_pthread_config+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ax_pthread_config"; then ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ax_pthread_config="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" fi ;; esac fi ax_pthread_config=$ac_cv_prog_ax_pthread_config if test -n "$ax_pthread_config"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 printf "%s\n" "$ax_pthread_config" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ax_pthread_config" = "xno" then : continue fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } PTHREAD_LIBS="-l$ax_pthread_try_flag" ;; esac ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include # if $ax_pthread_check_cond # error "$ax_pthread_check_macro must be defined" # endif static void *some_global = NULL; static void routine(void *a) { /* To avoid any unused-parameter or unused-but-set-parameter warning. */ some_global = a; } static void *start_routine(void *a) { return a; } int main (void) { pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); pthread_join(th, 0); pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 printf "%s\n" "$ax_pthread_ok" >&6; } if test "x$ax_pthread_ok" = "xyes" then : break fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Clang needs special handling, because older versions handle the -pthread # option in a rather... idiosyncratic way if test "x$ax_pthread_clang" = "xyes"; then # Clang takes -pthread; it has never supported any other flag # (Note 1: This will need to be revisited if a system that Clang # supports has POSIX threads in a separate library. This tends not # to be the way of modern systems, but it's conceivable.) # (Note 2: On some systems, notably Darwin, -pthread is not needed # to get POSIX threads support; the API is always present and # active. We could reasonably leave PTHREAD_CFLAGS empty. But # -pthread does define _REENTRANT, and while the Darwin headers # ignore this macro, third-party headers might not.) # However, older versions of Clang make a point of warning the user # that, in an invocation where only linking and no compilation is # taking place, the -pthread option has no effect ("argument unused # during compilation"). They expect -pthread to be passed in only # when source code is being compiled. # # Problem is, this is at odds with the way Automake and most other # C build frameworks function, which is that the same flags used in # compilation (CFLAGS) are also used in linking. Many systems # supported by AX_PTHREAD require exactly this for POSIX threads # support, and in fact it is often not straightforward to specify a # flag that is used only in the compilation phase and not in # linking. Such a scenario is extremely rare in practice. # # Even though use of the -pthread flag in linking would only print # a warning, this can be a nuisance for well-run software projects # that build with -Werror. So if the active version of Clang has # this misfeature, we search for an option to squash it. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y} then : printf %s "(cached) " >&6 else case e in #( e) ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown # Create an alternate version of $ac_link that compiles and # links in two steps (.c -> .o, .o -> exe) instead of one # (.c -> exe), because the warning occurs only in the second # step ax_pthread_save_ac_link="$ac_link" ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"` ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" ax_pthread_save_CFLAGS="$CFLAGS" for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do if test "x$ax_pthread_try" = "xunknown" then : break fi CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" ac_link="$ax_pthread_save_ac_link" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_link="$ax_pthread_2step_ac_link" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO" then : break fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done ac_link="$ax_pthread_save_ac_link" CFLAGS="$ax_pthread_save_CFLAGS" if test "x$ax_pthread_try" = "x" then : ax_pthread_try=no fi ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in no | unknown) ;; *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; esac fi # $ax_pthread_clang = yes # Various other checks: if test "x$ax_pthread_ok" = "xyes"; then ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 printf %s "checking for joinable pthread attribute... " >&6; } if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y} then : printf %s "(cached) " >&6 else case e in #( e) ax_cv_PTHREAD_JOINABLE_ATTR=unknown for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int attr = $ax_pthread_attr; return attr /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ test "x$ax_pthread_joinable_attr_defined" != "xyes" then : printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h ax_pthread_joinable_attr_defined=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 printf %s "checking whether more special flags are required for pthreads... " >&6; } if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y} then : printf %s "(cached) " >&6 else case e in #( e) ax_cv_PTHREAD_SPECIAL_FLAGS=no case $host_os in solaris*) ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" ;; esac ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ test "x$ax_pthread_special_flags_added" != "xyes" then : PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" ax_pthread_special_flags_added=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int i = PTHREAD_PRIO_INHERIT; return i; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_cv_PTHREAD_PRIO_INHERIT=yes else case e in #( e) ax_cv_PTHREAD_PRIO_INHERIT=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ test "x$ax_pthread_prio_inherit_defined" != "xyes" then : printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h ax_pthread_prio_inherit_defined=yes fi CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" # More AIX lossage: compile with *_r variant if test "x$GCC" != "xyes"; then case $host_os in aix*) case "x/$CC" in #( x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : #handle absolute path differently from PATH based program lookup case "x$CC" in #( x/*) : if as_fn_executable_p ${CC}_r then : PTHREAD_CC="${CC}_r" fi if test "x${CXX}" != "x" then : if as_fn_executable_p ${CXX}_r then : PTHREAD_CXX="${CXX}_r" fi fi ;; #( *) : for ac_prog in ${CC}_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PTHREAD_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 printf "%s\n" "$PTHREAD_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$PTHREAD_CC" && break done test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" if test "x${CXX}" != "x" then : for ac_prog in ${CXX}_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PTHREAD_CXX+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$PTHREAD_CXX"; then ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CXX="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX if test -n "$PTHREAD_CXX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5 printf "%s\n" "$PTHREAD_CXX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$PTHREAD_CXX" && break done test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" fi ;; esac ;; #( *) : ;; esac ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "x$ax_pthread_ok" = "xyes"; then compoptionstring="${compoptionstring}use pthread: mandatory\\n" : else ax_pthread_ok=no as_fn_error $? "AIDE requires pthread" "$LINENO" 5 fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --with-fstype was given. if test ${with_fstype+y} then : withval=$with_fstype; with_fstype=$withval else case e in #( e) with_fstype=yes ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fstype support (Linux only)" >&5 printf %s "checking for fstype support (Linux only)... " >&6; } case "${target_os}" in linux*) if test "x$with_fstype" != xno; then printf "%s\n" "#define HAVE_FSTYPE 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_fstype" >&5 printf "%s\n" "$with_fstype" >&6; }; ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }; ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib compression" >&5 printf %s "checking for zlib compression... " >&6; } # Check whether --with-zlib was given. if test ${with_zlib+y} then : withval=$with_zlib; with_zlib=$withval else case e in #( e) with_zlib=yes ;; esac fi if test x"$with_zlib" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib " >&5 printf %s "checking for zlib ... " >&6; } if test -n "$ZLIB_CFLAGS"; then pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib \""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$ZLIB_LIBS"; then pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib \""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib " 2>&1` else ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ZLIB_PKG_ERRORS" >&5 as_fn_error $? "zlib not found by pkg-config - Try --without-zlib or add directory containing zlib.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "zlib not found by pkg-config - Try --without-zlib or add directory containing zlib.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS ZLIB_LIBS=$pkg_cv_ZLIB_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib " >&5 printf %s "checking for zlib ... " >&6; } if test -n "$ZLIB_CFLAGS"; then pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib \""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$ZLIB_LIBS"; then pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib \""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib " 2>&1` else ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ZLIB_PKG_ERRORS" >&5 as_fn_error $? "zlib not found by pkg-config - Try --without-zlib or add directory containing zlib.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "zlib not found by pkg-config - Try --without-zlib or add directory containing zlib.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS ZLIB_LIBS=$pkg_cv_ZLIB_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi printf "%s\n" "#define WITH_ZLIB 1" >>confdefs.h if test -n ; then aideextragroups="${aideextragroups}+" fi else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi compoptionstring="${compoptionstring}use zlib compression: $with_zlib\\n" if test "x$ZLIB_LIBS" != "x"; then HAVE_ZLIB_TRUE= HAVE_ZLIB_FALSE='#' else HAVE_ZLIB_TRUE='#' HAVE_ZLIB_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACLs" >&5 printf %s "checking for POSIX ACLs... " >&6; } # Check whether --with-posix-acl was given. if test ${with_posix_acl+y} then : withval=$with_posix_acl; with_libacl=$withval else case e in #( e) with_libacl=no ;; esac fi if test x"$with_libacl" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libacl " >&5 printf %s "checking for libacl ... " >&6; } if test -n "$POSIX_ACL_CFLAGS"; then pkg_cv_POSIX_ACL_CFLAGS="$POSIX_ACL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libacl \""; } >&5 ($PKG_CONFIG --exists --print-errors "libacl ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_POSIX_ACL_CFLAGS=`$PKG_CONFIG --cflags "libacl " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$POSIX_ACL_LIBS"; then pkg_cv_POSIX_ACL_LIBS="$POSIX_ACL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libacl \""; } >&5 ($PKG_CONFIG --exists --print-errors "libacl ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_POSIX_ACL_LIBS=`$PKG_CONFIG --libs "libacl " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then POSIX_ACL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libacl " 2>&1` else POSIX_ACL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libacl " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$POSIX_ACL_PKG_ERRORS" >&5 as_fn_error $? "libacl not found by pkg-config - Try --without-posix-acl or add directory containing libacl.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libacl not found by pkg-config - Try --without-posix-acl or add directory containing libacl.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else POSIX_ACL_CFLAGS=$pkg_cv_POSIX_ACL_CFLAGS POSIX_ACL_LIBS=$pkg_cv_POSIX_ACL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libacl " >&5 printf %s "checking for libacl ... " >&6; } if test -n "$POSIX_ACL_CFLAGS"; then pkg_cv_POSIX_ACL_CFLAGS="$POSIX_ACL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libacl \""; } >&5 ($PKG_CONFIG --exists --print-errors "libacl ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_POSIX_ACL_CFLAGS=`$PKG_CONFIG --cflags "libacl " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$POSIX_ACL_LIBS"; then pkg_cv_POSIX_ACL_LIBS="$POSIX_ACL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libacl \""; } >&5 ($PKG_CONFIG --exists --print-errors "libacl ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_POSIX_ACL_LIBS=`$PKG_CONFIG --libs "libacl " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then POSIX_ACL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libacl " 2>&1` else POSIX_ACL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libacl " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$POSIX_ACL_PKG_ERRORS" >&5 as_fn_error $? "libacl not found by pkg-config - Try --without-posix-acl or add directory containing libacl.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libacl not found by pkg-config - Try --without-posix-acl or add directory containing libacl.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else POSIX_ACL_CFLAGS=$pkg_cv_POSIX_ACL_CFLAGS POSIX_ACL_LIBS=$pkg_cv_POSIX_ACL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi printf "%s\n" "#define WITH_POSIX_ACL 1" >>confdefs.h if test -n acl; then aideextragroups="${aideextragroups}+acl" fi else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi compoptionstring="${compoptionstring}use POSIX ACLs: $with_libacl\\n" if test "x$POSIX_ACL_LIBS" != "x"; then HAVE_POSIX_ACL_TRUE= HAVE_POSIX_ACL_FALSE='#' else HAVE_POSIX_ACL_TRUE='#' HAVE_POSIX_ACL_FALSE= fi if test "x$with_libacl" = xyes; then printf "%s\n" "#define WITH_ACL 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SELinux" >&5 printf %s "checking for SELinux... " >&6; } # Check whether --with-selinux was given. if test ${with_selinux+y} then : withval=$with_selinux; with_libselinux=$withval else case e in #( e) with_libselinux=no ;; esac fi if test x"$with_libselinux" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libselinux >= 3.4" >&5 printf %s "checking for libselinux >= 3.4... " >&6; } if test -n "$SELINUX_CFLAGS"; then pkg_cv_SELINUX_CFLAGS="$SELINUX_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux >= 3.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libselinux >= 3.4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SELINUX_CFLAGS=`$PKG_CONFIG --cflags "libselinux >= 3.4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SELINUX_LIBS"; then pkg_cv_SELINUX_LIBS="$SELINUX_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux >= 3.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libselinux >= 3.4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SELINUX_LIBS=`$PKG_CONFIG --libs "libselinux >= 3.4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SELINUX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libselinux >= 3.4" 2>&1` else SELINUX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libselinux >= 3.4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SELINUX_PKG_ERRORS" >&5 as_fn_error $? "libselinux >= 3.4 not found by pkg-config - Try --without-selinux or add directory containing libselinux.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libselinux >= 3.4 not found by pkg-config - Try --without-selinux or add directory containing libselinux.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else SELINUX_CFLAGS=$pkg_cv_SELINUX_CFLAGS SELINUX_LIBS=$pkg_cv_SELINUX_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libselinux >= 3.4" >&5 printf %s "checking for libselinux >= 3.4... " >&6; } if test -n "$SELINUX_CFLAGS"; then pkg_cv_SELINUX_CFLAGS="$SELINUX_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux >= 3.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libselinux >= 3.4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SELINUX_CFLAGS=`$PKG_CONFIG --cflags "libselinux >= 3.4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SELINUX_LIBS"; then pkg_cv_SELINUX_LIBS="$SELINUX_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux >= 3.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libselinux >= 3.4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SELINUX_LIBS=`$PKG_CONFIG --libs "libselinux >= 3.4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SELINUX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libselinux >= 3.4" 2>&1` else SELINUX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libselinux >= 3.4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SELINUX_PKG_ERRORS" >&5 as_fn_error $? "libselinux >= 3.4 not found by pkg-config - Try --without-selinux or add directory containing libselinux.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libselinux >= 3.4 not found by pkg-config - Try --without-selinux or add directory containing libselinux.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else SELINUX_CFLAGS=$pkg_cv_SELINUX_CFLAGS SELINUX_LIBS=$pkg_cv_SELINUX_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi printf "%s\n" "#define WITH_SELINUX 1" >>confdefs.h if test -n selinux; then aideextragroups="${aideextragroups}+selinux" fi else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi compoptionstring="${compoptionstring}use SELinux: $with_libselinux\\n" if test "x$SELINUX_LIBS" != "x"; then HAVE_SELINUX_TRUE= HAVE_SELINUX_FALSE='#' else HAVE_SELINUX_TRUE='#' HAVE_SELINUX_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xattr" >&5 printf %s "checking for xattr... " >&6; } # Check whether --with-xattr was given. if test ${with_xattr+y} then : withval=$with_xattr; with_libattr=$withval else case e in #( e) with_libattr=no ;; esac fi if test x"$with_libattr" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libattr " >&5 printf %s "checking for libattr ... " >&6; } if test -n "$XATTR_CFLAGS"; then pkg_cv_XATTR_CFLAGS="$XATTR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libattr \""; } >&5 ($PKG_CONFIG --exists --print-errors "libattr ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XATTR_CFLAGS=`$PKG_CONFIG --cflags "libattr " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XATTR_LIBS"; then pkg_cv_XATTR_LIBS="$XATTR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libattr \""; } >&5 ($PKG_CONFIG --exists --print-errors "libattr ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XATTR_LIBS=`$PKG_CONFIG --libs "libattr " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XATTR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libattr " 2>&1` else XATTR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libattr " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XATTR_PKG_ERRORS" >&5 as_fn_error $? "libattr not found by pkg-config - Try --without-xattr or add directory containing libattr.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libattr not found by pkg-config - Try --without-xattr or add directory containing libattr.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else XATTR_CFLAGS=$pkg_cv_XATTR_CFLAGS XATTR_LIBS=$pkg_cv_XATTR_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libattr " >&5 printf %s "checking for libattr ... " >&6; } if test -n "$XATTR_CFLAGS"; then pkg_cv_XATTR_CFLAGS="$XATTR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libattr \""; } >&5 ($PKG_CONFIG --exists --print-errors "libattr ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XATTR_CFLAGS=`$PKG_CONFIG --cflags "libattr " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XATTR_LIBS"; then pkg_cv_XATTR_LIBS="$XATTR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libattr \""; } >&5 ($PKG_CONFIG --exists --print-errors "libattr ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XATTR_LIBS=`$PKG_CONFIG --libs "libattr " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XATTR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libattr " 2>&1` else XATTR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libattr " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XATTR_PKG_ERRORS" >&5 as_fn_error $? "libattr not found by pkg-config - Try --without-xattr or add directory containing libattr.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libattr not found by pkg-config - Try --without-xattr or add directory containing libattr.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else XATTR_CFLAGS=$pkg_cv_XATTR_CFLAGS XATTR_LIBS=$pkg_cv_XATTR_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi printf "%s\n" "#define WITH_XATTR 1" >>confdefs.h if test -n xattrs; then aideextragroups="${aideextragroups}+xattrs" fi else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi compoptionstring="${compoptionstring}use xattr: $with_libattr\\n" if test "x$XATTR_LIBS" != "x"; then HAVE_XATTR_TRUE= HAVE_XATTR_FALSE='#' else HAVE_XATTR_TRUE='#' HAVE_XATTR_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX 1003.1e capabilities" >&5 printf %s "checking for POSIX 1003.1e capabilities... " >&6; } # Check whether --with-capabilities was given. if test ${with_capabilities+y} then : withval=$with_capabilities; with_libcap=$withval else case e in #( e) with_libcap=no ;; esac fi if test x"$with_libcap" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcap " >&5 printf %s "checking for libcap ... " >&6; } if test -n "$CAPABILITIES_CFLAGS"; then pkg_cv_CAPABILITIES_CFLAGS="$CAPABILITIES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcap \""; } >&5 ($PKG_CONFIG --exists --print-errors "libcap ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAPABILITIES_CFLAGS=`$PKG_CONFIG --cflags "libcap " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CAPABILITIES_LIBS"; then pkg_cv_CAPABILITIES_LIBS="$CAPABILITIES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcap \""; } >&5 ($PKG_CONFIG --exists --print-errors "libcap ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAPABILITIES_LIBS=`$PKG_CONFIG --libs "libcap " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CAPABILITIES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcap " 2>&1` else CAPABILITIES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcap " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CAPABILITIES_PKG_ERRORS" >&5 as_fn_error $? "libcap not found by pkg-config - Try --without-capabilities or add directory containing libcap.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libcap not found by pkg-config - Try --without-capabilities or add directory containing libcap.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else CAPABILITIES_CFLAGS=$pkg_cv_CAPABILITIES_CFLAGS CAPABILITIES_LIBS=$pkg_cv_CAPABILITIES_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcap " >&5 printf %s "checking for libcap ... " >&6; } if test -n "$CAPABILITIES_CFLAGS"; then pkg_cv_CAPABILITIES_CFLAGS="$CAPABILITIES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcap \""; } >&5 ($PKG_CONFIG --exists --print-errors "libcap ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAPABILITIES_CFLAGS=`$PKG_CONFIG --cflags "libcap " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CAPABILITIES_LIBS"; then pkg_cv_CAPABILITIES_LIBS="$CAPABILITIES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcap \""; } >&5 ($PKG_CONFIG --exists --print-errors "libcap ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAPABILITIES_LIBS=`$PKG_CONFIG --libs "libcap " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CAPABILITIES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcap " 2>&1` else CAPABILITIES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcap " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CAPABILITIES_PKG_ERRORS" >&5 as_fn_error $? "libcap not found by pkg-config - Try --without-capabilities or add directory containing libcap.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libcap not found by pkg-config - Try --without-capabilities or add directory containing libcap.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else CAPABILITIES_CFLAGS=$pkg_cv_CAPABILITIES_CFLAGS CAPABILITIES_LIBS=$pkg_cv_CAPABILITIES_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi printf "%s\n" "#define WITH_CAPABILITIES 1" >>confdefs.h if test -n caps; then aideextragroups="${aideextragroups}+caps" fi else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi compoptionstring="${compoptionstring}use POSIX 1003.1e capabilities: $with_libcap\\n" if test "x$CAPABILITIES_LIBS" != "x"; then HAVE_CAPABILITIES_TRUE= HAVE_CAPABILITIES_FALSE='#' else HAVE_CAPABILITIES_TRUE='#' HAVE_CAPABILITIES_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for e2fsattrs" >&5 printf %s "checking for e2fsattrs... " >&6; } # Check whether --with-e2fsattrs was given. if test ${with_e2fsattrs+y} then : withval=$with_e2fsattrs; with_e2p=$withval else case e in #( e) with_e2p=no ;; esac fi if test x"$with_e2p" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for e2p " >&5 printf %s "checking for e2p ... " >&6; } if test -n "$E2FSATTRS_CFLAGS"; then pkg_cv_E2FSATTRS_CFLAGS="$E2FSATTRS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"e2p \""; } >&5 ($PKG_CONFIG --exists --print-errors "e2p ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_E2FSATTRS_CFLAGS=`$PKG_CONFIG --cflags "e2p " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$E2FSATTRS_LIBS"; then pkg_cv_E2FSATTRS_LIBS="$E2FSATTRS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"e2p \""; } >&5 ($PKG_CONFIG --exists --print-errors "e2p ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_E2FSATTRS_LIBS=`$PKG_CONFIG --libs "e2p " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then E2FSATTRS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "e2p " 2>&1` else E2FSATTRS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "e2p " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$E2FSATTRS_PKG_ERRORS" >&5 as_fn_error $? "e2p not found by pkg-config - Try --without-e2fsattrs or add directory containing e2p.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "e2p not found by pkg-config - Try --without-e2fsattrs or add directory containing e2p.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else E2FSATTRS_CFLAGS=$pkg_cv_E2FSATTRS_CFLAGS E2FSATTRS_LIBS=$pkg_cv_E2FSATTRS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for e2p " >&5 printf %s "checking for e2p ... " >&6; } if test -n "$E2FSATTRS_CFLAGS"; then pkg_cv_E2FSATTRS_CFLAGS="$E2FSATTRS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"e2p \""; } >&5 ($PKG_CONFIG --exists --print-errors "e2p ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_E2FSATTRS_CFLAGS=`$PKG_CONFIG --cflags "e2p " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$E2FSATTRS_LIBS"; then pkg_cv_E2FSATTRS_LIBS="$E2FSATTRS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"e2p \""; } >&5 ($PKG_CONFIG --exists --print-errors "e2p ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_E2FSATTRS_LIBS=`$PKG_CONFIG --libs "e2p " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then E2FSATTRS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "e2p " 2>&1` else E2FSATTRS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "e2p " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$E2FSATTRS_PKG_ERRORS" >&5 as_fn_error $? "e2p not found by pkg-config - Try --without-e2fsattrs or add directory containing e2p.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "e2p not found by pkg-config - Try --without-e2fsattrs or add directory containing e2p.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else E2FSATTRS_CFLAGS=$pkg_cv_E2FSATTRS_CFLAGS E2FSATTRS_LIBS=$pkg_cv_E2FSATTRS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi printf "%s\n" "#define WITH_E2FSATTRS 1" >>confdefs.h if test -n e2fsattrs; then aideextragroups="${aideextragroups}+e2fsattrs" fi else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi compoptionstring="${compoptionstring}use e2fsattrs: $with_e2p\\n" if test "x$E2FSATTRS_LIBS" != "x"; then HAVE_E2FSATTRS_TRUE= HAVE_E2FSATTRS_FALSE='#' else HAVE_E2FSATTRS_TRUE='#' HAVE_E2FSATTRS_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cURL" >&5 printf %s "checking for cURL... " >&6; } # Check whether --with-curl was given. if test ${with_curl+y} then : withval=$with_curl; with_libcurl=$withval else case e in #( e) with_libcurl=no ;; esac fi if test x"$with_libcurl" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcurl " >&5 printf %s "checking for libcurl ... " >&6; } if test -n "$CURL_CFLAGS"; then pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl \""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CURL_LIBS"; then pkg_cv_CURL_LIBS="$CURL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl \""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl " 2>&1` else CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CURL_PKG_ERRORS" >&5 as_fn_error $? "libcurl not found by pkg-config - Try --without-curl or add directory containing libcurl.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libcurl not found by pkg-config - Try --without-curl or add directory containing libcurl.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else CURL_CFLAGS=$pkg_cv_CURL_CFLAGS CURL_LIBS=$pkg_cv_CURL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcurl " >&5 printf %s "checking for libcurl ... " >&6; } if test -n "$CURL_CFLAGS"; then pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl \""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CURL_LIBS"; then pkg_cv_CURL_LIBS="$CURL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl \""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl " 2>&1` else CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CURL_PKG_ERRORS" >&5 as_fn_error $? "libcurl not found by pkg-config - Try --without-curl or add directory containing libcurl.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "libcurl not found by pkg-config - Try --without-curl or add directory containing libcurl.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else CURL_CFLAGS=$pkg_cv_CURL_CFLAGS CURL_LIBS=$pkg_cv_CURL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi printf "%s\n" "#define WITH_CURL 1" >>confdefs.h if test -n ; then aideextragroups="${aideextragroups}+" fi else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi compoptionstring="${compoptionstring}use cURL: $with_libcurl\\n" if test "x$CURL_LIBS" != "x"; then HAVE_CURL_TRUE= HAVE_CURL_FALSE='#' else HAVE_CURL_TRUE='#' HAVE_CURL_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Nettle" >&5 printf %s "checking for Nettle... " >&6; } # Check whether --with-nettle was given. if test ${with_nettle+y} then : withval=$with_nettle; with_nettle=$withval else case e in #( e) with_nettle=check ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_nettle" >&5 printf "%s\n" "$with_nettle" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU crypto library" >&5 printf %s "checking for GNU crypto library... " >&6; } # Check whether --with-gcrypt was given. if test ${with_gcrypt+y} then : withval=$with_gcrypt; with_gcrypt=$withval else case e in #( e) with_gcrypt=check ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_gcrypt" >&5 printf "%s\n" "$with_gcrypt" >&6; } if test x"$with_nettle" != xno then : if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle >= 3.7" >&5 printf %s "checking for nettle >= 3.7... " >&6; } if test -n "$NETTLE_CFLAGS"; then pkg_cv_NETTLE_CFLAGS="$NETTLE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle >= 3.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "nettle >= 3.7") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NETTLE_CFLAGS=`$PKG_CONFIG --cflags "nettle >= 3.7" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$NETTLE_LIBS"; then pkg_cv_NETTLE_LIBS="$NETTLE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle >= 3.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "nettle >= 3.7") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NETTLE_LIBS=`$PKG_CONFIG --libs "nettle >= 3.7" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then NETTLE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "nettle >= 3.7" 2>&1` else NETTLE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "nettle >= 3.7" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$NETTLE_PKG_ERRORS" >&5 if test x"$with_nettle" = xyes then : as_fn_error $? "nettle >= 3.7 not found by pkg-config - Try to add directory containing nettle.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 fi with_nettle=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if test x"$with_nettle" = xyes then : as_fn_error $? "nettle >= 3.7 not found by pkg-config - Try to add directory containing nettle.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 fi with_nettle=no else NETTLE_CFLAGS=$pkg_cv_NETTLE_CFLAGS NETTLE_LIBS=$pkg_cv_NETTLE_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } with_nettle=yes fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle >= 3.7" >&5 printf %s "checking for nettle >= 3.7... " >&6; } if test -n "$NETTLE_CFLAGS"; then pkg_cv_NETTLE_CFLAGS="$NETTLE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle >= 3.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "nettle >= 3.7") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NETTLE_CFLAGS=`$PKG_CONFIG --cflags "nettle >= 3.7" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$NETTLE_LIBS"; then pkg_cv_NETTLE_LIBS="$NETTLE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle >= 3.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "nettle >= 3.7") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NETTLE_LIBS=`$PKG_CONFIG --libs "nettle >= 3.7" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then NETTLE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "nettle >= 3.7" 2>&1` else NETTLE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "nettle >= 3.7" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$NETTLE_PKG_ERRORS" >&5 if test x"$with_nettle" = xyes then : as_fn_error $? "nettle >= 3.7 not found by pkg-config - Try to add directory containing nettle.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 fi with_nettle=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if test x"$with_nettle" = xyes then : as_fn_error $? "nettle >= 3.7 not found by pkg-config - Try to add directory containing nettle.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 fi with_nettle=no else NETTLE_CFLAGS=$pkg_cv_NETTLE_CFLAGS NETTLE_LIBS=$pkg_cv_NETTLE_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } with_nettle=yes fi fi if test x"$with_nettle" = xyes then : printf "%s\n" "#define WITH_NETTLE 1" >>confdefs.h fi fi if test x"$with_nettle" = xyes then : if test x"$with_gcrypt" = xcheck then : with_gcrypt=no fi fi if test x"$with_gcrypt" != xno then : if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgcrypt " >&5 printf %s "checking for libgcrypt ... " >&6; } if test -n "$GCRYPT_CFLAGS"; then pkg_cv_GCRYPT_CFLAGS="$GCRYPT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgcrypt \""; } >&5 ($PKG_CONFIG --exists --print-errors "libgcrypt ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GCRYPT_CFLAGS=`$PKG_CONFIG --cflags "libgcrypt " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GCRYPT_LIBS"; then pkg_cv_GCRYPT_LIBS="$GCRYPT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgcrypt \""; } >&5 ($PKG_CONFIG --exists --print-errors "libgcrypt ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GCRYPT_LIBS=`$PKG_CONFIG --libs "libgcrypt " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GCRYPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libgcrypt " 2>&1` else GCRYPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libgcrypt " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GCRYPT_PKG_ERRORS" >&5 if test x"$with_gcrypt" = xyes then : as_fn_error $? "libgcrypt not found by pkg-config - Try to add directory containing libgcrypt.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 fi with_gcrypt=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if test x"$with_gcrypt" = xyes then : as_fn_error $? "libgcrypt not found by pkg-config - Try to add directory containing libgcrypt.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 fi with_gcrypt=no else GCRYPT_CFLAGS=$pkg_cv_GCRYPT_CFLAGS GCRYPT_LIBS=$pkg_cv_GCRYPT_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } with_gcrypt=yes fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgcrypt " >&5 printf %s "checking for libgcrypt ... " >&6; } if test -n "$GCRYPT_CFLAGS"; then pkg_cv_GCRYPT_CFLAGS="$GCRYPT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgcrypt \""; } >&5 ($PKG_CONFIG --exists --print-errors "libgcrypt ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GCRYPT_CFLAGS=`$PKG_CONFIG --cflags "libgcrypt " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GCRYPT_LIBS"; then pkg_cv_GCRYPT_LIBS="$GCRYPT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgcrypt \""; } >&5 ($PKG_CONFIG --exists --print-errors "libgcrypt ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GCRYPT_LIBS=`$PKG_CONFIG --libs "libgcrypt " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GCRYPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libgcrypt " 2>&1` else GCRYPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libgcrypt " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GCRYPT_PKG_ERRORS" >&5 if test x"$with_gcrypt" = xyes then : as_fn_error $? "libgcrypt not found by pkg-config - Try to add directory containing libgcrypt.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 fi with_gcrypt=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if test x"$with_gcrypt" = xyes then : as_fn_error $? "libgcrypt not found by pkg-config - Try to add directory containing libgcrypt.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 fi with_gcrypt=no else GCRYPT_CFLAGS=$pkg_cv_GCRYPT_CFLAGS GCRYPT_LIBS=$pkg_cv_GCRYPT_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } with_gcrypt=yes fi fi if test x"$with_gcrypt" = xyes then : printf "%s\n" "#define WITH_GCRYPT 1" >>confdefs.h fi fi if test x"$with_nettle" != xno && test x"$with_gcrypt" != xno then : as_fn_error $? "Using gcrypt together with Nettle makes no sense. To disable nettle use --without-nettle" "$LINENO" 5 fi if test x"$with_nettle" = xno && test x"$with_gcrypt" = xno then : as_fn_error $? "AIDE requires nettle or libcrypt for hashsum calculation" "$LINENO" 5 fi compoptionstring="${compoptionstring}use Nettle crypto library: $with_nettle\\n" if test "x$NETTLE_LIBS" != "x"; then HAVE_NETTLE_TRUE= HAVE_NETTLE_FALSE='#' else HAVE_NETTLE_TRUE='#' HAVE_NETTLE_FALSE= fi compoptionstring="${compoptionstring}use GNU crypto library: $with_gcrypt\\n" if test "x$GCRYPT_LIBS" != "x"; then HAVE_GCRYPT_TRUE= HAVE_GCRYPT_FALSE='#' else HAVE_GCRYPT_TRUE='#' HAVE_GCRYPT_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Linux Auditing Framework" >&5 printf %s "checking for Linux Auditing Framework... " >&6; } # Check whether --with-audit was given. if test ${with_audit+y} then : withval=$with_audit; with_audit=$withval else case e in #( e) with_audit=no ;; esac fi if test x"$with_audit" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } if test "$aide_static_choice" = "yes"; then _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for audit " >&5 printf %s "checking for audit ... " >&6; } if test -n "$AUDIT_CFLAGS"; then pkg_cv_AUDIT_CFLAGS="$AUDIT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"audit \""; } >&5 ($PKG_CONFIG --exists --print-errors "audit ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AUDIT_CFLAGS=`$PKG_CONFIG --cflags "audit " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$AUDIT_LIBS"; then pkg_cv_AUDIT_LIBS="$AUDIT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"audit \""; } >&5 ($PKG_CONFIG --exists --print-errors "audit ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AUDIT_LIBS=`$PKG_CONFIG --libs "audit " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then AUDIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "audit " 2>&1` else AUDIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "audit " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$AUDIT_PKG_ERRORS" >&5 as_fn_error $? "audit not found by pkg-config - Try --without-audit or add directory containing audit.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "audit not found by pkg-config - Try --without-audit or add directory containing audit.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else AUDIT_CFLAGS=$pkg_cv_AUDIT_CFLAGS AUDIT_LIBS=$pkg_cv_AUDIT_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi PKG_CONFIG=$_save_PKG_CONFIG else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for audit " >&5 printf %s "checking for audit ... " >&6; } if test -n "$AUDIT_CFLAGS"; then pkg_cv_AUDIT_CFLAGS="$AUDIT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"audit \""; } >&5 ($PKG_CONFIG --exists --print-errors "audit ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AUDIT_CFLAGS=`$PKG_CONFIG --cflags "audit " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$AUDIT_LIBS"; then pkg_cv_AUDIT_LIBS="$AUDIT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"audit \""; } >&5 ($PKG_CONFIG --exists --print-errors "audit ") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AUDIT_LIBS=`$PKG_CONFIG --libs "audit " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then AUDIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "audit " 2>&1` else AUDIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "audit " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$AUDIT_PKG_ERRORS" >&5 as_fn_error $? "audit not found by pkg-config - Try --without-audit or add directory containing audit.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "audit not found by pkg-config - Try --without-audit or add directory containing audit.pc to PKG_CONFIG_PATH environment variable" "$LINENO" 5 else AUDIT_CFLAGS=$pkg_cv_AUDIT_CFLAGS AUDIT_LIBS=$pkg_cv_AUDIT_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi printf "%s\n" "#define WITH_AUDIT 1" >>confdefs.h if test -n ; then aideextragroups="${aideextragroups}+" fi else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi compoptionstring="${compoptionstring}use Linux Auditing Framework: $with_audit\\n" if test "x$AUDIT_LIBS" != "x"; then HAVE_AUDIT_TRUE= HAVE_AUDIT_FALSE='#' else HAVE_AUDIT_TRUE='#' HAVE_AUDIT_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for locale" >&5 printf %s "checking for locale... " >&6; } # Check whether --with-locale was given. if test ${with_locale+y} then : withval=$with_locale; with_locale=$withval else case e in #( e) with_locale=no ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_locale" >&5 printf "%s\n" "$with_locale" >&6; } if test x"$with_locale" != xno then : for ac_header in libintl.h do : ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes then : printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h if test x"no" != xno then : printf "%s\n" "#define WITH_LOCALE 1" >>confdefs.h with_locale="yes" fi else case e in #( e) if test x"no" = xyes then : as_fn_error $? "headers libintl.h for locale not found" "$LINENO" 5 fi ;; esac fi done fi compoptionstring="${compoptionstring}use locale: $with_locale\\n" if test "x$with_locale" = "xyes"; then HAVE_LOCALE_TRUE= HAVE_LOCALE_FALSE='#' else HAVE_LOCALE_TRUE='#' HAVE_LOCALE_FALSE= fi if test "x$with_locale" = xyes; then printf "%s\n" "#define LOCALEDIR \"$prefix/lib/locale\"" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for syslog ident" >&5 printf %s "checking for syslog ident... " >&6; } # Check whether --with-syslog_ident was given. if test ${with_syslog_ident+y} then : withval=$with_syslog_ident; with_syslog_ident=$withval else case e in #( e) with_syslog_ident="aide" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_syslog_ident" >&5 printf "%s\n" "$with_syslog_ident" >&6; } compoptionstring="${compoptionstring}syslog ident: $with_syslog_ident\\n" printf "%s\n" "#define AIDE_IDENT \"$with_syslog_ident\"" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for syslog logopt" >&5 printf %s "checking for syslog logopt... " >&6; } # Check whether --with-syslog_logopt was given. if test ${with_syslog_logopt+y} then : withval=$with_syslog_logopt; with_syslog_logopt=$withval else case e in #( e) with_syslog_logopt=LOG_CONS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_syslog_logopt" >&5 printf "%s\n" "$with_syslog_logopt" >&6; } compoptionstring="${compoptionstring}syslog logopt: $with_syslog_logopt\\n" printf "%s\n" "#define AIDE_LOGOPT $with_syslog_logopt" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for syslog priority" >&5 printf %s "checking for syslog priority... " >&6; } # Check whether --with-syslog_priority was given. if test ${with_syslog_priority+y} then : withval=$with_syslog_priority; with_syslog_priority=$withval else case e in #( e) with_syslog_priority=LOG_NOTICE ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_syslog_priority" >&5 printf "%s\n" "$with_syslog_priority" >&6; } compoptionstring="${compoptionstring}syslog priority: $with_syslog_priority\\n" printf "%s\n" "#define AIDE_SYSLOG_PRIORITY $with_syslog_priority" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default syslog facility" >&5 printf %s "checking for default syslog facility... " >&6; } # Check whether --with-syslog_facility was given. if test ${with_syslog_facility+y} then : withval=$with_syslog_facility; with_syslog_facility=$withval else case e in #( e) with_syslog_facility=LOG_LOCAL0 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_syslog_facility" >&5 printf "%s\n" "$with_syslog_facility" >&6; } compoptionstring="${compoptionstring}default syslog facility: $with_syslog_facility\\n" printf "%s\n" "#define AIDE_SYSLOG_FACILITY $with_syslog_facility" >>confdefs.h pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for check >= 0.9.4" >&5 printf %s "checking for check >= 0.9.4... " >&6; } if test -n "$CHECK_CFLAGS"; then pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "check >= 0.9.4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CHECK_CFLAGS=`$PKG_CONFIG --cflags "check >= 0.9.4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CHECK_LIBS"; then pkg_cv_CHECK_LIBS="$CHECK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "check >= 0.9.4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CHECK_LIBS=`$PKG_CONFIG --libs "check >= 0.9.4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "check >= 0.9.4" 2>&1` else CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "check >= 0.9.4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CHECK_PKG_ERRORS" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Check not found (testing via 'make check' disabled)" >&5 printf "%s\n" "Check not found (testing via 'make check' disabled)" >&6; } elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Check not found (testing via 'make check' disabled)" >&5 printf "%s\n" "Check not found (testing via 'make check' disabled)" >&6; } else CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS CHECK_LIBS=$pkg_cv_CHECK_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi if test "x$CHECK_LIBS" != "x"; then HAVE_CHECK_TRUE= HAVE_CHECK_FALSE='#' else HAVE_CHECK_TRUE='#' HAVE_CHECK_FALSE= fi # Check whether --with-config_file was given. if test ${with_config_file+y} then : withval=$with_config_file; with_config_file=$withval else case e in #( e) with_config_file=yes ;; esac fi if test "$with_config_file" != "no"; then if test "$with_config_file" != "yes"; then config_file=$with_config_file else if test "x$sysconfdir" != x'${prefix}/etc'; then config_file=`eval echo "$sysconfdir/aide.conf"` elif test "x$prefix" != xNONE; then config_file="$prefix/etc/aide.conf" else config_file="$ac_default_prefix/etc/aide.conf" fi fi printf "%s\n" "#define CONFIG_FILE \"$config_file\"" >>confdefs.h fi # Check whether --enable-default_db was given. if test ${enable_default_db+y} then : enableval=$enable_default_db; enable_default_db=$enableval else case e in #( e) enable_default_db=yes ;; esac fi if test "$enable_default_db" = "yes"; then if test "x$sysconfdir" != x'${prefix}/etc'; then evalled_sysconfdir=`eval echo "$sysconfdir"` default_db="$evalled_sysconfdir/aide.db" default_db_out="$evalled_sysconfdir/aide.db.new" elif test "x$prefix" != xNONE; then default_db="$prefix/etc/aide.db" default_db_out="$prefix/etc/aide.db.new" else default_db="$ac_default_prefix/etc/aide.db" default_db_out="$ac_default_prefix/etc/aide.db.new" fi printf "%s\n" "#define DEFAULT_DB \"file:$default_db\"" >>confdefs.h printf "%s\n" "#define DEFAULT_DB_OUT \"file:$default_db_out\"" >>confdefs.h fi extrasub="s&@AIDEVERSION@&$PACKAGE_VERSION&;t t" printf "%s\n" "#define AIDECOMPILEOPTIONS \"${compoptionstring}\"" >>confdefs.h LDFLAGS="$LDFLAGS $LD_STATIC_FLAG $EXTRA_LDFLAGS" CFLAGS="$CFLAGS $EXTRA_CFLAGS" ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # 'ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; esac if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi # Check whether --enable-year2038 was given. if test ${enable_year2038+y} then : enableval=$enable_year2038; fi if test -z "${HAVE_ZLIB_TRUE}" && test -z "${HAVE_ZLIB_FALSE}"; then as_fn_error $? "conditional \"HAVE_ZLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_POSIX_ACL_TRUE}" && test -z "${HAVE_POSIX_ACL_FALSE}"; then as_fn_error $? "conditional \"HAVE_POSIX_ACL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SELINUX_TRUE}" && test -z "${HAVE_SELINUX_FALSE}"; then as_fn_error $? "conditional \"HAVE_SELINUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XATTR_TRUE}" && test -z "${HAVE_XATTR_FALSE}"; then as_fn_error $? "conditional \"HAVE_XATTR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CAPABILITIES_TRUE}" && test -z "${HAVE_CAPABILITIES_FALSE}"; then as_fn_error $? "conditional \"HAVE_CAPABILITIES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_E2FSATTRS_TRUE}" && test -z "${HAVE_E2FSATTRS_FALSE}"; then as_fn_error $? "conditional \"HAVE_E2FSATTRS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CURL_TRUE}" && test -z "${HAVE_CURL_FALSE}"; then as_fn_error $? "conditional \"HAVE_CURL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_NETTLE_TRUE}" && test -z "${HAVE_NETTLE_FALSE}"; then as_fn_error $? "conditional \"HAVE_NETTLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GCRYPT_TRUE}" && test -z "${HAVE_GCRYPT_FALSE}"; then as_fn_error $? "conditional \"HAVE_GCRYPT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_AUDIT_TRUE}" && test -z "${HAVE_AUDIT_FALSE}"; then as_fn_error $? "conditional \"HAVE_AUDIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCALE_TRUE}" && test -z "${HAVE_LOCALE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCALE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CHECK_TRUE}" && test -z "${HAVE_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAVE_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by aide $as_me 0.19, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ '$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ aide config.status 0.19 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: '$1' Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: '$1' Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See 'config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi aide-0.19/include/0000755000175000017500000000000014774244735007552 5aide-0.19/include/rx_rule.h0000644000175000017500000000532314774237261011322 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2006, 2016, 2020-2025 Rami Lehti, Pablo Virolainen, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _RX_RULE_H_INCLUDED #define _RX_RULE_H_INCLUDED #include "config.h" #include "file.h" #include #define PCRE2_CODE_UNIT_WIDTH 8 #include #include "attributes.h" typedef struct rx_restriction_t { FT_TYPE f_type; #ifdef HAVE_FSTYPE FS_TYPE fs_type; #endif } rx_restriction_t; typedef enum { AIDE_RECURSIVE_NEGATIVE_RULE=0, AIDE_NON_RECURSIVE_NEGATIVE_RULE=1, AIDE_SELECTIVE_RULE=2, AIDE_EQUAL_RULE=3, } AIDE_RULE_TYPE; typedef struct rx_rule { char* rx; /* Regular expression in text form */ pcre2_code* crx; /* Compiled regexp */ pcre2_match_data *md; AIDE_RULE_TYPE type; DB_ATTR_TYPE attr; /* Which attributes to save */ char *config_filename; int config_linenumber; char *config_line; char *prefix; rx_restriction_t restriction; } rx_rule; typedef enum match_result { RESULT_NO_RULE_MATCH = 0, RESULT_RECURSIVE_NEGATIVE_MATCH = (1<<0), RESULT_NON_RECURSIVE_NEGATIVE_MATCH = (1<<1), RESULT_SELECTIVE_MATCH = (1<<2), RESULT_EQUAL_MATCH = (1<<3), RESULT_PARTIAL_MATCH = (1<<4), RESULT_NO_LIMIT_MATCH = (1<<5), RESULT_PARTIAL_LIMIT_MATCH = (1<<6), RESULT_PART_LIMIT_AND_NO_RECURSE_MATCH = (1<<7), RESULT_NEGATIVE_PARENT_MATCH = (1<<8), } match_result; typedef struct match_t { match_result result; rx_rule* rule; int length; } match_t; char* get_rule_type_long_string(AIDE_RULE_TYPE); char* get_rule_type_char(AIDE_RULE_TYPE); /* memory for the returned string is obtained with malloc(3), and should be freed with free(3). */ char *get_restriction_string(rx_restriction_t); char *get_match_result_string(match_result); char *get_match_result_desc(match_result); #endif /* RX_RULE_H_INCLUDED */ aide-0.19/include/seltree.h0000644000175000017500000000264314767754737011325 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2010, 2020-2024 Rami Lehti, Pablo Virolainen, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _SELTREE_H_INCLUDED #define _SELTREE_H_INCLUDED #include "log.h" #include "file.h" #include "rx_rule.h" typedef struct seltree seltree; seltree* init_tree(void); seltree* get_seltree_node(seltree* ,char*); seltree* get_or_create_seltree_node(seltree*, char *); rx_rule * add_rx_to_tree(char *, rx_restriction_t, AIDE_RULE_TYPE, seltree *, int, char *, char *, char **); match_t check_seltree(seltree *, file_t, bool, const char *); void log_tree(LOG_LEVEL, seltree *, int); bool is_tree_empty(seltree *); #endif /* _SELTREE_H_INCLUDED*/ aide-0.19/include/report.h0000644000175000017500000001113514761146350011145 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2006, 2010, 2019-2025 Rami Lehti, Pablo Virolainen, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _REPORT_H_INCLUDED #define _REPORT_H_INCLUDED #include #include #include "attributes.h" #include "seltree.h" #include "config.h" #include "conf_ast.h" #include "log.h" #include "url.h" #include "db_line.h" /* report level */ typedef enum { /* preserve order */ REPORT_LEVEL_UNKNOWN = 0, REPORT_LEVEL_MINIMAL = 1, REPORT_LEVEL_SUMMARY = 2, REPORT_LEVEL_DATABASE_ATTRIBUTES = 3, REPORT_LEVEL_LIST_ENTRIES = 4, REPORT_LEVEL_CHANGED_ATTRIBUTES = 5, REPORT_LEVEL_ADDED_REMOVED_ATTRIBUTES = 6, REPORT_LEVEL_ADDED_REMOVED_ENTRIES = 7, } REPORT_LEVEL; /* report format */ typedef enum { REPORT_FORMAT_UNKNOWN = 0, REPORT_FORMAT_PLAIN = 1, REPORT_FORMAT_JSON = 2, } REPORT_FORMAT; extern const ATTRIBUTE report_attrs_order[]; extern int report_attrs_order_length; bool init_report_urls(void); bool add_report_url(url_t* url, int, char*, char*); REPORT_LEVEL get_report_level(char *); REPORT_FORMAT get_report_format(char *); void log_report_urls(LOG_LEVEL); /* * gen_report() * Generate report based on the given node */ int gen_report(seltree* node); typedef struct report_options { REPORT_LEVEL level; REPORT_FORMAT format; } report_options; extern report_options default_report_options; typedef struct diff_attrs_entry { char* entry; DB_ATTR_TYPE old_attrs; DB_ATTR_TYPE new_attrs; } diff_attrs_entry; typedef struct report_t { url_t* url; FILE* fd; REPORT_LEVEL level; REPORT_FORMAT format; int detailed_init; int base16; int quiet; int summarize_changes; int grouped; bool append; #ifdef WITH_E2FSATTRS long ignore_e2fsattrs; #endif DB_ATTR_TYPE ignore_added_attrs; DB_ATTR_TYPE ignore_removed_attrs; DB_ATTR_TYPE ignore_changed_attrs; DB_ATTR_TYPE force_attrs; long ntotal; long nadd, nrem, nchg; diff_attrs_entry *diff_attrs_entries; int num_diff_attrs_entries; int linenumber; char* filename; char* linebuf; } report_t; void report_printf(report_t*, const char*, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 2, 3))) #endif ; typedef struct report_format_module { void (*print_report_config_options)(report_t*); void (*print_report_databases)(report_t*); void (*print_report_details)(report_t*, seltree*); void (*print_report_diff_attrs_entries)(report_t*); void (*print_report_endtime_runtime)(report_t*, const char*, long); void (*print_report_entries)(report_t*, seltree*, const int); void (*print_report_footer)(report_t*); void (*print_report_header)(report_t*); void (*print_report_new_database_written)(report_t*); void (*print_report_outline)(report_t*); void (*print_report_report_options)(report_t*); void (*print_report_starttime_version)(report_t*, const char*, const char*); void (*print_report_summary)(report_t*); } report_format_module; char* get_file_type_string(mode_t); char* get_summarize_changes_string(report_t*, seltree*); char* get_summary_string(report_t*); const char* get_report_level_string(REPORT_LEVEL); int get_attribute_values(DB_ATTR_TYPE, db_line*,char* **, report_t*); void print_databases_attrs(report_t *, void (*)(report_t *, db_line*)); void print_dbline_attrs(report_t *, db_line*, db_line*, DB_ATTR_TYPE, void (*)(report_t *, db_line*, db_line*, ATTRIBUTE)); void print_report_config_options(report_t *, void (*)(report_t *, config_option, const char*)); void print_report_details(report_t *, seltree*, void (*)(report_t *, db_line*, db_line*, DB_ATTR_TYPE)); void print_report_entries(report_t*, seltree*, const int, void (*)(report_t*, char*, int, seltree*)); void print_report_report_options(report_t *, void (*)(report_t *, config_option, const char*)); #endif aide-0.19/include/progress.h0000644000175000017500000000232114774237261011501 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2023 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _PROGRESS_H_INCLUDED #define _PROGRESS_H_INCLUDED #include typedef enum progress_state { PROGRESS_NONE = 0, PROGRESS_CONFIG, PROGRESS_DISK, PROGRESS_OLDDB, PROGRESS_NEWDB, PROGRESS_WRITEDB, PROGRESS_CLEAR, PROGRESS_SKIPPED, } progress_state; bool progress_start(void); void progress_stop(void); void progress_status(progress_state, const char*); #endif aide-0.19/include/db_file.h0000644000175000017500000000226014771736646011233 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2006, 2020, 2022, 2024, 2025 Rami Lehti, Pablo Virolainen, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _DB_FILE_H_INCLUDED #define _DB_FILE_H_INCLUDED #include "db.h" #include "db_config.h" #include db_entry_t db_readline_file(database*, bool); int db_writespec_file(db_config*); int db_writeline_file(db_line*); int db_close_file(db_config*); #endif aide-0.19/include/db_list.h0000644000175000017500000000236214613411450011244 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2010 Rami Lehti, Pablo Virolainen, * Richard van den Berg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _DB_LIST_H_INCLUDED #define _DB_LIST_H_INCLUDED #include /* for NULL */ typedef struct db_list{ struct db_list* next; struct db_list* prev; struct db_list* head; struct db_list* tail; } db_list; /* Only the head knows for sure where the tail is */ static db_list* db_list_head=NULL; void db_list_append(db_list*item); #endif /* _DB_LIST_H_INCLUDED */ aide-0.19/include/base64.h0000644000175000017500000000273714613411450010716 /* ** ** Copyright (C) 1994 Swedish University Network (SUNET) ** Modified by Rami Lehti (C) 1999 ** Modified by Hannes von Haugwitz (C) 2022, 2024 ** ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITTNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ** ** ** Martin.Wendel@udac.uu.se ** Torbjorn.Wictorin@udac.uu.se ** ** UDAC ** P.O. Box 174 ** S-751 04 Uppsala ** Sweden ** */ #ifndef _BASE64_H_INCLUDED #define _BASE64_H_INCLUDED #include #include "util.h" #define BUFSIZE 16384 #define FAIL -1 #define SKIP -2 char* encode_base64(byte* src,size_t ssize); byte* decode_base64(char* src,size_t ssize,size_t *); #endif /* _BASE64_H_INCLUDED */ aide-0.19/include/tree.h0000644000175000017500000000226614774237261010604 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2023 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TREE_H_INCLUDED #define TREE_H_INCLUDED typedef struct tree_node tree_node; typedef int (*tree_cmp_f)(const void*, const void*); tree_node *tree_insert(tree_node *, void *, void *, tree_cmp_f); void *tree_search(tree_node *, void *, tree_cmp_f); tree_node *tree_walk_first(tree_node *); tree_node *tree_walk_next(tree_node *); void *tree_get_data(tree_node *n); #endif aide-0.19/include/e2fsattrs.h0000644000175000017500000000213614613411450011540 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2021 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _E2FSATTRS_H_INCLUDED #define _E2FSATTRS_H_INCLUDED #include unsigned long e2fsattrs_get_flag(char); /* memory for the returned string is obtained with malloc(3), and should be freed with free(3). */ char* get_e2fsattrs_string(unsigned long, bool, unsigned long); #endif aide-0.19/include/getopt.h0000644000175000017500000001334614613411450011132 /* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file was part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { # if defined __STDC__ && __STDC__ const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #if defined __STDC__ && __STDC__ # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ extern int getopt (); # ifndef __need_getopt extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); # endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ aide-0.19/include/aide.h0000644000175000017500000000251114633623461010533 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2004-2006, 2010-2011, 2019, 2022, 2024 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _AIDE_H_INCLUDED #define _AIDE_H_INCLUDED #include "config.h" #include "db_config.h" #ifndef O_NOATIME #if defined(__linux__) && (defined(__i386__) || defined(__PPC__)) #define O_NOATIME 01000000 #else #define O_NOATIME 0 #endif #endif #ifdef strtoimax # define HAVE_STRTOIMAX #endif #define ARGUMENT_SIZE 65536 /* This is a structure that has all configuration info */ extern db_config* conf; #endif aide-0.19/include/log.h0000644000175000017500000000453214771755231010423 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2020, 2022, 2023, 2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _LOG_H_INCLUDED #define _LOG_H_INCLUDED #include /* log levels */ typedef enum { /* preserve order */ LOG_LEVEL_UNSET = 0, LOG_LEVEL_ERROR = 1, LOG_LEVEL_WARNING = 2, LOG_LEVEL_NOTICE = 3, LOG_LEVEL_INFO = 4, LOG_LEVEL_COMPARE = 5, LOG_LEVEL_RULE = 6, LOG_LEVEL_CONFIG = 7, LOG_LEVEL_DEBUG = 8, LOG_LEVEL_LIMIT = 9, LOG_LEVEL_THREAD = 10, LOG_LEVEL_TRACE = 11, } LOG_LEVEL; bool is_log_level_unset(void); void set_log_level(LOG_LEVEL); void set_colored_log(bool); const char * get_log_level_name(LOG_LEVEL); LOG_LEVEL get_log_level_from_string(char*); LOG_LEVEL toogle_log_level(LOG_LEVEL); void log_msg(LOG_LEVEL, const char* ,...) #ifdef __GNUC__ __attribute__ ((format (printf, 2, 3))) #endif ; #define LOG_CONFIG_FORMAT_LINE(log_level, format, ...) \ if (linebuf) { \ log_msg(log_level,"%s:%d: " format " (line: '%s')", filename, linenumber, __VA_ARGS__, linebuf); \ } else { \ log_msg(log_level,"%s: " format, filename, __VA_ARGS__); \ } #define LOG_CONFIG_FORMAT_LINE_PREFIX(log_level, format, ...) \ if (rule_prefix) { \ log_msg(log_level,"%s:%d: " format " (line: '%s', prefix: '%s')", filename, linenumber, __VA_ARGS__, linebuf, rule_prefix); \ } else { \ log_msg(log_level,"%s:%d: " format " (line: '%s')", filename, linenumber, __VA_ARGS__, linebuf); \ } #define LOG_WHOAMI(log_level, format, ...) log_msg(log_level, "%*s%s" format, whoami?10:0, whoami?whoami:"", whoami?": ":"", __VA_ARGS__); #endif aide-0.19/include/hashsum.h0000644000175000017500000000355014756544261011313 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2020,2022,2024,2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _HASHSUM_H_INCLUDED #define _HASHSUM_H_INCLUDED #include "attributes.h" #include typedef struct { ATTRIBUTE attribute; int length; } hashsum_t; typedef enum { hash_md5=0, hash_sha1, hash_sha256, hash_sha512, hash_rmd160, hash_tiger, hash_crc32, hash_crc32b, hash_haval, hash_whirlpool, hash_gostr3411_94, hash_stribog256, hash_stribog512, hash_sha512_256, hash_sha3_256, hash_sha3_512, num_hashes, } HASHSUM; /* max length of hashsum in hashsums[] defined in hashsum.c */ #define HASHSUM_MAX_LENGTH 64 extern hashsum_t hashsums[]; extern int algorithms[]; extern DB_ATTR_TYPE DEPRECATED_HASHES; extern DB_ATTR_TYPE REMOVED_HASHES; void init_hashsum_lib(void); DB_ATTR_TYPE get_hashes(bool); DB_ATTR_TYPE validate_hashes(DB_ATTR_TYPE, int, char*, char*); DB_ATTR_TYPE get_transition_hashsums(char *, DB_ATTR_TYPE, char *, DB_ATTR_TYPE); DB_ATTR_TYPE get_hashsums_to_ignore(char *, DB_ATTR_TYPE, char *, DB_ATTR_TYPE); #endif /* _HASHSUM_H_INCLUDED */ aide-0.19/include/symboltable.h0000644000175000017500000000217414613411450012142 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2006, 2022 Rami Lehti, Pablo Virolainen, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _SYMBOLTABLE_H_INCLUDED #define _SYMBOLTABLE_H_INCLUDED #include "attributes.h" #include "list.h" typedef struct symba { char* name; char* value; DB_ATTR_TYPE ival; } symba; list* list_find(char* s,list* item); #endif aide-0.19/include/do_md.h0000644000175000017500000000331514774237261010723 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002,2006,2010-2011,2019,2022,2023,2025 Rami Lehti, Pablo * Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _DO_MD_H_INCLUDED #define _DO_MD_H_INCLUDED #include "config.h" #include #include #include "db_disk.h" #include "list.h" #include "db_config.h" #include "md.h" list* do_md(list* file_lst,db_config* conf); int stat_cmp(struct stat*, struct stat*, bool); md_hashsums calc_hashsums(disk_entry *, DB_ATTR_TYPE, ssize_t, bool, const char *); #ifdef WITH_ACL void acl2line(db_line* line, int, const char *); #endif #ifdef WITH_XATTR void xattrs2line(db_line *line, int, const char *); #endif #ifdef WITH_SELINUX void selinux2line(db_line *line, int, const char *); #endif #ifdef WITH_E2FSATTRS void e2fsattrs2line(db_line* line, int, const char *); #endif #ifdef WITH_CAPABILITIES void capabilities2line(db_line* line, int, const char *); #endif #endif /* _DO_MD_H_INCLUDED */ aide-0.19/include/errorcodes.h0000644000175000017500000000254014774237261012007 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2010, 2020-2023 Rami Lehti, Pablo Virolainen, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _ERRORCODES_H_INCLUDED #define _ERRORCODES_H_INCLUDED #define ERROR_WRITING_ERROR 14 #define INVALID_ARGUMENT_ERROR 15 #define UNIMPLEMENTED_FUNCTION_ERROR 16 #define INVALID_CONFIGURELINE_ERROR 17 #define IO_ERROR 18 #define VERSION_MISMATCH_ERROR 19 #define EXEC_ERROR 20 #define LOCK_ERROR 21 #define MEMORY_ALLOCATION_FAILURE 22 #define THREAD_ERROR 23 #define HASH_ALGO_ERROR 30 #define DATABASE_ERROR 24 #define SIGNAL_INTERRUPT_ERROR 25 #endif aide-0.19/include/md.h0000644000175000017500000000535414770012141010226 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2000-2002, 2005-2006, 2020, 2022, 2024, 2025 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _MD_H_INCLUDED #define _MD_H_INCLUDED #include "config.h" #ifdef WITH_NETTLE #include #include #include #include #include #include #include #endif #ifdef WITH_GCRYPT #include #endif #include #include "attributes.h" #include "hashsum.h" #include "util.h" struct db_line; /* This struct hold's internal data needed for md-calls. */ typedef struct md_container { /* Attr which are to be calculated. */ DB_ATTR_TYPE calc_attr; /* Attr which are not (yet) to be calculated. After init hold's hashes which are not calculated :) */ DB_ATTR_TYPE todo_attr; /* Variables needed to cope with the library. */ #ifdef WITH_NETTLE union { struct md5_ctx md5; struct sha1_ctx sha1; struct sha256_ctx sha256; struct sha512_ctx sha512; struct ripemd160_ctx ripemd160; struct gosthash94_ctx gosthash94; struct streebog256_ctx streebog256; struct streebog512_ctx streebog512; struct sha512_256_ctx sha512_256; struct sha3_512_ctx sha3_256; struct sha3_256_ctx sha3_512; } ctx[num_hashes]; #endif #ifdef WITH_GCRYPT gcry_md_hd_t mdh; #endif } md_container; typedef struct md_hashsums { unsigned char hashsums[num_hashes][HASHSUM_MAX_LENGTH]; DB_ATTR_TYPE attrs; } md_hashsums; int init_md(struct md_container*, const char*, const char *); int update_md(struct md_container*,void*,ssize_t); int close_md(struct md_container*, md_hashsums *, const char*, const char *); void hashsums2line(md_hashsums*, struct db_line*, const char *); DB_ATTR_TYPE copy_hashsums(char *, md_hashsums *, byte* (*)[num_hashes], const char *); #endif /*_MD_H_INCLUDED*/ aide-0.19/include/attributes.h0000644000175000017500000000473714774237261012040 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002,2004,2006,2019-2020,2021,2023-2025 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _ATTRIBUTES_H_INCLUDED #define _ATTRIBUTES_H_INCLUDED #define DB_ATTR_TYPE unsigned long long #define DB_ATTR_UNDEF ((DB_ATTR_TYPE) -1) #define ATTR(attribute) (1LLU< typedef struct queue_s queue_ts_t; queue_ts_t *queue_ts_init(void); void queue_ts_free(queue_ts_t *); bool queue_ts_enqueue(queue_ts_t * const, void * const, const char *); void *queue_ts_dequeue_wait(queue_ts_t * const, const char *); void queue_ts_register(queue_ts_t * const, const char *); void queue_ts_release(queue_ts_t * const, const char *); #endif aide-0.19/include/db.h0000644000175000017500000000406414774237261010230 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2004-2005, 2013, 2016, 2020, 2022-2025 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _DB_H_INCLUDED #define _DB_H_INCLUDED #include #include #include "db_config.h" #include "util.h" typedef enum { DB_TYPE_IN, DB_TYPE_OUT, DB_TYPE_NEW, } DB_TYPE; typedef struct { db_line* line; bool limit; } db_entry_t; byte* base64tobyte(char*, int, size_t *); db_line* db_char2line(char**, database*); int db_init(database*, bool, bool); db_entry_t db_readline(database*, bool); int db_writespec(db_config*); int db_writeline(db_line*,db_config*); void db_close(void); void free_db_line(db_line* dl); #define DB_OLD (1<<0) #define DB_DISK (1<<1) #define DB_NEW (1<<2) #define NODE_ADDED (1<<4) #define NODE_REMOVED (1<<5) #define NODE_CHANGED (1<<6) #define NODE_FREE (1<<7) #define NODE_MOVED_OUT (1<<11) #define NODE_MOVED_IN (1<<12) #define NODE_ALLOW_NEW (1<<13) #define NODE_ALLOW_RM (1<<14) #define NODE_CHECK_INODE (1<<15) #define NODE_HAS_SUB_RULES (1<<16) #define LOG_DB_FORMAT_LINE(log_level, format, ...) \ log_msg(log_level, "%s:%li: " format , (db->url)->raw, db->lineno, __VA_ARGS__); #endif aide-0.19/include/util.h0000644000175000017500000000627514774237261010626 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2006, 2013, 2020-2024 Rami Lehti, Pablo Virolainen, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _UTIL_H_INCLUDED #define _UTIL_H_INCLUDED #include "config.h" #include #include #include #include #include #include #include "url.h" #define HEXD2ASC(x) (((x) < 10) ? ((x) + '0') : ((x) - 10 + 'A')) #define ASC2HEXD(x) (((x) >= '0' && (x) <= '9') ? \ ((x) - '0') : (toupper(x) - 'A' + 10)) #define ISXDIGIT(x) isxdigit ((unsigned char)(x)) #ifndef HAVE_STRICMP # define stricmp(a,b) strcasecmp( (a), (b) ) #endif #ifndef HAVE_BYTE typedef uint8_t byte; #endif #define COLOR_L_BLACK "\x1B[0;30m" #define COLOR_L_RED "\x1B[0;31m" #define COLOR_L_GREEN "\x1B[0;32m" #define COLOR_L_ORANGE "\x1B[0;33m" #define COLOR_L_BLUE "\x1B[0;34m" #define COLOR_L_PURPLE "\x1B[0;35m" #define COLOR_L_CYAN "\x1B[0;36m" #define COLOR_L_GRAY "\x1B[0;37m" #define COLOR_B_GRAY "\x1B[1;30m" #define COLOR_B_RED "\x1B[1;31m" #define COLOR_B_GREEN "\x1B[1;32m" #define COLOR_B_YELLOW "\x1B[1;33m" #define COLOR_B_BLUE "\x1B[1;34m" #define COLOR_B_PURPLE "\x1B[1;35m" #define COLOR_B_CYAN "\x1B[1;36m" #define COLOR_B_WHITE "\x1B[1;37m" #define COLOR_RESET "\x1B[0m" void stderr_msg(const char* format, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 1, 2))) #endif ; void vstderr_prefix_line(const char*, const char*, va_list) #ifdef __GNUC__ __attribute__ ((format (printf, 1, 0))) #endif ; void stderr_set_line_erasure(bool); const char* btoa(bool); void* checked_malloc(size_t); void* checked_calloc(size_t, size_t); void* checked_strdup(const char *); void* checked_strndup(const char *, size_t); void* checked_realloc(void *, size_t); int cmpurl(url_t*, url_t*); int contains_unsafe(const char*); void decode_string(char*); char* encode_string(const char*); char *get_progress_bar_string(const char *, const char *, long unsigned, long unsigned, int, int); char* perm_to_char(mode_t perm); char *expand_tilde(char * path); char* byte_to_base16(const byte*, size_t); char* pipe2string(int); char* get_time_string(const time_t *); void mask_sig(const char*); #ifndef HAVE_STRNSTR char* strnstr(char* haystack,char* needle,int n); #endif #ifndef HAVE_STRNLEN size_t strnlen(const char *s, size_t maxlen); #endif #ifdef HAVE_SYSLOG int syslog_facility_lookup(char *); #endif #endif aide-0.19/include/commandconf.h0000644000175000017500000000354714706515170012125 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2006, 2011, 2015-2016, 2020-2024 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _COMMANDCONF_H_INCLUDED #define _COMMANDCONF_H_INCLUDED #include "config.h" #include #include #include "attributes.h" #include "config.h" #include "db.h" #include "rx_rule.h" #include "seltree.h" int parse_config(char *, char *, char *); int conf_input_wrapper(char* buf, int max_size, FILE* in); bool add_rx_rule_to_tree(char*, char*, rx_restriction_t, DB_ATTR_TYPE, int, seltree*, int, char*, char*); void do_define(char*,char*, int, char*, char*); void do_undefine(char*, int, char*, char*); DB_ATTR_TYPE do_groupdef(char*,DB_ATTR_TYPE); DB_ATTR_TYPE get_groupval(char*); bool do_dbdef(DB_TYPE, char*, int, char*, char*); bool do_reportlevel(char *, int, char*, char*); void do_replevdef(char*); bool do_repurldef(char*, int, char*, char*); bool do_rootprefix(char*, int, char*, char*); long do_num_workers(const char *); #ifdef WITH_E2FSATTRS void do_report_ignore_e2fsattrs(char*, int, char*, char*); #endif #endif aide-0.19/include/fopen.h0000644000175000017500000000200414762101251010724 /* see src/fopen.c for copyright information */ #ifndef _FOPEN_H_INCLUDED #define _FOPEN_H_INCLUDED #include #include enum fcurl_type_e { CFTYPE_NONE=0, CFTYPE_FILE=1, CFTYPE_CURL=2 }; struct fcurl_data { enum fcurl_type_e type; /* type of handle */ union { CURL *curl; FILE *file; } handle; /* handle */ char *buffer; /* buffer to store cached data*/ size_t buffer_len; /* currently allocated buffers length */ size_t buffer_pos; /* end of data in buffer*/ int still_running; /* Is background url fetch still in progress */ }; typedef struct fcurl_data URL_FILE; /* exported functions */ URL_FILE *url_fopen(const char *url,const char *operation); int url_fclose(URL_FILE *file); int url_feof(URL_FILE *file); size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file); char * url_fgets(char *ptr, size_t size, URL_FILE *file); void url_rewind(URL_FILE *file); #endif /* _FOPEN_H_INCLUDED */ aide-0.19/include/conf_lex.h0000644000175000017500000000224314613411450011417 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2006, 2020, 2023 Rami Lehti, Pablo Virolainen, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _CONF_LEX_H_INCLUDED_ #define _CONF_LEX_H_INCLUDED_ extern int conf_linenumber; extern char *conf_filename; extern char *conf_linebuf; void conf_lex_string(const char *, const char *); void conf_lex_file(const char *); void conf_lex_delete_buffer(void); #endif aide-0.19/include/list.h0000644000175000017500000000264214613411450010600 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2010 Rami Lehti, Pablo Virolainen, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _LIST_H_INCLUDED #define _LIST_H_INCLUDED typedef struct list { struct list* next; struct list* prev; struct list_header* header; /* struct list* head; struct list* tail; */ void* data; } list; typedef struct list_header{ struct list* head; struct list* tail; }list_header; list* list_sorted_insert(list* listp, void* data, int (*compare) (const void*, const void*)); list* list_append(list* listp,void*data); /* list* new_list_item(void*); */ list* list_delete_item(list* item); #endif /* _DB_LIST_H_INCLUDED */ aide-0.19/include/conf_ast.h0000644000175000017500000001447114763300774011440 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2019-2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _CONF_AST_H_INCLUDED #define _CONF_AST_H_INCLUDED #include #include "rx_rule.h" typedef enum config_option { ACL_NO_SYMLINK_FOLLOW_OPTION, DATABASE_ADD_METADATA_OPTION, DATABASE_ATTRIBUTES_OPTION, DATABASE_GZIP_OPTION, DATABASE_IN_OPTION, DATABASE_OUT_OPTION, DATABASE_NEW_OPTION, LOG_LEVEL_OPTION, REPORT_BASE16_OPTION, REPORT_DETAILED_INIT_OPTION, REPORT_FORCE_ATTRS_OPTION, REPORT_GROUPED_OPTION, REPORT_IGNORE_ADDED_ATTRS_OPTION, REPORT_IGNORE_REMOVED_ATTRS_OPTION, REPORT_IGNORE_CHANGED_ATTRS_OPTION, REPORT_IGNORE_E2FSATTRS_OPTION, REPORT_LEVEL_OPTION, REPORT_QUIET_OPTION, REPORT_APPEND_OPTION, REPORT_SUMMARIZE_CHANGES_OPTION, REPORT_URL_OPTION, ROOT_PREFIX_OPTION, WARN_DEAD_SYMLINKS_OPTION, CONFIG_VERSION, CONFIG_CHECK_WARN_UNRESTRICTED_RULES, REPORT_FORMAT_OPTION, LIMIT_CMDLINE_OPTION, NUM_WORKERS, } config_option; typedef struct { config_option option; char *config_name; char *report_string; } config_option_t; extern config_option_t config_options[]; typedef enum attribute_operator { ATTR_OP_PLUS = 0, ATTR_OP_MINUS, ATTR_OP_GROUP, } attribute_operator; typedef struct attribute_expression { attribute_operator op; struct attribute_expression* left; char* right; } attribute_expression; typedef enum string_operator { STR_OP_STR, STR_OP_VARIABLE, STR_OP_CONCAT, } string_operator; typedef struct string_expression { string_operator op; char* str; struct string_expression* left; struct string_expression* right; } string_expression; typedef struct config_option_statement { config_option option; attribute_expression *a; string_expression* e; } config_option_statement; typedef enum bool_operator { BOOL_OP_NOT, BOOL_OP_DEFINED, BOOL_OP_HOSTNAME, BOOL_OP_EXISTS, BOOL_OP_VERSION_GE, } bool_operator; typedef struct bool_expression { bool_operator op; union { string_expression* _str; struct bool_expression* _bool; } left; union { string_expression* _str; struct bool_expression* _bool; } right; } bool_expression; typedef struct if_condition { bool_expression* expression; int linenumber; char *filename; char* linebuf; } if_condition; typedef struct if_statement { struct if_condition* condition; struct ast* if_branch; struct ast* else_branch; } if_statement; typedef struct define_statement { char *name; string_expression *value; } define_statement; typedef struct include_statement { string_expression *path; string_expression *rx; bool execute; string_expression *prefix; } include_statement; typedef struct x_include_setenv_statement { char *variable; string_expression *value; } x_include_setenv_statement; typedef struct undefine_statement { char *name; } undefine_statement; typedef struct group_statement { char *name; attribute_expression *expr; } group_statement; typedef struct ft_restriction_expression { char* right; struct ft_restriction_expression* left; } ft_restriction_expression; typedef struct restriction_expression { struct ft_restriction_expression* f_types; char* fs_type; } restriction_expression; typedef struct rule_statement { AIDE_RULE_TYPE type; string_expression *path; restriction_expression *restriction; attribute_expression *attributes; } rule_statement; typedef struct ast { enum { config_option_type, include_statement_type, x_include_setenv_statement_type, define_statement_type, undefine_statement_type, group_statement_type, if_statement_type, rule_statement_type, } type; union { config_option_statement _config; include_statement _include; x_include_setenv_statement _x_include_setenv; define_statement _define; undefine_statement _undefine; group_statement _group; if_statement _if; rule_statement _rule; } statement; int linenumber; char *filename; char* linebuf; struct ast* next; } ast; string_expression* new_string(char*); string_expression* new_variable(char*); string_expression* new_string_concat(string_expression*, string_expression*); ast* new_string_option_statement(config_option, string_expression*); ast* new_attribute_option_statement(config_option, attribute_expression*); ast* new_define_statement(char*, string_expression*); ast* new_undefine_statement(char*); ast* new_group_statement(char*, attribute_expression*); ast* new_include_statement(string_expression*, string_expression*, bool, string_expression*); ast* new_x_include_setenv_statement(char*, string_expression*); ast* new_if_statement(struct if_condition*, struct ast*, struct ast*); ast* new_rule_statement(AIDE_RULE_TYPE, string_expression*, restriction_expression*, attribute_expression*); if_condition* new_if_condition(struct bool_expression*); bool_expression* new_string_bool_expression(bool_operator, string_expression*, string_expression*); bool_expression* new_bool_expression(bool_operator, bool_expression*, bool_expression*); attribute_expression* new_attribute_expression(attribute_operator, attribute_expression*, char*); ft_restriction_expression* new_ft_restriction_expression(ft_restriction_expression*, char*); restriction_expression* new_restriction_expression(ft_restriction_expression*, char*); void deep_free(ast*); #endif aide-0.19/include/config.h.in0000644000175000017500000001606314774244724011521 /* include/config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Compile-time options displayed in -v output */ #undef AIDECOMPILEOPTIONS /* package version */ #undef AIDEVERSION /* syslog ident */ #undef AIDE_IDENT /* syslog logopt */ #undef AIDE_LOGOPT /* syslog facility */ #undef AIDE_SYSLOG_FACILITY /* syslog priority */ #undef AIDE_SYSLOG_PRIORITY /* big endian */ #undef BIG_ENDIAN_HOST /* Location of configuration file */ #undef CONFIG_FILE /* Default location of signature database */ #undef DEFAULT_DB /* Default output location for newly-generated signature database */ #undef DEFAULT_DB_OUT /* Define to 1 if you have the 'asprintf' function. */ #undef HAVE_ASPRINTF /* Define to 1 if the system has the type 'byte'. */ #undef HAVE_BYTE /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the 'fcntl' function. */ #undef HAVE_FCNTL /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* file system type support? */ #undef HAVE_FSTYPE /* Define to 1 if you have the 'ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the 'posix_fadvise' function. */ #undef HAVE_POSIX_FADVISE /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT /* Define to 1 if you have the 'readdir' function. */ #undef HAVE_READDIR /* Define to 1 if you have the 'sigabbrev_np' function. */ #undef HAVE_SIGABBREV_NP /* Define to 1 if you have the 'snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the 'stricmp' function. */ #undef HAVE_STRICMP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the 'strnlen' function. */ #undef HAVE_STRNLEN /* Define to 1 if you have the 'strnstr' function. */ #undef HAVE_STRNSTR /* Define to 1 if you have the 'strtoimax' function. */ #undef HAVE_STRTOIMAX /* Define to 1 if you have the 'strtoll' function. */ #undef HAVE_STRTOLL /* syslog available? */ #undef HAVE_SYSLOG /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PRCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if the system has the type 'u16'. */ #undef HAVE_U16 /* Define to 1 if the system has the type 'u32'. */ #undef HAVE_U32 /* Define to 1 if the system has the type 'u64'. */ #undef HAVE_U64 /* Define to 1 if the system has the type 'ulong'. */ #undef HAVE_ULONG /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type 'ushort'. */ #undef HAVE_USHORT /* Define to 1 if you have the 'vasprintf' function. */ #undef HAVE_VASPRINTF /* Define to 1 if you have the 'va_copy' function. */ #undef HAVE_VA_COPY /* Define to 1 if you have the 'vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the 'vsyslog' function. */ #undef HAVE_VSYSLOG /* Define to 1 if you have the '__va_copy' function. */ #undef HAVE___VA_COPY /* little endian */ #undef LITTLE_ENDIAN_HOST /* Localedir to use */ #undef LOCALEDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* The size of 'blkcnt_t', as computed by sizeof. */ #undef SIZEOF_BLKCNT_T /* The size of 'gid_t', as computed by sizeof. */ #undef SIZEOF_GID_T /* The size of 'ino_t', as computed by sizeof. */ #undef SIZEOF_INO_T /* The size of 'int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of 'long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* The size of 'nlink_t', as computed by sizeof. */ #undef SIZEOF_NLINK_T /* The size of 'off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T /* The size of 'uid_t', as computed by sizeof. */ #undef SIZEOF_UID_T /* The size of 'unsigned int', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_INT /* The size of 'unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG /* The size of 'unsigned long long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG_LONG /* The size of 'unsigned short', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_SHORT /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* use ACL */ #undef WITH_ACL /* Define to 1 if audit is available */ #undef WITH_AUDIT /* Define to 1 if libcap is available */ #undef WITH_CAPABILITIES /* Define to 1 if libcurl is available */ #undef WITH_CURL /* Define to 1 if e2p is available */ #undef WITH_E2FSATTRS /* Define to 1 if libgcrypt is available */ #undef WITH_GCRYPT /* Define to 1 if locale is available */ #undef WITH_LOCALE /* Define to 1 if nettle is available */ #undef WITH_NETTLE /* Define to 1 if libacl is available */ #undef WITH_POSIX_ACL /* Define to 1 if libselinux is available */ #undef WITH_SELINUX /* Define to 1 if libattr is available */ #undef WITH_XATTR /* Define to 1 if zlib is available */ #undef WITH_ZLIB /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if 'lex' declares 'yytext' as a 'char *' by default, not a 'char[]'. */ #undef YYTEXT_POINTER /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define to 1 on platforms where this makes off_t a 64-bit type. */ #undef _LARGE_FILES /* Number of bits in time_t, on hosts where this is settable. */ #undef _TIME_BITS /* Define to 1 on platforms where this makes time_t a 64-bit type. */ #undef __MINGW_USE_VC2005_COMPAT aide-0.19/include/url.h0000644000175000017500000000243514774237261010445 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2002, 2006, 2019-2020,2025 Rami Lehti, Pablo Virolainen, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _URL_H_INCLUDED #define _URL_H_INCLUDED typedef enum { url_file = 1, url_stdout, url_stdin, url_stderr, url_fd, url_ftp, url_http, url_https, url_syslog, } URL_TYPE; typedef struct url_t { /* Everything before the first ':' */ URL_TYPE type; char* value; char* raw; } url_t; URL_TYPE get_url_type(char *); const char* get_url_type_string(URL_TYPE); #endif aide-0.19/include/seltree_struct.h0000644000175000017500000000253214767507476012722 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2010, 2020, 2023, 2025 Rami Lehti, Pablo Virolainen, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _SELTREE_STRUCT_H_INCLUDED #define _SELTREE_STRUCT_H_INCLUDED #include #include "attributes.h" #include "list.h" #include "tree.h" struct seltree { pthread_rwlock_t rwlock; list* sel_rx_lst; list* neg_rx_lst; list* equ_rx_lst; struct seltree* parent; tree_node *children; char* path; int checked; struct db_line* new_data; struct db_line* old_data; DB_ATTR_TYPE changed_attrs; }; #endif /* _SELTREE_STRUCT_H_INCLUDED */ aide-0.19/include/locale-aide.h0000644000175000017500000000217114613411450011761 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2000-2002, 2022 Rami Lehti, Pablo Virolainen, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _LOCALE_AIDE_H_INCLUDED #define _LOCALE_AIDE_H_INCLUDED #ifdef WITH_LOCALE #include #include #define _(Text) gettext(Text) #else #define _(Text) Text #endif /* WITH_LOCALE */ #endif /* _LOCALE_AIDE_H_INCLUDED*/ aide-0.19/include/db_disk.h0000644000175000017500000000237714765113255011243 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2011, 2021-2025 Rami Lehti, Pablo Virolainen, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _DB_DISK_H_INCLUDED #define _DB_DISK_H_INCLUDED #include "attributes.h" #include "config.h" #ifdef HAVE_FSTYPE #include "file.h" #endif #include #include typedef struct disk_entry { char *filename; struct stat fs; #ifdef HAVE_FSTYPE FS_TYPE fs_type; #endif int fd; DB_ATTR_TYPE attrs; } disk_entry; void db_scan_disk(bool); #endif aide-0.19/include/report_json.h0000644000175000017500000000170514613411450012170 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2022 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _REPORT_JSON_H_INCLUDED #define _REPORT_JSON_H_INCLUDED #include "report.h" extern report_format_module report_module_json; #endif aide-0.19/include/file.h0000644000175000017500000000400414765225124010547 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2016,2020,2021,2024,2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _FILE_H_INCLUDED #define _FILE_H_INCLUDED #include "config.h" #include #include #define FT_TYPE unsigned int #define FT_NULL 0U #define FT_REG (1U<<0) /* file */ #define FT_DIR (1U<<1) /* dir */ #define FT_FIFO (1U<<2) /* fifo */ #define FT_LNK (1U<<3) /* link */ #define FT_BLK (1U<<4) /* block device */ #define FT_CHR (1U<<5) /* char device */ #define FT_SOCK (1U<<6) /* socket */ #define FT_DOOR (1U<<7) /* door */ #define FT_PORT (1U<<8) /* port */ char get_f_type_char_from_f_type(FT_TYPE); char *get_f_type_string_from_f_type(FT_TYPE); char get_f_type_char_from_perm(mode_t); char *get_f_type_string_from_perm(mode_t); FT_TYPE get_f_type_from_char(char); FT_TYPE get_f_type_from_perm(mode_t); #ifdef HAVE_FSTYPE #define FS_TYPE unsigned long typedef struct { char *str; unsigned int magic; } filesystem_t; FS_TYPE get_fs_type_from_string(const char *); int generate_fs_type_string(FS_TYPE, char*); char * get_fs_type_string_from_magic(FS_TYPE); extern filesystem_t filesystems[]; extern int num_filesystems; #endif typedef struct file_t { char* name; FT_TYPE type; #ifdef HAVE_FSTYPE FS_TYPE fs_type; #endif } file_t; #endif aide-0.19/include/report_plain.h0000644000175000017500000000171014613411450012316 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2022 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _REPORT_PLAIN_H_INCLUDED #define _REPORT_PLAIN_H_INCLUDED #include "report.h" extern report_format_module report_module_plain; #endif aide-0.19/include/be.h0000644000175000017500000000206114613411450010206 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2019-2021,2023 Rami Lehti, Pablo Virolainen, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _BE_H_INCLUDED #define _BE_H_INCLUDED #include #include "url.h" void* be_init(url_t*, bool, bool, bool, int, char*, char*, bool*); #endif /* _BE_H_INCLUDED */ aide-0.19/include/conf_eval.h0000644000175000017500000000167414613411450011565 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2019-2022 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _CONF_EVAL_H_INCLUDED #define _CONF_EVAL_H_INCLUDED #include "conf_ast.h" void eval_config(ast*, int, char*); #endif aide-0.19/include/gen_list.h0000644000175000017500000000333514774237261011447 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2006, 2010-2011, 2016, 2019-2025 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _GEN_LIST_H_INCLUDED #define _GEN_LIST_H_INCLUDED #include #include "attributes.h" #include "rx_rule.h" #include "db_config.h" #include "file.h" #include "seltree.h" #include "db_disk.h" struct stat; /* DB_FOO are anded together to form rx_rule's attr */ /* * populate_tree() * Populate tree with data from disk and db * Also do comparing while adding to the tree */ void populate_tree(seltree*); void write_tree(seltree*); match_t check_rxtree(file_t, seltree*, char *, bool, const char *); match_result check_limit(char*, bool, const char *); struct db_line* get_file_attrs(disk_entry *, DB_ATTR_TYPE, DB_ATTR_TYPE, const char *); void add_file_to_tree(seltree*, db_line*, int, const database *, disk_entry *, const char*); void print_match(file_t, match_t); #endif /*_GEN_LIST_H_INCLUDED*/ aide-0.19/include/db_config.h0000644000175000017500000000764714771520034011555 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2004-2006, 2010-2013, 2015-2016, 2019-2024 * Rami Lehti, Pablo Virolainen, Richard van den Berg, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * 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 #include "config.h" #define PCRE2_CODE_UNIT_WIDTH 8 #include #include #include #ifdef WITH_ZLIB #include #endif #include "attributes.h" #include "db_line.h" #include "list.h" #include "report.h" #include "file.h" #include "rx_rule.h" #include "url.h" #define E2O(n) (1<>1)+1) /* New db_config Not used yet, maybe someday. */ /* typedef struct _db_config { */ /* url_t* url; */ /* config* conf; */ /* int inout; */ /* int (*init)(url*,int,config*); */ /* char** (*readline)(_db_config*); */ /* int (*writeline)(_db_config*,db_line* line); */ /* int (*close)(_db_config*); */ /* int db_size; */ /* DB_FIELD* db_order; */ /* void* local; */ /* }_db_config ; */ typedef enum { DB_FLAG_NONE =0, DB_FLAG_CREATED =1, DB_FLAG_PARSE =2, } DB_FLAG; typedef struct database { url_t* url; char *filename; int linenumber; char *linebuf; void *fp; #ifdef WITH_ZLIB gzFile gzp; #endif long lineno; ATTRIBUTE* fields; int num_fields; struct md_container *mdc; struct db_line *db_line; DB_FLAG flags; } database; typedef struct db_config { char *hostname; database database_in; database database_out; database database_new; DB_ATTR_TYPE db_attrs; #ifdef WITH_ZLIB /* Is dbout gzipped or not */ int gzip_dbout; #endif DB_ATTR_TYPE db_out_attrs; file_t check_file; char* config_file; char* config_version; char* aide_version; bool config_check_warn_unrestricted_rules; int database_add_metadata; int report_detailed_init; int report_base16; int report_quiet; bool report_append; DB_ATTR_TYPE report_ignore_added_attrs; DB_ATTR_TYPE report_ignore_removed_attrs; DB_ATTR_TYPE report_ignore_changed_attrs; DB_ATTR_TYPE report_force_attrs; #ifdef WITH_E2FSATTRS unsigned long report_ignore_e2fsattrs; #endif list* report_urls; REPORT_LEVEL report_level; REPORT_FORMAT report_format; /* defsyms is a list of symba*s */ list* defsyms; /* so is groupsyms */ list* groupsyms; /* What are we supposed to do */ int action; long num_workers; int progress; bool no_color; time_t start_time; time_t end_time; int symlinks_found; DB_ATTR_TYPE attr; #ifdef WITH_ACL int no_acl_on_symlinks; #endif int warn_dead_symlinks; int report_grouped; int report_summarize_changes; char* root_prefix; int root_prefix_length; char* limit; pcre2_code* limit_crx; pcre2_match_data* limit_md; struct seltree* tree; int print_details_width; } db_config; #endif aide-0.19/include/db_line.h0000644000175000017500000000425314756605772011245 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2004-2006, 2010, 2013, 2019-2022, 2024, 2025 * Rami Lehti, Pablo Virolainen, Richard van den Berg, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _DB_LINE_H_INCLUDED #define _DB_LINE_H_INCLUDED #include #include #include #include "config.h" #include "attributes.h" #ifdef HAVE_FSTYPE #include "file.h" #endif #include "hashsum.h" #include "util.h" #ifdef WITH_POSIX_ACL typedef struct acl_type { char *acl_a; /* ACCESS */ char *acl_d; /* DEFAULT, directories only */ } acl_type; #endif #ifdef WITH_XATTR typedef struct xattr_node { char *key; byte *val; size_t vsz; } xattr_node; typedef struct xattrs_type { size_t num; size_t sz; struct xattr_node *ents; } xattrs_type; #endif typedef struct db_line { byte* hashsums[num_hashes]; #ifdef WITH_POSIX_ACL acl_type* acl; #endif mode_t perm; mode_t perm_o; /* Permission for tree traverse */ #ifdef HAVE_FSTYPE FS_TYPE fs_type; #endif long uid; /* uid_t */ long gid; /* gid_t */ time_t atime; time_t ctime; time_t mtime; long inode; /* ino_t */ long nlink; /* nlink_t */ long long size; /* off_t */ long long bcount; /* blkcnt_t */ char* filename; char* fullpath; char* linkname; char *cntx; #ifdef WITH_XATTR xattrs_type* xattrs; #endif unsigned long e2fsattrs; char* capabilities; /* Attributes .... */ DB_ATTR_TYPE attr; } db_line; #endif aide-0.19/Makefile.am0000644000175000017500000001001714774237261010076 # # AIDE (Advanced Intrusion Detection Environment) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # BUILT_SOURCES = src/conf_yacc.h AM_YFLAGS= -d LEX_OUTPUT_ROOT = lex.yy bin_PROGRAMS = aide aide_SOURCES = src/aide.c include/aide.h \ include/base64.h src/base64.c \ include/be.h src/be.c \ include/commandconf.h src/commandconf.c \ include/attributes.h src/attributes.c \ include/file.h src/file.c \ include/report.h src/report.c \ include/report_plain.h src/report_plain.c \ include/report_json.h src/report_json.c \ include/conf_ast.h src/conf_ast.c \ include/conf_eval.h src/conf_eval.c \ include/conf_lex.h src/conf_lex.l \ src/conf_yacc.h src/conf_yacc.y \ include/db.h src/db.c \ include/db_line.h include/db_config.h \ include/db_disk.h src/db_disk.c \ include/db_file.h src/db_file.c \ include/db_list.h src/db_list.c \ include/do_md.h src/do_md.c \ include/errorcodes.h \ include/gen_list.h src/gen_list.c \ src/getopt1.c \ include/getopt.h src/getopt.c \ include/hashsum.h src/hashsum.c \ include/rx_rule.h src/rx_rule.c \ include/list.h src/list.c \ include/log.h src/log.c \ include/locale-aide.h \ include/md.h src/md.c \ include/queue.h src/queue.c \ include/seltree_struct.h \ include/progress.h src/progress.c \ include/seltree.h src/seltree.c \ include/symboltable.h src/symboltable.c \ include/tree.h src/tree.c \ include/url.h src/url.c\ include/util.h src/util.c if HAVE_E2FSATTRS aide_SOURCES += include/e2fsattrs.h src/e2fsattrs.c endif if HAVE_CURL aide_SOURCES += include/fopen.h src/fopen.c endif aide_CFLAGS = @AIDE_DEFS@ -I$(top_srcdir)/include -W -Wall -g \ ${AUDIT_CFLAGS} \ ${CAPABILITIES_CFLAGS} \ ${CURL_CFLAGS} \ ${E2FSATTRS_CFLAGS} \ ${ELF_CFLAGS} \ ${GCRYPT_CFLAGS} \ ${NETTLE_CFLAGS} \ ${PCRE2_CFLAGS} \ ${POSIX_ACL_CFLAGS} \ ${PTHREAD_CFLAGS} \ ${SELINUX_CFLAGS} \ ${XATTR_CFLAGS} \ ${ZLIB_CFLAGS} aide_LDADD = -lm \ ${AUDIT_LIBS} \ ${CAPABILITIES_LIBS} \ ${CURL_LIBS} \ ${E2FSATTRS_LIBS} \ ${ELF_LIBS} \ ${GCRYPT_LIBS} \ ${NETTLE_LIBS} \ ${PCRE2_LIBS} \ ${POSIX_ACL_LIBS} \ ${PTHREAD_LIBS} \ ${SELINUX_LIBS} \ ${XATTR_LIBS} \ ${ZLIB_LIBS} if HAVE_CHECK TESTS = check_aide check_PROGRAMS = check_aide check_aide_SOURCES = tests/check_aide.c tests/check_aide.h \ tests/check_attributes.c src/attributes.c \ tests/check_base64.c src/base64.c \ tests/check_hashsum.c src/hashsum.c \ tests/check_seltree.c src/seltree.c \ tests/check_progress.c \ src/md.c src/file.c src/log.c src/util.c src/list.c src/tree.c src/rx_rule.c check_aide_CFLAGS = -I$(top_srcdir)/include \ $(CHECK_CFLAGS) \ ${GCRYPT_CFLAGS} \ ${NETTLE_CFLAGS} \ ${PCRE2_CFLAGS} check_aide_LDADD = -lm \ $(CHECK_LIBS) \ ${GCRYPT_LIBS} \ ${NETTLE_LIBS} \ ${PCRE2_LIBS} endif # HAVE_CHECK CLEANFILES = src/conf_yacc.h src/conf_yacc.c src/conf_lex.c man_MANS = doc/aide.1 doc/aide.conf.5 EXTRA_DIST = $(man_MANS) SECURITY.md src/conf_yacc.c: src/conf_yacc.y $(YACC) $(AM_YFLAGS) -Wno-yacc -Wall -Werror -o $@ -p conf $< src/conf_lex.c: src/conf_lex.l src/conf_yacc.c $(LEX) $(AM_LFLAGS) -o$@ -Pconf $< autoreconf-clean: maintainer-clean -rm -f INSTALL Makefile.in aclocal.m4 compile config.guess \ include/config.h.in include/config.h.in~ config.sub configure configure~ depcomp \ install-sh missing version.m4 ylwrap -rmdir src/.deps tests/.deps aide-0.19/COPYING0000644000175000017500000004325414613411450007070 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. aide-0.19/doc/0000755000175000017500000000000014774244735006674 5aide-0.19/doc/aide.10000644000175000017500000001531714774244714007604 .TH AIDE 1 "2025-04-05" "aide v0.19" "User Commands" .SH NAME \fBaide\fP \- Advanced Intrusion Detection Environment .SH SYNOPSIS \fBaide\fP \%[\fBparameters\fP] \%\fBcommand\fP .SH DESCRIPTION \fBAIDE\fP is an intrusion detection system for checking the integrity of files. .SH COMMANDS .PP .IP "--check, -C" Checks the database for inconsistencies. You must have an initialized database to do this. This is also the default command. Without any command \fBaide\fP does a check. .IP "--init, -i" Initialize the database. You must initialize a database and move it to the appropriate place (see \fBdatabase_in\fR config option) before you can use the \-\-check command. .IP "--dry-init, -n (added in AIDE v0.17)" Traverse the file system, match each file against the rule tree and report to stdout. Neither reports nor the database are written in this mode. To change the log level in this mode please use the \fB--log-level\fR command line parameter. In this mode aide exits with status 0. .IP "--update, -u" Checks the database and updates the database non-interactively. The input and output databases must be different. .IP "--compare, -E" Compares two databases. They must be defined in config file with database= and database_new=. .IP "--list (added in AIDE v0.19)" List the entries of the database in human readable format (analogous to the detailed report output of new files). Note that the checksums are base16 encoded. .IP "--config-check, -D" Stops after reading in the configuration file. Any errors will be reported. To change the log level in this mode please use the \fB--log-level\fR command line parameter. .IP "--path-check=\fIfile_type\fR[=\fIfile_system_type\fR]:\fIpath\fR, -p \fIfile_type\fR[=\fIfile_system_type\fR]:\fIpath\fR (added in AIDE v0.17)" Read configuration and match provided file_type, optionally file system type (added in AIDE v0.19, Linux only) and path against rule tree. The path is independent of what is in the actual file system and needs to be absolute. See RESTRICTED RULES section in aide.conf (5) for supported file types and file system types. Please note that the specified file system type is only applied to the file and not to the parent directories of the path. If a restricted rule cannot be matched against a parent directory due to the missing file system type aide raises a warning. To change the log level in this mode please use the \fB--log-level\fR command line parameter. In this mode aide exits with status 0 if the file would be added to the tree, 1 if not and 2 if the file does not match the specified limit. .SH PARAMETERS .IP "--config=\fBconfigfile\fR , -c \fBconfigfile\fR" Configuration is read from file \fBconfigfile\fR (see \fB--version\fP output for default value). Use '-' for stdin. .IP "--limit=\fBREGEX\fR , -l \fBREGEX\fR (added in AIDE v0.16)" Limit command to entries matching REGEX. Note that the REGEX only matches at the first position. .RS .B Example .RS 3 Only check and update the database entries matching /etc (i.e. the /etc directory) while leaving all other entries unchecked and unchanged: .RS 3 .nf aide --update --limit /etc .fi .RE .RE .RE .IP "--before=\(dq\fBconfigparameters\fR\(dq , -B \(dq\fBconfigparameters\fR\(dq" These \fBconfigparameters\fR are handled before the reading of the configuration file. See aide.conf (5) for more details on what to put here. .IP "--after=\(dq\fBconfigparameters\fR\(dq , -A \(dq\fBconfigparameters\fR\(dq" These \fBconfigparameters\fR are handled after the reading of the configuration file. See aide.conf (5) for more details on what to put here. .IP "--log-level=\fBlog_level\fR,-L\fBlog_level\fR (added in AIDE v0.17)" The log level to use (see aide.conf (5) for available log levels and more details). This overwrites the log_level value set in any configuration file. .IP "--verbose=\fBverbosity_level\fR,-V\fBverbosity_level\fR (REMOVED in AIDE v0.17)" Removed, use \fBlog_level\fR and \fBreport_level\fR config options instead (see aide.conf (5) for details). .IP "--report=\fBreporter\fR,-r \fBreporter\fR (REMOVED in AIDE v0.17)" Removed, use \fBreport_url\fR config option instead (see aide.conf (5) for details). .IP "--workers=\fBWORKERS\fR , -W \fBWORKERS\fR (added in AIDE v0.18)" Specifies the number of workers (see aide.conf (5) for details). This overwrites the num_workers value set in any configuration file. .IP "--no-progress (added in AIDE v0.19)" Turn progress off explicitly. By default progress is shown if standard error is connected to a terminal. .IP "--no-color (added in AIDE v0.19)" Turn colored log output off explicitly. By default colored log output is enabled if standard error is connected to a terminal. .IP "--version,-v" Print version information and exit. .IP "--help,-h" Prints out the standard help message. .PP .SH EXIT STATUS Normally, the exit status is 0 if no errors occurred. Except when the .BR --check , .BR --compare " or" .B --update command was requested, in which case the exit status is defined as: .IP "1 * (new files reported?) +" .IP "2 * (removed files reported?) +" .IP "4 * (changed files reported?)" .PP Since those three cases can occur together, the respective error codes are added. For example, if there are new files and removed files reported, the exit status will be 1 + 2 = 3. .PP Additionally, the following exit codes are defined for generic error conditions: .IP "14 Writing error" .IP "15 Invalid argument error" .IP "16 Unimplemented function error" .IP "17 Configuration error" .IP "18 IO error" .IP "19 Version mismatch error" .IP "20 EXEC error" .IP "21 File lock error" .IP "22 Memory allocation error" .IP "23 Thread error" .IP "24 Database error" .IP "25 received SIGINT, SIGTERM or SIGHUP" .PP .SH SIGNAL HANDLING .IP "\fBSIGINT\fR, \fBSIGTERM\fR, \fBSIGHUP\fR" Remove an incompletely written database (only if database file was created by aide) and exit (code 25). .IP \fBSIGUSR1\fR Toggle the log_level between current and debug level. \fBSIGUSR1\fR is only handled after config parsing. .IP \fBSIGWINCH\fR Resize the progress bar (if enabled). .PP .SH NOTES The checksums in the database and in the output are by default base64 encoded (see also report_base16 option). To decode them you can use the following shell command: echo | base64 \-d | hexdump \-v \-e '32/1 "%02x" "\\n"' .PP .SH FILES See \fB--version\fR output for the default \fBconfig file\fR and the default \fBdatabase_in\fR and \fBdatabase_out\fR config values. .SH SEE ALSO .BR aide.conf (5) .SH BUGS There are probably bugs in this release. Please report them at https://github.com/aide/aide/issues . .SH DISCLAIMER All trademarks are the property of their respective owners. No animals were harmed while making this webpage or this piece of software. Although some pizza delivery guy's feelings were hurt. .BR aide-0.19/doc/aide.conf.50000644000175000017500000010715014774244714010531 .TH AIDE.CONF 5 "2025-04-05" "aide v0.19" "AIDE" .SH NAME aide.conf - The configuration file for Advanced Intrusion Detection Environment .PP .SH SYNOPSIS \fBaide.conf\fP is the configuration file for Advanced Intrusion Detection Environment. \fBaide.conf\fP contains the runtime configuration aide uses to initialize or check the AIDE database. .PP .SH "FILE FORMAT" aide.conf is case-sensitive. Leading and trailing white spaces are ignored. Each config line must end with new line. .PP AIDE uses the backslash character (\fB\e\fR) as escape character for ' ' (space), '@' and '\e' (backslash) (e.g. '\e ' or '\e@'). To literally match a '\fB\e\fR' in a file path with a regular expression you have to escape the backslash twice (i.e. '\fB\e\e\e\e\fR'). .PP There are three types of lines in \fBaide.conf\fP. First there are the configuration options which are used to set configuration parameters and define groups. Second, there are (restricted) rules that are used to indicate which files/directoires from the file system are added to the database. Third, macro lines define or undefine variables within the config file. Lines beginning with # are ignored as comments. .PP .SH "CONFIG OPTIONS" .PP These lines have the format parameter=value. See URLS for a list of valid urls. .PP .TP database_in (type: URL, default: see \fB--version\fP output, added in AIDE v0.17) .TQ database (REMOVED in AIDE v0.19) The url from which database is read. There can only be one of these lines. If there are multiple database lines then the first is used. .RS .B Examples: .RS 3 .nf .B database_in=file:/var/lib/aide/aide.db .fi .RS 3 Read database locally from \fI/var/lib/aide/aide.db\fR. .RE .RE .RS 3 .nf .B database_in=stdin .fi .RS 3 Read database from \fIstdin\fR. .RE .RE .RS 3 .nf .B database_in=https://example.com/aide.db .fi .RS 3 Read database remotely from \fIhttps://example.com/aide.db\fR. .RE .RE .RE .IP "database_out (type: URL, default: see \fB--version\fP output)" The url to which the new database is written to. There can only be one of these lines. If there are multiple database_out lines then the first is used. .IP "database_new (type: URL, default: \fB\fP)" The url from which the other database for \-\-compare is read. .IP "database_attrs (type: attribute expression, default: \fBH\fP, added in AIDE v0.16)" The attributes of the (uncompressed) database files which are to be added to the reports in report level >= \fBdatabase_attributes\fP . Only checksum attributes are supported. To disable set .I database_attrs to .RB ' E '. .IP "database_add_metadata (type: bool, default: \fBtrue\fR, added in AIDE v0.16)" Whether to add the AIDE version and the time of database generation as comments to the database file or not. This option may be set to false by default in a future release. .IP "log_level (type: log level, default: \fBwarning\fR, added in AIDE v0.17)" The log level to use. Log messages are written to \fIstderr\fR. If there are multiple \fIlog_level\fR lines then the first one is used. The \-\-log-level or \-L command line option overwrites this option. .RS The following log levels are available: .RS \fBerror\fP: show unrecoverable issues that have to be handled by the user. Errors are fatal to the AIDE process. \fBwarning\fP: additionally show recoverable issues that most likely lead to unexpected behaviour and should be handled by the user \fBnotice\fP: additionally show recoverable issues that sometimes lead to unexpected behaviour and might be handled by the user. \fBinfo\fP: additionally show informational messages \fBcompare\fP: additionally show messages to help to debug file comparison and (special) attribute handling The log levels below are very verbose and can easily generate multiple gigabytes of log data (depending on the number of processed files and the size of the rule tree). For debugging it is recommended to use these log levels together with the \fI--limit\fR parameter (see aide (1) for details). \fBrule\fP: additionally show messages to help to debug the path rule matching \fBconfig\fP: additionally show messages to help to debug config and rule parsing \fBdebug\fP: additionally show messages that are useful to debug the application \fBlimit\fP: additionally show messages about skipped entries due to limit match \fBthread\fP: additionally show messages about thread processing (e.g. broadcast events) \fBtrace\fP: additionallyt show messages about the internal data structures and the flow of the application (e.g. in-loop logging) (extremely verbose) .RE .RE .IP "verbose (type: number, range: 0 - 255, default: \fB5\fR, REMOVED in AIDE v0.17)" Removed, use \fBlog_level\fR and \fBreport_level\fR options instead. .IP "gzip_dbout (type: bool, default: \fBfalse\fR)" Whether the output to the database is gzipped or not. This option is available only if zlib support is compiled in. .IP "root_prefix (type: path, default: \fB\fR, added in AIDE v0.16)" The prefix to strip from each file name in the file system before applying the rules and writing to database. AIDE removes a trailing slash from the prefix. If there are multiple root_prefix lines then the first one is used. This option has no effect in compare mode. .IP "acl_no_symlink_follow (type: bool, default: \fBfalse\fR)" Whether to check ACLs for symlinks or not. This option is available only if acl support is compiled in. .IP "warn_dead_symlinks (type: path, default: \fBfalse\fR)" Whether to warn about dead symlinks or not. .IP "config_version (type: string, default: \fB\fR)" The value of config_version is printed in the report and also printed to the database. This is for informational purposes only. It has no other functionality. .IP "config_check_warn_unrestricted_rules (type: bool, default: \fBfalse\fR, added in AIDE v0.18)" Whether to warn on unrestricted rules during config check. To explicitly define unrestricted rules use \fB0\fR (zero) as restriction character. .IP "num_workers (type: number|percentage, default: \fB1\fR, added in AIDE v0.18)" Specifies the number of simultaneous workers (threads) for file attribute processing (i.a. hashsum calculation). The number of workers can be a positive integer (e.g. '4') or the percentage of the available processors (e.g. '60%'). The resulting number of workers is rounded up to the next integer (e.g. '60%' of 8 processors results in 5 workers). If there are multiple \fInum_workers\fR lines then the first one is used. Use 0 (zero) to disable (multi-threaded) workers. The default value 1 (single worker thread) may be changed in a future release. .PP .SH REPORT OPTIONS .PP .IP "report_url (type: URL, default: \fBstdout\fR)" The URL that the output is written to. Multiple instances of the \fBreport_url\fR option are supported. .RS .B Examples: .RS 3 .nf .B report_url=file:/var/log/aide.log .fi .RS 3 Write report to \fI/var/log/aide.log\fR. .RE .RE .RS 3 .nf .B report_url=stdout .fi .RS 3 Write report to \fIstdout\fR. .RE .RE .RS 3 .nf .B report_url=syslog: .fi .RS 3 Write report to \fIsyslog\fR using \fILOG_FACILITY\fR. .RE .RE .RE .PP The following report options are available (to take effect they have to be set before \fBreport_url\fR): .PP .IP "report_level (type: report level, default: \fBchanged_attributes\fR, added in AIDE v0.17)" The report level to use. The available report levels are as follows: .RS \fBminimal\fP: print single line whether AIDE found differences to the database \fBsummary\fP: additionally print number of added, removed and changed files \fBdatabase_attributes\fP: additionally print database checksums \fBlist_entries\fP: additionally print lists of added, removed and changed entries \fBchanged_attributes\fP: additionally print details about changed entries .RS .B Example: .RS 3 .EX File: /var/lib/apt/extended_states Perm : -rw-r--r-- | -rw------- Uid : 0 | 106 .EE .RE The left column shows the old value (e.g. from the \fIdatabase_in\fR database) and the right column shows the new value (e.g. from the file system). .RE \fBadded_removed_attributes\fP: additionally print details about added and removed attributes \fBadded_removed_entries\fP: additionally print details about added and removed entries .RE .IP "report_format (type: report format, default: \fBplain\fR, added in AIDE v0.18)" The report format to use. The available report formats are as follows: .RS \fBplain\fP: Print report in plain human-readable format. \fBjson\fP: Print report in json machine-readable format. .RE .IP "report_base16 (type: bool, default: \fBfalse\fR, added in AIDE v0.17)" Base16 encode the checksums in the report. The default is to report checksums in base64 encoding. .IP "report_detailed_init (type: bool, default: \fBfalse\fR, added in AIDE v0.16)" Report added files (report level >= \fBlist_entries\fP) and their details (report level >= \fBadded_removed_entries\fP) in initialization mode. .IP "report_quiet (type: bool, default: \fBfalse\fR, added in AIDE v0.16)" Suppress report output if no differences to the database have been found. .IP "report_append (type: bool, default: \fBfalse\fR, added in AIDE v0.17)" Append to the report URL. .TP report_grouped (type: bool, default: \fBtrue\fR, added in AIDE v0.17) .TQ grouped (REMOVED in AIDE v0.19) Group the files in the report by added, removed and changed files. .TP report_summarize_changes (type: bool, default: \fBtrue\fR, added in AIDE v0.17) .TQ summarize_changes (REMOVED in AIDE v0.19) Summarize changes in the added, removed and changed files sections of the report. The general format is like the string YlZbpugamcinHAXSECF, where Y is replaced by the file-type ('\fBf\fP' for a regular file, '\fBd\fP' for a directory, '\fBl\fP' for a symbolic link, '\fBc\fP' for a character device, '\fBb\fP' for a block device, '\fBp\fP' for a FIFO, '\fBs\fP' for a unix socket, '\fBD\fP' for a Solaris door, '\fBP\fP' for a Solaris event port, '\fB!\fP' if file type has changed and '\fB?\fP' otherwise). The Z is replaced as follows: A '\fB=\fP' means that the size has not changed, a '\fB<\fP' reports a shrinked size and a '\fB>\fP' reports a grown size. The other letters in the string are the actual letters that will be output if the associated attribute for the item has been changed or a '\fB.\fP' for no change. Otherwise a '\fB+\fP' is shown if the attribute has been added, a '\fB-\fP' if it has been removed, a '\fB:\fP' if the attribute is ignored (but not forced) or a ' ' if the attribute has not been checked. The exceptions to this are: (1) a newly created file replaces each letter with a '\fB+\fP', and (2) a removed file replaces each letter with a '\fB-\fP'. The attribute that is associated with each letter is as follows: .RS .IP o An \fBl\fP means that the link name has changed. .IP o A \fBb\fP means that the block count has changed. .IP o A \fBp\fP means that the permissions have changed. .IP o A \fBu\fP means that the uid has changed. .IP o A \fBg\fP means that the gid has changed. .IP o An \fBa\fP means that the access time has changed. .IP o An \fBm\fP means that the modification time has changed. .IP o A \fBc\fP means that the change time has changed. .IP o An \fBi\fP means that the inode has changed. .IP o An \fBn\fP means that the link count has changed. .IP o An \fBH\fP means that one or more message digests have changed. .IP o An \fBF\fP means that one file system type has changed (Linux only). .RE .RS The following letters are only available when explicitly enabled using configure: .RE .RS .IP o An \fBA\fP means that the access control list has changed. .IP o An \fBX\fP means that the extended attributes have changed. .IP o An \fBS\fP means that the SELinux attributes have changed. .IP o An \fBE\fP means that the file attributes on a second extended file system have changed. .IP o A \fBC\fP means that the file capabilities have changed. .RE .IP "report_ignore_added_attrs (type: attribute expression, default: \fBempty\fR, added in AIDE v0.16)" Attributes whose addition is to be ignored in the report. .IP "report_ignore_removed_attrs (type: attribute expression, default: \fBempty\fR, added in AIDE v0.16)" Attributes whose removal is to be ignored in the report. .TP report_ignore_changed_attrs (type: attribute expression, default: \fBempty\fR, added in AIDE v0.16) .TQ ignore_list (REMOVED in AIDE v0.17) Attributes whose change is to be ignored in the report. .TP report_force_attrs (type: attribute expression, default: \fBempty\fR, added in AIDE v0.16) .TQ report_attributes (REMOVED in AIDE v0.17) Attributes which are always printed in the report for changed files. If an attribute is both ignored and forced the attribute is not considered for file change but printed in the final report as long as the file has been otherwise changed. .IP "report_ignore_e2fsattrs (type: string, default: \fB0\fR, added in AIDE v0.16)" List (no delimiter) of ext2 file attributes which are to be ignored in the report. See .BR chattr (1) for the available attributes. Use \fB0\fR (zero) to not ignore any attribute. Ignored attributes are represented by a ':' in the report. By default AIDE also reports changes of the read-only attributes mentioned in .BR chattr (1) (see example below how to ignore those changes). .RS .B Example: .RS 3 Ignore changes of the read-only ext2 file attributes verify (V), inline data (N), indexed directory (I) and encrypted (E): .RS 3 .nf report_ignore_e2fsattrs=VNIE .fi .RE .RE .RE .PP .SH "GROUPS" .PP Groups are aggregations of attributes. Group definitions have the format = . Group names are limited to alphanumeric characters (\fBA-Za-z0-9\fP). See ATTRIBUTES for a description of all available attributes. .RE .B Default groups .TP .B "R" p+ftype+i+l+n+u+g+s+m+c+sha3_256+X .TP .B "L" p+ftype+i+l+n+u+g+X .TP .B ">" Growing file p+ftype+l+u+g+i+n+s+growing+X .TP .B "H" all compiled in (and not deprecated) hashsums (added in AIDE v0.17) .TP .B "X" acl+selinux+xattrs+e2fsattrs+caps (if attributes are compiled in, added in AIDE v0.16) .TP .B "E" Empty group .TP Use 'aide --version' to list the default compound groups. .RE .PP .SH "RULES" .PP AIDE supports three types of rules: .TP .B "Regular rule:" Files and directories matching the regular expression are added to the database. .TP .B "Recursive negative rule:" ! Files and directories matching the regular expression are excluded and NOT added to the database. The children of directories and sub-directories are recursed into and only not added to the database if they also match the regular expression. .TP .B "Non-recursive negative rule (added in AIDE v0.19)" - Files and directories matching the regular expression are excluded and NOT added the database. The children of directories and sub-directories are not recursed into and hence not added to the database by any means. .TP .B "Equals rule:" = Files and directories matching the regular expression are added to the database. The children of directories are only added if the regular expression ends with a "/". The children of sub-directories are not added to the database. .PP Every regular expression has to start with an explicit "/". An implicit ^ is added in front of each regular expression. In other words, the regular expressions are matched at the first position against the complete path. Special characters can be escaped using two-digit URL encoding (for example, %20 to represent a space). AIDE uses a deepest-match algorithm to find the tree node to search, but a first-match algorithm inside the node. (see also \fBrule\fP log level). See EXAMPLES for examples. .PP More in-depth discussion of the selection algorithm can be found in the AIDE manual. .IP .PP .SH "RESTRICTED RULES" Restricted rules are like normal rules but can be restricted to file types (added in AIDE v0.16) and/or file system types (added in AIDE v0.19, Linux only). The syntax of restricted rules is as follows: .B "Restricted regular rule" .RS 3 .nf .fi Files and directories matching both the regular expression and the restriction expression are added the database. .RE .B "Restricted recursive negative rule" .RS 3 .nf ! .fi Files and directories matching both the regular expression and the restriction expression are excluded and NOT added the database. The children of directories and sub-directories are recursed into and only excluded if they also match the regular expression as well as the restriction. .RE .B "Restricted non-recursive negative rule (added in AIDE v0.19)" .RS 3 .nf - .fi Files and directories matching both the regular expression and the restriction expression are excluded and NOT added the database. The children of directories and sub-directories are not recursed into and hence not added to the database by any means. .RE .B "Restricted equals rule" .RS 3 .nf = .fi Files and directories matching both the regular expression and the restriction expression are added the database. The children of directories are only added if the regular expression ends with a "/". The children of sub-directories are not added to the database. .RE .B Restriction expression .RS 3 An restriction expression is of the following form: .nf : | = | = .fi .RE .B File types .RS 3 The following file types are supported: .RS 3 .TP .B "\fBf\fP" restrict rule to regular files .TP .B "\fBd\fP" restrict rule to directories .TP .B "\fBl\fP" restrict rule to symbolic links .TP .B "\fBc\fP" restrict rule to character devices .TP .B "\fBb\fP" restrict rule to block devices .TP .B "\fBp\fP" restrict rule to FIFO files .TP .B "\fBs\fP" restrict rule to UNIX sockets .TP .B "\fBD\fP" restrict rule to Solaris doors .TP .B "\fBP\fP" restrict rule to Solaris event ports .RE .PP Multiple file type restrictions can be given as a comma-separated list. .RE .B "File system types (Linux only)" .RS 3 The file system type restriction can be specified by file system types magic number (e.g. '0x01021994' for tmpfs) or by its name (use 'aide --version' to list the available file system type names). The magic number must start with '0x' and be formatted in hexdecimal format. .RE .B "Empty restriction" .RS 3 To explicitly don't restrict a rule use .B "\fB0\fR" (added in AIDE v0.18). .RE .B Examples: .RS 3 .nf / d,f R .fi .RS 3 Only add directories and files to the database. .RE .RE .RS 3 .nf /boot/efi$ d=vfat R .fi .RS 3 Only add \fB/boot/efi\fR to the database if it is a directory and mounted on \fBvfat\fR. .RE .RE .RS 3 .nf !/dev =0x01021994 .fi .RS 3 Exclude \fB/dev\fR and any children that are mounted on \fBtmpfs\fR (\fBtmpfs\fR magic number: \fB0x01021994\fR). .RE .RE .RS 3 .nf -/dev =tmpfs .fi .RS 3 Exclude \fB/dev\fR and all children, if \fB/dev\fR is mounted on \fBtmpfs\fR. .RE .RE .PP .SH "MACRO LINES" .PP .IP "@@define \fBVAR\fR \fBval\fR" Define variable \fBVAR\fR to value \fBval\fR. .IP "@@undef \fBVAR\fR" Undefine variable \fBVAR\fR. .TP @@if \fBboolean_expression\fR (added in AIDE v0.18) .TQ @@else .TQ @@endif @@if begins an if statement. It must be terminated with an @@endif statement. The lines between @@if and @@endif are used if the \fBboolean_expression\fR evaluates to \fBtrue\fR. If there is an @@else statement then the part between @@if and @@else is used if \fBboolean_expression\fR evaluates to \fBtrue\fR otherwise the part between @@else and @@endif is used. .RS Available operators and functions in boolean expressions: .RS 3 .nf .B not \fIboolean_expression\fR .fi .RS 3 Evaluates to true if the \fIboolean_expression\fR is false, and false if the \fIboolean_expression\fR is true. .RE .RE .RS 3 .nf .B defined \fIVARIABLE\fR .fi .RS 3 Evaluates to \fBtrue\fR if \fIVARIABLE\fR is defined. .RE .RE .RS 3 .nf .B hostname \fIHOSTNAME\fR .fi .RS 3 Evaluates to \fBtrue\fR if \fIHOSTNAME\fR equals the \fBhostname\fR of the machine that AIDE is running on. \fBhostname\fR is the name of the host without the domainname (ie 'hostname', not 'hostname.example.com'). .RE .RE .RS 3 .nf .B exists \fIPATH\fR .fi .RS 3 Evaluates to \fBtrue\fR if \fIPATH\fR exists. .RE .RE .RS 3 .nf .B \fIVERSION_STRING1\fR \fBversion_ge\fR \fIVERSION_STRING2\fR (added in AIDE v0.19) .fi .RS 3 Evaluates to \fBtrue\fR if \fIVERSION_STRING1\fR is greater than or equal to \fIVERSION_STRING2\fR (e.g. 0.19.1 \fBversion_ge\fR 0.18 evaluates to \fBtrue\fR and 2.17 \fBversion_ge\fR 1.1 to \fBfalse\fR). The version strings must be in the formaat MAJOR.MINOR.PATCH (minor and patch version can be omitted, any version suffix (e.g. for pre-release) will be truncated). .RE .RE .RE .IP "@@ifdef \fBVARIABLE\fR (\fBDEPRECATED\fR since AIDE v0.18, will be removed in AIDE v0.20)" same as \fB@@if defined VARIABLE\fR .IP "@@ifndef \fBVARIABLE\fR (\fBDEPRECATED\fR since AIDE v0.18, will be removed in AIDE v0.20)" same as \fB@@if not defined VARIABLE\fR .IP "@@ifhost \fBHOSTNAME\fR (\fBDEPRECATED\fR since AIDE v0.18, will be removed in AIDE v0.20)" same as \fB@@if hostname HOSTNAME\fR .IP "@@ifnhost \fBHOSTNAME\fR (\fBDEPRECATED\fR since AIDE v0.18, will be removed in AIDE v0.20)" same as \fB@@if not hostname HOSTNAME\fR .IP "@@{\fBVAR\fR}" @@{\fBVAR\fR} is replaced with the value of the variable \fBVAR\fR. If variable \fBVAR\fR is not defined an empty string is used. Variables are supported in strings and in regular expressions of rules. .RS Pre-defined marco variables: .RS 3 \fB@@{AIDE_VERSION}\fP: the version of AIDE .RE .RS 3 \fB@@{HOSTNAME}\fP: the hostname of the current system .RE .RE .IP "@@include \fBFILE\fR" Include \fBFILE\fR. The content of the file is used as if it were inserted in this part of the config file. The maximum depth of nested includes is 16. .IP "@@include \fBDIRECTORY\fR \fBREGEX\fR [\fBRULE_PREFIX\fR] (added in AIDE v0.17)" Include all (regular) files found in \fBDIRECTORY\fR matching regular expression \fBREGEX\fR (sub-directories are ignored). The file are included in lexical sort order. If \fBRULE_PREFIX\fR (added in AIDE v0.18) is set, all rules included by the statement are prefixed with given \fBRULE_PREFIX\fR. Prefixes from nested include statements are concatenated. The content of the files is used as if it were inserted in this part of the config file. .TP @@x_include \fBFILE\fR (added in AIDE v0.17) .TQ @@x_include \fBDIRECTORY\fR \fBREGEX\fR [\fBRULE_PREFIX\fR] (added in AIDE v0.17) \fB@x_include\fR is identical to \fB@@include\fR, except that if a config file is executable is is run and the output is used as config. If the executable file exits with status greater than zero or writes to stderr aide stops with an error. For security reasons \fBDIRECTORY\fR and each executable config file must be owned by the current user or root. They must not be group- or world-writable. .IP "@@x_include_setenv \fBVAR\fR \fBVALUE\fR (added in AIDE v0.17)" Adds the variable \fBVAR\fR with the value \fBVALUE\fR to the environment used for config file execution. Environment variable names are limited to alphanumeric characters (\fBA-Za-z0-9\fP) and the underscore '\fB_\fR' and must not begin with a digit. .PP .SH TYPES .B bool .RS 3 Valid values are \fByes\fR, \fBtrue\fR, \fBno\fR or \fBfalse\fR. .RE .B "attribute expression" .RS 3 An attribute expression is of the following form: .IP .nf : | + | - .fi .RE .B URLS .RS 3 Urls can be one of the following. Input urls cannot be used as outputs and vice versa. .RS .IP "stdout" .IP "stderr" Output is sent to stdout, stderr respectively. .IP "stdin" Input is read from stdin. .IP "file:/\fBpath\fR" Input is read from \fBpath\fR or output is written to \fBpath\fR. .IP "fd:\fBnumber\fR" Input is read from filedescriptor \fBnumber\fR or output is written to \fBnumber\fR. .IP "syslog:\fBLOG_FACILITY\fR" Output is written to syslog using \fILOG_FACILITY\fR. .RE .RE .SH "ATTRIBUTES" .PP .B "File attributes" .TP .B "\fBftype\fR" file type (added in AIDE v0.15) .TP .B "\fBfstype\fR" file system type (Linux-only, added in AIDE v0.19) .TP .B "\fBp\fR" permissions .TP .B "\fBi\fR" inode .TP .B "\fBl\fR" link name (symbolic links only) .TP .B "\fBn\fR" number of links .TP .B "\fBu\fR" user .TP .B "\fBg\fR" group .TP .B "\fBs\fR" size .TP .B "\fBb\fR" block count .TP .B "\fBm\fR" mtime .TP .B "\fBa\fR" atime .TP .B "\fBc\fR" ctime .TP .B "\fBacl\fR" access control list (requires \fIlibacl\fR, Linux-only) .TP .B "\fBselinux\fR" selinux attributes (requires \fIlibselinux\fR, Linux-only) .TP .B "\fBxattrs\fR" extended attributes (requires \fIlibattr\fR, Linux-only) .TP .B "\fBe2fsattrs\fR" file attributes on a Linux file system, see also \fB report_ignore_e2fsattrs \fP option (requires \fIlibext2fs\fR, added in AIDE v0.15) .TP .B "\fBcaps\fR" file capabilities (regular files only) (requires \fIlibcap\fR, Linux-only, added in AIDE v0.17) .PP Use 'aide --version' to show which compiled-in attributes are available. .PP .B "Special attributes" .TP .B "\fBS\fR" check for growing size (\fBDEPRECATED\fR since AIDE v0.18, will be removed in AIDE v0.20) Use \fBgrowing+s\fR attributes instead .TP .B "\fBI\fR" ignore changed filename When \fBI\fR is used, the inode of the new file is used to search for a moved source file in the old database. Source and target file have to be located in the same directory and must share the same attributes (except for special attributes \fBANF\fR, \fBARF\fR, \fBI\fR, \fBgrowing\fR, and \fBcompressed\fR). For moved entries a change of the \fBctime\fR attribute is ignored. .TP .B "\fBgrowing\fR" ignore growing file (added in AIDE v0.18) When \fBgrowing\fR is used, changes of the following attributes are ignored: \fBsize\fR: if new size is greater than old size \fBbcount\fR: if new bcount is greater than old bcount \fBatime\fR: if new atime is greater than old atime \fBmtime\fR: if new mtime is greater than old mtime \fBctime\fR: if new ctime is greater than old ctime \fBhashsums\fR: if the hashsum of the new file restricted to the old size equals the hashsums of the old file For hashsum attributes the \fBgrowing\fR attribute is ignored in compare mode. .TP .B "\fBcompressed\fR" ignore compressed file (added in AIDE v0.18) When \fBcompressed\fR is used, the uncompressed hashsums of the new compressed file (supported compressions: \fBgzip\fR) are used to search for the uncompressed file in the old database. The old uncompressed and the new compressed file have to be located in the same directory and must share the same attributes (except for special attributes \fBANF\fR, \fBARF\fR, \fBI\fR, \fBgrowing\fR, and \fBcompressed\fR) including at least one common hashsum. Changes of the \fBinode\fR, \fBsize\fR, \fBbcount\fR and \fBctime\fR attributes are ignored. The \fBgrowing\fR attribute (i.e. the old file size) is not considered for compressed files during the calculation of the uncompressed hashsums. The \fBcompressed\fR attribute is ignored in compare mode. .TP .B "\fBANF\fR" allow new files When 'ANF' is used, new files are added to the new database, but are ignored in the report. .TP .B "\fBARF\fR" allow removed files When 'ARF' is used, files missing on disk are omitted from the new database, but are ignored in the report. .PP .B Hashsums attributes (regular files only) .RS 3 .TP .B "sha256" SHA-256 checksum .TP .B "sha512" SHA-512 checksum .TP .IP "\fBsha512_256\fR (added in AIDE v0.19)" SHA-512 checksum truncated to 256 output bits .TP .IP "\fBsha3_256\fR (added in AIDE v0.19)" SHA3-256 checksum .TP .IP "\fBsha3_512\fR (added in AIDE v0.19)" SHA3-512 checksum .TP .IP "\fBstribog256\fR (added in AIDE v0.17)" GOST R 34.11-2012, 256 bit checksum .TP .IP "\fBstribog512\fR (added in AIDE v0.17)" GOST R 34.11-2012, 512 bit checksum .TP .IP "md5 (\fBDEPRECATED\fR since AIDE v0.19, will be removed in AIDE v0.21)" MD5 checksum (not in \fIlibgcrypt\fR FIPS mode) .TP .IP "sha1 (\fBDEPRECATED\fR since AIDE v0.19, will be removed in AIDE v0.21)" SHA-1 checksum .TP .IP "rmd160 (\fBDEPRECATED\fR since AIDE v0.19, will be removed in AIDE v0.21)" RIPEMD-160 checksum .TP .IP "gost (\fBDEPRECATED\fR since AIDE v0.19, will be removed in AIDE v0.21)" GOST R 34.11-94 checksum .TP .IP "crc32 (\fBREMOVED\fR in AIDE v0.19)" crc32 checksum .TP .IP "crc32b (\fBREMOVED\fR in AIDE v0.19)" crc32 checksum .TP .IP "haval (\fBREMOVED\fR in AIDE v0.19)" haval256 checksum .TP .IP "tiger (\fBREMOVED\fR in AIDE v0.19)" tiger checksum .TP .IP "whirlpool (\fBREMOVED\fR in AIDE v0.19)" whirlpool checksum .PP Use 'aide --version' to show which hashsums are available. .B Hashsum transitions (since AIDE v0.19): AIDE has limited support for hashsum transitions (i.e. ensuring hashsum validation when hashsums are added/removed from existing entries). If both the old and the new entry do mot share common hashsum(s) AIDE tries to additionally calculate the removed hashsum(s) also for the new entry (this is especieally not supported for moved (\fBI\fR attribute) and compressed (\fBcompressed\fR attribute) entries). .RE .PP .SH EXAMPLES .TP .B "/ R" This adds all files on your machine to the database. This one line is a fully qualified configuration file. .TP .B "!/dev$" This ignores the /dev directory structure. .TP .B "=/foo R" Only /foo and /foobar are taken into the database. None of their children are added. .TP .B "=/foo/ R" Only /foo and its children (e.g. /foo/file and /foo/directory) are taken into the database. The children of sub-directories (e.g. /foo/directory/bar) are not added. .TP .B "/ d,f R" Only add directories and files to the database .TP .B "!/run d" .TQ .B "/run R" Add all but directory entries to the database .TP .B "/run d R-m-c-i" .TQ .B "/run R" Use specific rule for directories .TP Suggested Groups .TP .B "\fBOwnerMode\fR = p+u+g+ftype" Check permissions, owner, group and file type .TP .B "\fBSize\fR = s+b" Check size and block count .TP .B "\fBInodeData\fR = OwnerMode+n+i+Size+l+X" .TQ .B "\fBStaticFile\fR = m+c+Checksums" Files that stay static .PP .B "\fBFull\fR = InodeData+StaticFile" .TQ .B "\fBFull\fR = ftype+p+l+u+g+s+m+c+a+i+b+n+H+X" .TQ .B "/ 0 Full" This line defines group \fBFull\fR. It has all attributes, all compiled in hashsums (\fBH\fR) and all compiled in extra file attributes (\fBX\fR). See '--version' output for the compiled in hashsums and extra groups. The example rule is the typical catch-all rule at the end of the rule list. .TP .B "\fBVarTime\fR = InodeData+Checksums" .TQ .B "/etc/ssl/certs/ca-certificates\e\e.crt$ VarTime" Files that change their mtimes or ctimes but not their contents. .TP .B "\fBVarInode\fR = VarTime-i" .TQ .B "/var/lib/nfs/etab$ f VarInode" Files that are recreated regularly but do not change their contents .TP .B "\fBVarFile\fR = OwnerMode+n+l+X" .TQ .B "/etc/resolv\e\e.conf$ f VarFile" Files that change their contents during system operation .TP .B "\fBVarDir\fR = OwnerMode+n+i+X" .TQ .B "/var/lib/snmp$ d VarDir" Directories that change their contents during system operation .TP .B "\fBRecreatedDir\fR = OwnerMode+n+X" .TQ .B "/run/samba$ d RecreatedDir" Directories that are recreated regularly and change their contents .TP Log Handling .PP Logs pose a number of special challenges to AIDE. An active log is nearly constantly being written to. The process of log rotation changes file names for files that are supposed to have unaltered contents. To save space, Logs are compressed in the process of their rotation, and finally, they get deleted. AIDE is supposed to handle all those cases without generating reports, and it is still expected to flag the cases when an attacker tampers with logs. .PP The following examples suggest a way to handle the common case of log rotation with the logrotate(8) program, with its options \fBcompress\fR, \fBdelaycompress\fR and \fBnocopytruncate\fR set. The vast majority of logs are rotated this way on most Linux systems. .TP .B "\fBActLog\fR=Full+growing+ANF+I" .TQ .B "/var/log/foo\e\e.log$ f ActLog" An Active Log is typically named foo.log. It is constanty being written to. The file does neither change its mode nor its inode number. The size only increases, and what is written to the file is not supposed to change (growing). During log rotation, foo.log is typically renamed to foo.log.1 (or foo.log.0) and the process is instructed to write to a new foo.log. Log content is written to a new file (ANF) and will eventually be renamed to foo.log.1 (I). The growing attribute suppresses reports for files that just had content appended when compared to the database. A change of the old content is still reported! .TP .B "\fBRotLog\fR=Full" .TQ .B "/var/log/foo\e\e.log\e\e.1$ f RotLog" foo.log.0 or foo.log.1 is called the Rotated Log, the previously active log renamed to the first name of the Log Series that is formed by the rotation mechanism. Right after rotation, the file might still being written to by the daemon. To aide, this looks like the Active Log's size decreases and its inode and timestamps change. The Rotated Log is not supposed to change its attributes once the process has stopped writing to it. Reports might be generated if aide runs while the process still writes to the Rotated Log, but this is quite unlikely to happen. Some log rotation mechanisms rename foo.log to foo.log.0 to foo.log.1.gz, others rename foo.log to foo.log.1 to foo.2.log.gz. .TP .B "\fBCompSerLog\fR=Full+I+compressed" .TQ .B "/var/log/foo\e\e.log\e\e.2\e\e.gz$ f CompSerLog" In the next rotation step, foo.log.1 gets compressed to foo.log.2.gz, becoming the Compressed Log in the Log Series. With this rule, AIDE does not report this step because it uncompresses the contents of the file and takes the checksum of the uncompressed content. The contents strictly doesn't change, but some attribute changes are ignored (compressed). .TP .B "\fBMidlSerLog\fR=Full+I" .TQ .B "/var/log/foo\e\e.log\e\e.[345]\e\e.gz$ f MidlSerLog" In the next log rotation, all foo.log.{x} get renamed to foo.log.{x+1}. The other attributes are not supposed to change. .TP .B "\fBLastSerLog\fR=Full+ARF" .TQ .B "/var/log/foo\e\e.log\e\e.6\e\e.gz$ f LastSerLog" The configuration of the log rotation process specifies a number of log generations to keep. The last log in the series is therefore removed from the disk (ARF). .PP aide 0.18 does not yet support the following cases of log rotation: .TP .B "empty files" It might be the case that a log is actually created, but never written to. This commonly happens on rarely used web servers that use the log rotation as a method to cater for data protection regulation. In result, all files in a series are identical, breaking the heuristics that aide uses to detect log rotation. A possible workaround is to begin a newly rotated log with a timestamp. With logrotate, this can be done in a postrotate scriptlet. .TP .B "nodelaycompress" With logrotate's \fBnodelaycompress\fR option, a log is immediately compressed after renaming it from the Active Log name. For the time being, it is recommended to always use the \fBdelaycompress\fR option to avoid this behavior. .TP .B "copytruncate" With logrotate's \fBcopytruncate\fR option, the Active Log is not renamed and newly created but copied to the new file name. After the copy operation, the old file is truncated to zero size, allowing the daemon to continuously write to the already open file handle. aide uses the Inode number to detect the rotation process. That doesn't work with \fBcopytruncate\fR because the Inode stays with the Active Log. For the time being, it is recommended to avoid the \fBcopytruncate\fR option to avoid this behavior. .PP .SH HINTS In the following, the first is not allowed in AIDE. Use the latter instead. .IP .B "/foo epug" .IP .B "/foo e+p+u+g" .PP .SH "SEE ALSO" .BR aide (1) .SH DISCLAIMER All trademarks are the property of their respective owners. No animals were harmed while making this webpage or this piece of software. aide-0.19/aclocal.m40000644000175000017500000024377514774244723007726 # generated automatically by aclocal 1.17 -*- Autoconf -*- # Copyright (C) 1996-2024 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, [m4_warning([this file was generated for autoconf 2.72. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS # # AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) # # DESCRIPTION # # This macro figures out how to build C programs using POSIX threads. It # sets the PTHREAD_LIBS output variable to the threads library and linker # flags, and the PTHREAD_CFLAGS output variable to any special C compiler # flags that are needed. (The user can also force certain compiler # flags/libs to be tested by setting these environment variables.) # # Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is # needed for multi-threaded programs (defaults to the value of CC # respectively CXX otherwise). (This is necessary on e.g. AIX to use the # special cc_r/CC_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these flags, # but also to link with them as well. For example, you might link with # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # # If you are only building threaded programs, you may wish to use these # variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" # CXX="$PTHREAD_CXX" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant # has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to # that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the # PTHREAD_PRIO_INHERIT symbol is defined when compiling with # PTHREAD_CFLAGS. # # ACTION-IF-FOUND is a list of shell commands to run if a threads library # is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it # is not found. If ACTION-IF-FOUND is not specified, the default action # will define HAVE_PTHREAD. # # Please let the authors know if this macro fails on any platform, or if # you have any other suggestions or comments. This macro was based on work # by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help # from M. Frigo), as well as ac_pthread and hb_pthread macros posted by # Alejandro Forero Cuervo to the autoconf macro repository. We are also # grateful for the helpful feedback of numerous users. # # Updated for Autoconf 2.68 by Daniel Richard G. # # LICENSE # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2011 Daniel Richard G. # Copyright (c) 2019 Marc Stevens # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 31 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_SED]) AC_LANG_PUSH([C]) ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on Tru64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then ax_pthread_save_CC="$CC" ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) AC_MSG_RESULT([$ax_pthread_ok]) if test "x$ax_pthread_ok" = "xno"; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi CC="$ax_pthread_save_CC" CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items with a "," contain both # C compiler flags (before ",") and linker flags (after ","). Other items # starting with a "-" are C compiler flags, and remaining items are # library names, except for "none" which indicates that we try without # any flags at all, and "pthread-config" which is a program returning # the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 # (Note: HP C rejects this with "bad form for `-t' option") # -pthreads: Solaris/gcc (Note: HP C also rejects) # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads and # -D_REENTRANT too), HP C (must be checked before -lpthread, which # is present but should not be used directly; and before -mthreads, # because the compiler interprets this as "-mt" + "-hreads") # -mthreads: Mingw32/gcc, Lynx/gcc # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case $host_os in freebsd*) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) ax_pthread_flags="-kthread lthread $ax_pthread_flags" ;; hpux*) # From the cc(1) man page: "[-mt] Sets various -D flags to enable # multi-threading and also sets -lpthread." ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" ;; openedition*) # IBM z/OS requires a feature-test macro to be defined in order to # enable POSIX threads at all, so give the user a hint if this is # not set. (We don't define these ourselves, as they can affect # other portions of the system API in unpredictable ways.) AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], [ # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) AX_PTHREAD_ZOS_MISSING # endif ], [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) ;; solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (N.B.: The stubs are missing # pthread_cleanup_push, or rather a function called by this macro, # so we could check for that, but who knows whether they'll stub # that too in a future libc.) So we'll check first for the # standard Solaris way of linking pthreads (-mt -lpthread). ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" ;; esac # Are we compiling with Clang? AC_CACHE_CHECK([whether $CC is Clang], [ax_cv_PTHREAD_CLANG], [ax_cv_PTHREAD_CLANG=no # Note that Autoconf sets GCC=yes for Clang as well as GCC if test "x$GCC" = "xyes"; then AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ # if defined(__clang__) && defined(__llvm__) AX_PTHREAD_CC_IS_CLANG # endif ], [ax_cv_PTHREAD_CLANG=yes]) fi ]) ax_pthread_clang="$ax_cv_PTHREAD_CLANG" # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) # Note that for GCC and Clang -pthread generally implies -lpthread, # except when -nostdlib is passed. # This is problematic using libtool to build C++ shared libraries with pthread: # [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 # [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 # [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 # To solve this, first try -pthread together with -lpthread for GCC AS_IF([test "x$GCC" = "xyes"], [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) # Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first AS_IF([test "x$ax_pthread_clang" = "xyes"], [ax_pthread_flags="-pthread,-lpthread -pthread"]) # The presence of a feature test macro requesting re-entrant function # definitions is, on some systems, a strong hint that pthreads support is # correctly enabled case $host_os in darwin* | hpux* | linux* | osf* | solaris*) ax_pthread_check_macro="_REENTRANT" ;; aix*) ax_pthread_check_macro="_THREAD_SAFE" ;; *) ax_pthread_check_macro="--" ;; esac AS_IF([test "x$ax_pthread_check_macro" = "x--"], [ax_pthread_check_cond=0], [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) if test "x$ax_pthread_ok" = "xno"; then for ax_pthread_try_flag in $ax_pthread_flags; do case $ax_pthread_try_flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; *,*) PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) PTHREAD_CFLAGS="$ax_pthread_try_flag" ;; pthread-config) AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) PTHREAD_LIBS="-l$ax_pthread_try_flag" ;; esac ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_LINK_IFELSE([AC_LANG_PROGRAM([#include # if $ax_pthread_check_cond # error "$ax_pthread_check_macro must be defined" # endif static void *some_global = NULL; static void routine(void *a) { /* To avoid any unused-parameter or unused-but-set-parameter warning. */ some_global = a; } static void *start_routine(void *a) { return a; }], [pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); pthread_join(th, 0); pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */])], [ax_pthread_ok=yes], []) CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" AC_MSG_RESULT([$ax_pthread_ok]) AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Clang needs special handling, because older versions handle the -pthread # option in a rather... idiosyncratic way if test "x$ax_pthread_clang" = "xyes"; then # Clang takes -pthread; it has never supported any other flag # (Note 1: This will need to be revisited if a system that Clang # supports has POSIX threads in a separate library. This tends not # to be the way of modern systems, but it's conceivable.) # (Note 2: On some systems, notably Darwin, -pthread is not needed # to get POSIX threads support; the API is always present and # active. We could reasonably leave PTHREAD_CFLAGS empty. But # -pthread does define _REENTRANT, and while the Darwin headers # ignore this macro, third-party headers might not.) # However, older versions of Clang make a point of warning the user # that, in an invocation where only linking and no compilation is # taking place, the -pthread option has no effect ("argument unused # during compilation"). They expect -pthread to be passed in only # when source code is being compiled. # # Problem is, this is at odds with the way Automake and most other # C build frameworks function, which is that the same flags used in # compilation (CFLAGS) are also used in linking. Many systems # supported by AX_PTHREAD require exactly this for POSIX threads # support, and in fact it is often not straightforward to specify a # flag that is used only in the compilation phase and not in # linking. Such a scenario is extremely rare in practice. # # Even though use of the -pthread flag in linking would only print # a warning, this can be a nuisance for well-run software projects # that build with -Werror. So if the active version of Clang has # this misfeature, we search for an option to squash it. AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown # Create an alternate version of $ac_link that compiles and # links in two steps (.c -> .o, .o -> exe) instead of one # (.c -> exe), because the warning occurs only in the second # step ax_pthread_save_ac_link="$ac_link" ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" ax_pthread_save_CFLAGS="$CFLAGS" for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" ac_link="$ax_pthread_save_ac_link" AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], [ac_link="$ax_pthread_2step_ac_link" AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], [break]) ]) done ac_link="$ax_pthread_save_ac_link" CFLAGS="$ax_pthread_save_CFLAGS" AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" ]) case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in no | unknown) ;; *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; esac fi # $ax_pthread_clang = yes # Various other checks: if test "x$ax_pthread_ok" = "xyes"; then ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_CACHE_CHECK([for joinable pthread attribute], [ax_cv_PTHREAD_JOINABLE_ATTR], [ax_cv_PTHREAD_JOINABLE_ATTR=unknown for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int attr = $ax_pthread_attr; return attr /* ; */])], [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], []) done ]) AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ test "x$ax_pthread_joinable_attr_defined" != "xyes"], [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$ax_cv_PTHREAD_JOINABLE_ATTR], [Define to necessary symbol if this constant uses a non-standard name on your system.]) ax_pthread_joinable_attr_defined=yes ]) AC_CACHE_CHECK([whether more special flags are required for pthreads], [ax_cv_PTHREAD_SPECIAL_FLAGS], [ax_cv_PTHREAD_SPECIAL_FLAGS=no case $host_os in solaris*) ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" ;; esac ]) AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ test "x$ax_pthread_special_flags_added" != "xyes"], [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" ax_pthread_special_flags_added=yes]) AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], [ax_cv_PTHREAD_PRIO_INHERIT], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT; return i;]])], [ax_cv_PTHREAD_PRIO_INHERIT=yes], [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ test "x$ax_pthread_prio_inherit_defined" != "xyes"], [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) ax_pthread_prio_inherit_defined=yes ]) CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" # More AIX lossage: compile with *_r variant if test "x$GCC" != "xyes"; then case $host_os in aix*) AS_CASE(["x/$CC"], [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], [#handle absolute path differently from PATH based program lookup AS_CASE(["x$CC"], [x/*], [ AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) ], [ AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) ] ) ]) ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" AC_SUBST([PTHREAD_LIBS]) AC_SUBST([PTHREAD_CFLAGS]) AC_SUBST([PTHREAD_CC]) AC_SUBST([PTHREAD_CXX]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "x$ax_pthread_ok" = "xyes"; then ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) : else ax_pthread_ok=no $2 fi AC_LANG_POP ])dnl AX_PTHREAD # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- # serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurrence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------ dnl dnl Prepare a "--with-" configure option using the lowercase dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and dnl PKG_CHECK_MODULES in a single macro. AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ])dnl PKG_WITH_MODULES dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ----------------------------------------------- dnl dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES dnl check._[VARIABLE-PREFIX] is exported as make variable. AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ])dnl PKG_HAVE_WITH_MODULES dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------------------ dnl dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make dnl and preprocessor variable. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES # Copyright (C) 2002-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.17' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.17], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.17])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([_AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl AC_REQUIRE([_AM_PROG_RM_F]) AC_REQUIRE([_AM_PROG_XARGS_N]) dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2022-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_RM_F # --------------- # Check whether 'rm -f' without any arguments works. # https://bugs.gnu.org/10828 AC_DEFUN([_AM_PROG_RM_F], [am__rm_f_notfound= AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""']) AC_SUBST(am__rm_f_notfound) ]) # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SLEEP_FRACTIONAL_SECONDS # ---------------------------- AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl AC_CACHE_CHECK([whether sleep supports fractional seconds], am_cv_sleep_fractional_seconds, [dnl AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes], [am_cv_sleep_fractional_seconds=no]) ])]) # _AM_FILESYSTEM_TIMESTAMP_RESOLUTION # ----------------------------------- # Determine the filesystem's resolution for file modification # timestamps. The coarsest we know of is FAT, with a resolution # of only two seconds, even with the most recent "exFAT" extensions. # The finest (e.g. ext4 with large inodes, XFS, ZFS) is one # nanosecond, matching clock_gettime. However, it is probably not # possible to delay execution of a shell script for less than one # millisecond, due to process creation overhead and scheduling # granularity, so we don't check for anything finer than that. (See below.) AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS]) AC_CACHE_CHECK([filesystem timestamp resolution], am_cv_filesystem_timestamp_resolution, [dnl # Default to the worst case. am_cv_filesystem_timestamp_resolution=2 # Only try to go finer than 1 sec if sleep can do it. # Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, # - 1 sec is not much of a win compared to 2 sec, and # - it takes 2 seconds to perform the test whether 1 sec works. # # Instead, just use the default 2s on platforms that have 1s resolution, # accept the extra 1s delay when using $sleep in the Automake tests, in # exchange for not incurring the 2s delay for running the test for all # packages. # am_try_resolutions= if test "$am_cv_sleep_fractional_seconds" = yes; then # Even a millisecond often causes a bunch of false positives, # so just try a hundredth of a second. The time saved between .001 and # .01 is not terribly consequential. am_try_resolutions="0.01 0.1 $am_try_resolutions" fi # In order to catch current-generation FAT out, we must *modify* files # that already exist; the *creation* timestamp is finer. Use names # that make ls -t sort them differently when they have equal # timestamps than when they have distinct timestamps, keeping # in mind that ls -t prints the *newest* file first. rm -f conftest.ts? : > conftest.ts1 : > conftest.ts2 : > conftest.ts3 # Make sure ls -t actually works. Do 'set' in a subshell so we don't # clobber the current shell's arguments. (Outer-level square brackets # are removed by m4; they're present so that m4 does not expand # ; be careful, easy to get confused.) if ( set X `[ls -t conftest.ts[12]]` && { test "$[]*" != "X conftest.ts1 conftest.ts2" || test "$[]*" != "X conftest.ts2 conftest.ts1"; } ); then :; else # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". _AS_ECHO_UNQUOTED( ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""], [AS_MESSAGE_LOG_FD]) AC_MSG_FAILURE([ls -t produces unexpected output. Make sure there is not a broken ls alias in your environment.]) fi for am_try_res in $am_try_resolutions; do # Any one fine-grained sleep might happen to cross the boundary # between two values of a coarser actual resolution, but if we do # two fine-grained sleeps in a row, at least one of them will fall # entirely within a coarse interval. echo alpha > conftest.ts1 sleep $am_try_res echo beta > conftest.ts2 sleep $am_try_res echo gamma > conftest.ts3 # We assume that 'ls -t' will make use of high-resolution # timestamps if the operating system supports them at all. if (set X `ls -t conftest.ts?` && test "$[]2" = conftest.ts3 && test "$[]3" = conftest.ts2 && test "$[]4" = conftest.ts1); then # # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, # because we don't need to test make. make_ok=true if test $am_try_res != 1; then # But if we've succeeded so far with a subsecond resolution, we # have one more thing to check: make. It can happen that # everything else supports the subsecond mtimes, but make doesn't; # notably on macOS, which ships make 3.81 from 2006 (the last one # released under GPLv2). https://bugs.gnu.org/68808 # # We test $MAKE if it is defined in the environment, else "make". # It might get overridden later, but our hope is that in practice # it does not matter: it is the system "make" which is (by far) # the most likely to be broken, whereas if the user overrides it, # probably they did so with a better, or at least not worse, make. # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html # # Create a Makefile (real tab character here): rm -f conftest.mk echo 'conftest.ts1: conftest.ts2' >conftest.mk echo ' touch conftest.ts2' >>conftest.mk # # Now, running # touch conftest.ts1; touch conftest.ts2; make # should touch ts1 because ts2 is newer. This could happen by luck, # but most often, it will fail if make's support is insufficient. So # test for several consecutive successes. # # (We reuse conftest.ts[12] because we still want to modify existing # files, not create new ones, per above.) n=0 make=${MAKE-make} until test $n -eq 3; do echo one > conftest.ts1 sleep $am_try_res echo two > conftest.ts2 # ts2 should now be newer than ts1 if $make -f conftest.mk | grep 'up to date' >/dev/null; then make_ok=false break # out of $n loop fi n=`expr $n + 1` done fi # if $make_ok; then # Everything we know to check worked out, so call this resolution good. am_cv_filesystem_timestamp_resolution=$am_try_res break # out of $am_try_res loop fi # Otherwise, we'll go on to check the next resolution. fi done rm -f conftest.ts? # (end _am_filesystem_timestamp_resolution) ])]) # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION]) # This check should not be cached, as it may vary across builds of # different projects. AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). am_build_env_is_sane=no am_has_slept=no rm -f conftest.file for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[]*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi test "$[]2" = conftest.file ); then am_build_env_is_sane=yes break fi # Just in case. sleep "$am_cv_filesystem_timestamp_resolution" am_has_slept=yes done AC_MSG_RESULT([$am_build_env_is_sane]) if test "$am_build_env_is_sane" = no; then AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! ]) AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SILENT_RULES # ---------------- # Enable less verbose build rules support. AC_DEFUN([_AM_SILENT_RULES], [AM_DEFAULT_VERBOSITY=1 AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls dnl to AM_SILENT_RULES to change the default value. AC_CONFIG_COMMANDS_PRE([dnl case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; esac if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi ])dnl ]) # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or # empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_REQUIRE([_AM_SILENT_RULES]) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])]) # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test x$am_uid = xunknown; then AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work]) elif test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test x$gm_gid = xunknown; then AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work]) elif test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR # Copyright (C) 2022-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_XARGS_N # ---------------- # Check whether 'xargs -n' works. It should work everywhere, so the fallback # is not optimized at all as we never expect to use it. AC_DEFUN([_AM_PROG_XARGS_N], [AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])]) AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }' ])dnl AC_SUBST(am__xargs_n) ]) m4_include([acinclude.m4]) aide-0.19/README0000644000175000017500000001333614774244714006732 AIDE - Advanced Intrusion Detection Environment ------------------------------------------------- Version 0.19 This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extend permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Introduction ------------ AIDE is a tool for monitoring file system changes. It can be used to detect unauthorized monitored files and directories. AIDE was written to be a simple and free alternative to Tripwire. Features currently included in AIDE are as follows: o File attributes monitored: permissions, inode, user, group file size, mtime, atime, ctime, links and growing size. o Multiple checksums and hashes supported o Plain text configuration files and database for simplicity. o Rules, variables and macros that can be customized to local site or system policies. o Powerful regular expression support to selectively include or exclude files and directories to be monitored. o gzip database compression if zlib support is compiled in. o Free software licensed under the GNU General Public License v2. The homepage of AIDE is https://aide.github.io Current Version --------------- AIDE is currently maintained on GitHub. Please visit https://github.com/aide/aide/ to get the newest version of the source code. Documentation ------------- The documentation for AIDE can be found in the doc/ directory. Installation ------------ If you are using a git version of the source you need to generate the configuration files first: $ ./autogen.sh For generic installation instructions please see the INSTALL file (generated by autogen.sh). In short, just type: $ ./configure $ make $ make install See './configure --help' for the available configuration options. Dynamic versus Static Linking ----------------------------- Formerly aide was linked statically by default to reduce the attack vector of compromised shared libraries and to ease client/server monitoring configurations. However an attacker could still simply replace the statically linked binary, tamper the database file or use dynamically loaded kernel modules to change the behaviour of AIDe. These days many Linux distributions (eg Centos/Oracle Linux), operating systems (eg Mac OS/OpenSolaris) and libaries have dropped support for static linking. Hence starting with releae v0.18 AIDE is linked dynamically by default. To re-enable static linking use '--enable-static' when configuring AIDE. Source Code Verification ------------------------ We highly recommend checking that the version of AIDE downloaded and installed is an original and unmodified one. You can either verify the source tarball or the git tag. To check the supplied signature with GnuPG: $ gpg --verify aide-.tar.gz.asc This checks that the detached signature file is indeed a signature of aide-.tar.gz. To validate the gpg signature of the git tag: $ git verify-tag v The current public key needed for signature verification is: pub 4096R/68E7B931 2011-06-28 [expires: 2025-06-27] uid Hannes von Haugwitz If you do not have this key, you can get it from one of the well known PGP key servers. You have to make sure that the key you install is not a faked one. You can do this with reasonable assurance by comparing the output of: $ gpg --fingerprint 2BBBD30FAAB29B3253BCFBA6F6947DAB68E7B931 with the fingerprint published elsewhere. Requirements ------------ AIDE requires the following development tools: o C99 compatible compiler. o GNU Autoconf o GNU Autoconf Macro Archive o GNU Automake o GNU flex. o GNU yacc (bison). o GNU make. o pkg-config o PCRE2 library (libpcre2-8, library with 8-bit code unit support) o libnettle (>= 3.7) or libgcrypt o libcheck (optional, needed for 'make check', license: LGPL-2.1) Note: flex version 2.5.31 is broken, you might see the following error conf_lex.c: In function `conflex': conf_lex.c:4728: error: `yy_prev_more_offset' undeclared (first use in this function) conf_lex.c:4728: error: (Each undeclared identifier is reported only once conf_lex.c:4728: error: for each function it appears in.) Either downgrade to flex 2.5.4 or get an updated version that fixes this bug. Large File Support ----------------- To be able to store the size of files larger than 2GB, AIDE needs large file support (LFS) to be available in the OS. The configure script automatically checks for LFS. To turn off LFS call the configure script with the '-disable-largefile' option. Feedback and Support -------------------- End user support is available on the AIDE mailing list: https://www.ipi.fi/mailman/listinfo/aide An archive for the mailing list archive is available online: http://www.ipi.fi/pipermail/aide/ Please report bugs and feature requests to the aide issue tracker https://github.com/aide/aide/issues Credits ------- Please see the AUTHORS file. aide-0.19/version.m40000644000175000017500000000004214774244721007765 m4_define([AIDE_VERSION], [0.19]) aide-0.19/src/0000755000175000017500000000000014774244735006716 5aide-0.19/src/conf_lex.c0000644000175000017500000026235114774244734010607 #line 2 "src/conf_lex.c" #line 4 "src/conf_lex.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer conf_create_buffer #define yy_delete_buffer conf_delete_buffer #define yy_scan_buffer conf_scan_buffer #define yy_scan_string conf_scan_string #define yy_scan_bytes conf_scan_bytes #define yy_init_buffer conf_init_buffer #define yy_flush_buffer conf_flush_buffer #define yy_load_buffer_state conf_load_buffer_state #define yy_switch_to_buffer conf_switch_to_buffer #define yypush_buffer_state confpush_buffer_state #define yypop_buffer_state confpop_buffer_state #define yyensure_buffer_stack confensure_buffer_stack #define yy_flex_debug conf_flex_debug #define yyin confin #define yyleng confleng #define yylex conflex #define yylineno conflineno #define yyout confout #define yyrestart confrestart #define yytext conftext #define yywrap confwrap #define yyalloc confalloc #define yyrealloc confrealloc #define yyfree conffree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 #define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif #ifdef yy_create_buffer #define conf_create_buffer_ALREADY_DEFINED #else #define yy_create_buffer conf_create_buffer #endif #ifdef yy_delete_buffer #define conf_delete_buffer_ALREADY_DEFINED #else #define yy_delete_buffer conf_delete_buffer #endif #ifdef yy_scan_buffer #define conf_scan_buffer_ALREADY_DEFINED #else #define yy_scan_buffer conf_scan_buffer #endif #ifdef yy_scan_string #define conf_scan_string_ALREADY_DEFINED #else #define yy_scan_string conf_scan_string #endif #ifdef yy_scan_bytes #define conf_scan_bytes_ALREADY_DEFINED #else #define yy_scan_bytes conf_scan_bytes #endif #ifdef yy_init_buffer #define conf_init_buffer_ALREADY_DEFINED #else #define yy_init_buffer conf_init_buffer #endif #ifdef yy_flush_buffer #define conf_flush_buffer_ALREADY_DEFINED #else #define yy_flush_buffer conf_flush_buffer #endif #ifdef yy_load_buffer_state #define conf_load_buffer_state_ALREADY_DEFINED #else #define yy_load_buffer_state conf_load_buffer_state #endif #ifdef yy_switch_to_buffer #define conf_switch_to_buffer_ALREADY_DEFINED #else #define yy_switch_to_buffer conf_switch_to_buffer #endif #ifdef yypush_buffer_state #define confpush_buffer_state_ALREADY_DEFINED #else #define yypush_buffer_state confpush_buffer_state #endif #ifdef yypop_buffer_state #define confpop_buffer_state_ALREADY_DEFINED #else #define yypop_buffer_state confpop_buffer_state #endif #ifdef yyensure_buffer_stack #define confensure_buffer_stack_ALREADY_DEFINED #else #define yyensure_buffer_stack confensure_buffer_stack #endif #ifdef yylex #define conflex_ALREADY_DEFINED #else #define yylex conflex #endif #ifdef yyrestart #define confrestart_ALREADY_DEFINED #else #define yyrestart confrestart #endif #ifdef yylex_init #define conflex_init_ALREADY_DEFINED #else #define yylex_init conflex_init #endif #ifdef yylex_init_extra #define conflex_init_extra_ALREADY_DEFINED #else #define yylex_init_extra conflex_init_extra #endif #ifdef yylex_destroy #define conflex_destroy_ALREADY_DEFINED #else #define yylex_destroy conflex_destroy #endif #ifdef yyget_debug #define confget_debug_ALREADY_DEFINED #else #define yyget_debug confget_debug #endif #ifdef yyset_debug #define confset_debug_ALREADY_DEFINED #else #define yyset_debug confset_debug #endif #ifdef yyget_extra #define confget_extra_ALREADY_DEFINED #else #define yyget_extra confget_extra #endif #ifdef yyset_extra #define confset_extra_ALREADY_DEFINED #else #define yyset_extra confset_extra #endif #ifdef yyget_in #define confget_in_ALREADY_DEFINED #else #define yyget_in confget_in #endif #ifdef yyset_in #define confset_in_ALREADY_DEFINED #else #define yyset_in confset_in #endif #ifdef yyget_out #define confget_out_ALREADY_DEFINED #else #define yyget_out confget_out #endif #ifdef yyset_out #define confset_out_ALREADY_DEFINED #else #define yyset_out confset_out #endif #ifdef yyget_leng #define confget_leng_ALREADY_DEFINED #else #define yyget_leng confget_leng #endif #ifdef yyget_text #define confget_text_ALREADY_DEFINED #else #define yyget_text confget_text #endif #ifdef yyget_lineno #define confget_lineno_ALREADY_DEFINED #else #define yyget_lineno confget_lineno #endif #ifdef yyset_lineno #define confset_lineno_ALREADY_DEFINED #else #define yyset_lineno confset_lineno #endif #ifdef yywrap #define confwrap_ALREADY_DEFINED #else #define yywrap confwrap #endif #ifdef yyalloc #define confalloc_ALREADY_DEFINED #else #define yyalloc confalloc #endif #ifdef yyrealloc #define confrealloc_ALREADY_DEFINED #else #define yyrealloc confrealloc #endif #ifdef yyfree #define conffree_ALREADY_DEFINED #else #define yyfree conffree #endif #ifdef yytext #define conftext_ALREADY_DEFINED #else #define yytext conftext #endif #ifdef yyleng #define confleng_ALREADY_DEFINED #else #define yyleng confleng #endif #ifdef yyin #define confin_ALREADY_DEFINED #else #define yyin confin #endif #ifdef yyout #define confout_ALREADY_DEFINED #else #define yyout confout #endif #ifdef yy_flex_debug #define conf_flex_debug_ALREADY_DEFINED #else #define yy_flex_debug conf_flex_debug #endif #ifdef yylineno #define conflineno_ALREADY_DEFINED #else #define yylineno conflineno #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX #define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ /* begin standard C++ headers. */ /* TODO: this is always defined, so inline it */ #define yyconst const #if defined(__GNUC__) && __GNUC__ >= 3 #define yynoreturn __attribute__((__noreturn__)) #else #define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart ( FILE *input_file ); void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); void yy_delete_buffer ( YY_BUFFER_STATE b ); void yy_flush_buffer ( YY_BUFFER_STATE b ); void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); void yypop_buffer_state ( void ); static void yyensure_buffer_stack ( void ); static void yy_load_buffer_state ( void ); static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); void *yyalloc ( yy_size_t ); void *yyrealloc ( void *, yy_size_t ); void yyfree ( void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef flex_uint8_t YY_CHAR; FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #ifdef yytext_ptr #undef yytext_ptr #endif #define yytext_ptr yytext static yy_state_type yy_get_previous_state ( void ); static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); static int yy_get_next_buffer ( void ); static void yynoreturn yy_fatal_error ( const char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 80 #define YY_END_OF_BUFFER 81 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static const flex_int16_t yy_accept[494] = { 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 79, 80, 3, 3, 2, 79, 3, 36, 78, 79, 79, 4, 66, 79, 6, 65, 79, 79, 65, 65, 65, 65, 65, 65, 65, 65, 65, 16, 35, 11, 12, 14, 13, 10, 15, 79, 9, 69, 75, 71, 71, 73, 72, 79, 67, 77, 76, 25, 25, 25, 25, 25, 25, 74, 3, 3, 2, 0, 3, 3, 1, 0, 36, 78, 7, 4, 66, 8, 65, 5, 0, 66, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 16, 35, 35, 11, 0, 9, 9, 69, 75, 0, 70, 73, 72, 0, 67, 67, 76, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 0, 0, 0, 0, 20, 0, 0, 0, 0, 19, 0, 0, 0, 66, 65, 65, 65, 66, 66, 65, 65, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, 65, 66, 64, 64, 65, 66, 66, 68, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, 65, 64, 64, 64, 65, 64, 64, 0, 23, 0, 0, 0, 29, 26, 0, 0, 0, 0, 18, 0, 66, 66, 65, 64, 64, 64, 66, 64, 64, 21, 0, 0, 17, 30, 27, 0, 0, 0, 64, 64, 64, 65, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 22, 0, 31, 32, 0, 64, 64, 64, 66, 64, 51, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 64, 64, 64, 64, 64, 64, 64, 59, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 53, 64, 66, 24, 33, 64, 64, 64, 64, 64, 37, 64, 64, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 60, 64, 0, 64, 64, 64, 64, 64, 39, 38, 64, 66, 64, 64, 64, 64, 64, 46, 56, 64, 64, 0, 64, 66, 64, 66, 64, 57, 55, 64, 66, 45, 64, 64, 64, 64, 0, 64, 64, 61, 64, 40, 64, 64, 42, 66, 64, 64, 0, 66, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 64, 64, 64, 66, 64, 64, 64, 66, 64, 64, 64, 0, 64, 64, 64, 64, 64, 64, 64, 66, 64, 66, 64, 34, 64, 66, 64, 64, 50, 64, 64, 66, 64, 64, 41, 64, 64, 64, 64, 64, 64, 66, 64, 64, 64, 64, 64, 54, 66, 64, 66, 64, 64, 44, 64, 52, 64, 64, 66, 64, 64, 64, 64, 66, 66, 66, 64, 64, 64, 64, 58, 64, 64, 64, 64, 64, 64, 43, 64, 47, 64, 64, 64, 64, 64, 64, 49, 48, 64, 64, 64, 66, 64, 64, 64, 64, 62, 0 } ; static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 1, 7, 1, 8, 1, 1, 1, 1, 1, 9, 10, 11, 1, 12, 13, 14, 15, 16, 16, 16, 17, 16, 16, 16, 1, 1, 1, 18, 19, 1, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 1, 22, 1, 1, 23, 1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 8, 1, 1, 8, 1, 1, 1, 1, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 8, 1, 1, 1 } ; static const YY_CHAR yy_meta[52] = { 0, 1, 2, 3, 3, 2, 1, 1, 4, 1, 1, 1, 1, 5, 5, 5, 5, 5, 1, 6, 2, 5, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1 } ; static const flex_int16_t yy_base[513] = { 0, 855, 0, 7, 0, 58, 109, 160, 0, 211, 262, 68, 78, 85, 120, 130, 134, 223, 232, 88, 99, 95, 141, 312, 356, 236, 274, 857, 859, 859, 0, 244, 859, 853, 71, 146, 859, 852, 842, 0, 0, 841, 859, 71, 840, 831, 394, 413, 812, 825, 799, 809, 802, 57, 821, 0, 272, 0, 859, 859, 859, 0, 859, 214, 839, 0, 153, 823, 237, 248, 288, 265, 837, 859, 290, 859, 813, 793, 801, 800, 809, 295, 0, 299, 859, 833, 295, 304, 859, 832, 316, 859, 859, 0, 0, 859, 118, 859, 297, 429, 0, 799, 796, 789, 799, 800, 793, 789, 789, 785, 0, 317, 337, 0, 304, 820, 819, 0, 318, 773, 859, 333, 340, 350, 817, 816, 360, 791, 787, 776, 774, 775, 361, 787, 112, 282, 777, 790, 445, 789, 782, 786, 770, 785, 784, 768, 762, 767, 0, 771, 760, 758, 859, 758, 770, 756, 770, 340, 770, 768, 762, 207, 761, 767, 768, 313, 107, 749, 766, 765, 736, 749, 742, 747, 751, 750, 753, 748, 751, 740, 342, 742, 748, 738, 736, 743, 748, 347, 743, 732, 726, 287, 349, 859, 740, 725, 742, 727, 727, 859, 734, 733, 719, 732, 721, 714, 728, 730, 732, 731, 711, 727, 706, 709, 726, 707, 719, 719, 859, 709, 707, 715, 859, 859, 699, 712, 698, 712, 859, 703, 304, 352, 709, 698, 707, 700, 446, 705, 708, 859, 703, 707, 859, 859, 859, 686, 700, 683, 678, 694, 696, 700, 678, 686, 692, 680, 694, 689, 678, 674, 684, 685, 668, 667, 669, 680, 681, 859, 677, 859, 859, 679, 669, 676, 662, 357, 659, 0, 660, 661, 657, 655, 656, 658, 658, 649, 661, 656, 656, 658, 666, 660, 659, 651, 659, 642, 355, 646, 654, 637, 0, 638, 651, 650, 653, 255, 632, 637, 646, 645, 636, 0, 624, 305, 859, 647, 637, 634, 635, 639, 622, 0, 618, 620, 0, 625, 647, 628, 631, 634, 618, 615, 620, 611, 629, 0, 604, 609, 613, 626, 610, 624, 605, 0, 0, 618, 627, 608, 619, 598, 612, 611, 0, 0, 597, 601, 608, 601, 333, 597, 363, 591, 0, 0, 604, 367, 0, 604, 607, 597, 593, 584, 603, 601, 0, 596, 0, 596, 579, 0, 390, 572, 588, 591, 377, 577, 574, 593, 572, 587, 582, 597, 583, 582, 572, 571, 569, 569, 581, 373, 563, 576, 578, 572, 564, 576, 564, 552, 561, 572, 567, 556, 550, 563, 553, 547, 550, 362, 545, 859, 551, 380, 561, 552, 0, 556, 552, 557, 535, 548, 0, 540, 540, 533, 532, 551, 545, 529, 536, 539, 501, 494, 465, 0, 399, 460, 442, 457, 446, 0, 454, 0, 437, 456, 436, 451, 442, 425, 422, 409, 422, 415, 435, 414, 415, 412, 0, 411, 409, 408, 406, 404, 398, 0, 408, 0, 394, 384, 393, 370, 362, 349, 0, 0, 336, 310, 282, 43, 216, 220, 129, 59, 0, 859, 490, 496, 502, 508, 514, 520, 526, 532, 538, 544, 547, 549, 551, 553, 1, 555, 561, 564, 566 } ; static const flex_int16_t yy_def[513] = { 0, 494, 495, 493, 3, 496, 496, 493, 7, 497, 497, 494, 494, 498, 498, 498, 498, 498, 498, 494, 494, 499, 499, 500, 500, 498, 498, 493, 493, 493, 501, 501, 493, 493, 502, 493, 493, 493, 493, 503, 504, 493, 493, 505, 493, 493, 506, 506, 47, 47, 47, 47, 47, 47, 47, 507, 508, 509, 493, 493, 493, 509, 493, 493, 493, 510, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 501, 501, 493, 493, 502, 502, 493, 493, 493, 493, 493, 503, 504, 493, 505, 493, 493, 511, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 507, 508, 508, 509, 493, 493, 493, 510, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 511, 47, 47, 47, 47, 47, 47, 47, 47, 47, 512, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 138, 47, 47, 47, 138, 138, 47, 47, 47, 512, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 138, 47, 47, 138, 138, 138, 47, 138, 138, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 138, 47, 47, 138, 138, 138, 47, 138, 138, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 138, 138, 47, 138, 138, 138, 138, 138, 138, 493, 493, 493, 493, 493, 493, 493, 493, 493, 138, 138, 138, 47, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 493, 493, 493, 493, 493, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 493, 493, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 493, 493, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 493, 138, 138, 138, 138, 138, 138, 138, 138, 504, 138, 138, 138, 138, 138, 138, 138, 138, 138, 493, 138, 138, 138, 138, 138, 138, 504, 138, 138, 138, 138, 138, 138, 138, 493, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 493, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 493, 138, 138, 138, 138, 138, 138, 138, 504, 138, 138, 138, 493, 138, 138, 138, 138, 138, 138, 138, 504, 138, 138, 138, 493, 138, 138, 138, 138, 138, 138, 138, 504, 138, 138, 138, 138, 138, 138, 138, 138, 138, 504, 138, 138, 138, 138, 138, 138, 138, 138, 504, 138, 138, 138, 138, 138, 138, 138, 504, 138, 138, 138, 138, 138, 504, 138, 138, 138, 138, 138, 504, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 0, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493 } ; static const flex_int16_t yy_nxt[911] = { 0, 493, 31, 32, 33, 31, 112, 34, 28, 35, 36, 37, 35, 38, 39, 40, 28, 28, 41, 42, 43, 43, 43, 43, 43, 44, 28, 45, 43, 28, 40, 46, 47, 48, 49, 47, 47, 50, 47, 47, 47, 47, 51, 47, 52, 47, 47, 47, 53, 47, 47, 47, 47, 54, 47, 47, 47, 28, 28, 28, 35, 36, 37, 35, 28, 28, 94, 28, 28, 28, 28, 36, 37, 63, 88, 89, 28, 28, 28, 94, 28, 36, 37, 63, 488, 107, 64, 66, 36, 37, 66, 36, 37, 71, 94, 108, 64, 74, 36, 37, 74, 492, 36, 37, 71, 67, 72, 68, 28, 28, 28, 35, 36, 37, 35, 28, 28, 72, 28, 28, 28, 28, 66, 36, 37, 66, 94, 28, 28, 28, 94, 28, 69, 36, 37, 69, 69, 36, 37, 69, 67, 94, 68, 74, 36, 37, 74, 155, 90, 156, 67, 90, 68, 189, 67, 118, 68, 491, 118, 28, 28, 28, 35, 36, 37, 35, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 56, 28, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 28, 28, 28, 35, 36, 37, 35, 28, 28, 114, 58, 59, 60, 28, 61, 70, 36, 37, 70, 62, 94, 28, 115, 28, 70, 36, 37, 70, 81, 29, 28, 81, 120, 67, 184, 68, 83, 84, 85, 83, 121, 86, 67, 121, 68, 490, 67, 120, 68, 120, 489, 28, 28, 28, 35, 36, 37, 35, 28, 28, 123, 58, 59, 60, 28, 61, 81, 29, 28, 81, 62, 328, 28, 124, 28, 111, 111, 111, 111, 111, 122, 329, 126, 122, 67, 126, 68, 132, 88, 89, 132, 83, 84, 85, 83, 487, 86, 88, 89, 114, 94, 157, 28, 28, 35, 29, 28, 35, 90, 158, 118, 90, 115, 118, 133, 134, 215, 94, 94, 135, 111, 111, 111, 111, 111, 121, 94, 486, 121, 76, 77, 136, 122, 78, 137, 122, 248, 336, 188, 79, 111, 111, 111, 111, 111, 123, 94, 80, 35, 29, 28, 35, 126, 132, 485, 126, 132, 178, 124, 203, 94, 179, 94, 204, 211, 94, 216, 180, 249, 373, 94, 296, 319, 76, 77, 94, 94, 78, 429, 297, 94, 378, 484, 79, 298, 299, 94, 250, 320, 375, 94, 80, 94, 94, 483, 411, 396, 96, 96, 96, 96, 96, 482, 94, 389, 96, 390, 99, 391, 481, 101, 94, 94, 452, 432, 480, 96, 96, 96, 96, 96, 392, 94, 465, 96, 479, 99, 94, 94, 467, 478, 477, 94, 94, 94, 94, 94, 476, 475, 474, 94, 473, 94, 94, 472, 471, 470, 469, 94, 94, 94, 94, 94, 468, 466, 464, 94, 463, 99, 94, 255, 256, 462, 257, 461, 258, 259, 460, 260, 459, 458, 261, 457, 456, 455, 454, 262, 453, 263, 451, 264, 28, 28, 28, 28, 28, 28, 30, 30, 30, 30, 30, 30, 55, 55, 55, 55, 55, 55, 57, 57, 57, 57, 57, 57, 65, 65, 65, 65, 65, 65, 73, 73, 73, 73, 73, 73, 75, 75, 75, 75, 75, 75, 82, 82, 450, 82, 82, 82, 87, 87, 87, 87, 87, 87, 93, 93, 449, 93, 93, 93, 94, 94, 96, 96, 100, 100, 110, 110, 113, 113, 113, 117, 448, 447, 117, 117, 117, 138, 138, 170, 170, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 431, 430, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 395, 394, 393, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 377, 376, 374, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 335, 334, 333, 332, 331, 330, 327, 326, 325, 324, 323, 322, 321, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 254, 253, 252, 251, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 214, 213, 212, 210, 209, 208, 207, 206, 205, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 187, 186, 185, 183, 182, 181, 177, 176, 175, 174, 173, 172, 171, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 154, 153, 152, 151, 150, 149, 125, 125, 148, 116, 116, 147, 146, 145, 144, 143, 142, 141, 140, 139, 88, 84, 131, 130, 129, 128, 127, 125, 119, 116, 109, 106, 105, 104, 103, 102, 98, 97, 95, 92, 91, 84, 493, 29, 27, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493 } ; static const flex_int16_t yy_chk[911] = { 0, 0, 2, 2, 2, 2, 508, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 487, 5, 5, 5, 5, 11, 11, 11, 34, 34, 5, 5, 5, 43, 5, 12, 12, 12, 487, 53, 11, 13, 13, 13, 13, 19, 19, 19, 43, 53, 12, 21, 21, 21, 21, 491, 20, 20, 20, 13, 19, 13, 5, 5, 6, 6, 6, 6, 6, 6, 6, 20, 6, 6, 6, 6, 14, 14, 14, 14, 96, 6, 6, 6, 166, 6, 15, 15, 15, 15, 16, 16, 16, 16, 14, 96, 14, 22, 22, 22, 22, 134, 35, 134, 15, 35, 15, 166, 16, 66, 16, 490, 66, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 63, 9, 9, 9, 9, 9, 17, 17, 17, 17, 9, 161, 9, 63, 9, 18, 18, 18, 18, 25, 25, 25, 25, 68, 17, 161, 17, 31, 31, 31, 31, 69, 31, 18, 69, 18, 489, 25, 68, 25, 68, 488, 9, 9, 10, 10, 10, 10, 10, 10, 10, 71, 10, 10, 10, 10, 10, 26, 26, 26, 26, 10, 305, 10, 71, 10, 56, 56, 56, 56, 56, 70, 305, 74, 70, 26, 74, 26, 81, 86, 86, 81, 83, 83, 83, 83, 486, 83, 87, 87, 114, 191, 135, 10, 10, 23, 23, 23, 23, 90, 135, 118, 90, 114, 118, 98, 98, 191, 230, 313, 98, 111, 111, 111, 111, 111, 121, 165, 485, 121, 23, 23, 98, 122, 23, 98, 122, 230, 313, 165, 23, 112, 112, 112, 112, 112, 123, 358, 23, 24, 24, 24, 24, 126, 132, 484, 126, 132, 157, 123, 180, 187, 157, 192, 180, 187, 231, 192, 157, 231, 358, 275, 275, 296, 24, 24, 417, 360, 24, 417, 275, 365, 365, 481, 24, 275, 275, 399, 231, 296, 360, 384, 24, 46, 421, 480, 399, 384, 46, 46, 46, 46, 46, 479, 380, 380, 46, 380, 46, 380, 478, 46, 47, 444, 444, 421, 477, 47, 47, 47, 47, 47, 380, 459, 459, 47, 476, 47, 99, 461, 461, 474, 472, 99, 99, 99, 99, 99, 471, 470, 469, 99, 468, 99, 138, 467, 465, 464, 463, 138, 138, 138, 138, 138, 462, 460, 458, 138, 457, 138, 236, 236, 236, 456, 236, 455, 236, 236, 454, 236, 453, 452, 236, 450, 448, 447, 446, 236, 445, 236, 442, 236, 494, 494, 494, 494, 494, 494, 495, 495, 495, 495, 495, 495, 496, 496, 496, 496, 496, 496, 497, 497, 497, 497, 497, 497, 498, 498, 498, 498, 498, 498, 499, 499, 499, 499, 499, 499, 500, 500, 500, 500, 500, 500, 501, 501, 441, 501, 501, 501, 502, 502, 502, 502, 502, 502, 503, 503, 440, 503, 503, 503, 504, 504, 505, 505, 506, 506, 507, 507, 509, 509, 509, 510, 439, 438, 510, 510, 510, 511, 511, 512, 512, 437, 436, 435, 434, 433, 432, 431, 429, 428, 427, 426, 425, 423, 422, 420, 418, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 383, 382, 381, 378, 377, 375, 373, 372, 371, 370, 369, 368, 367, 364, 361, 359, 357, 356, 355, 354, 351, 350, 349, 348, 347, 346, 345, 342, 341, 340, 339, 338, 337, 336, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 323, 322, 320, 319, 318, 317, 316, 315, 312, 310, 309, 308, 307, 306, 304, 303, 302, 301, 299, 298, 297, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 276, 274, 273, 272, 271, 268, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 241, 240, 238, 237, 235, 234, 233, 232, 229, 227, 226, 225, 224, 221, 220, 219, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 198, 197, 196, 195, 194, 190, 189, 188, 186, 185, 184, 183, 182, 181, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 164, 163, 162, 160, 159, 158, 156, 155, 154, 153, 151, 150, 149, 147, 146, 145, 144, 143, 142, 141, 140, 139, 137, 136, 133, 131, 130, 129, 128, 127, 125, 124, 119, 116, 115, 109, 108, 107, 106, 105, 104, 103, 102, 101, 89, 85, 80, 79, 78, 77, 76, 72, 67, 64, 54, 52, 51, 50, 49, 48, 45, 44, 41, 38, 37, 33, 27, 1, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "src/conf_lex.l" #line 9 "src/conf_lex.l" #define YYDEBUG 1 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2004-2006, 2010-2013, 2015-2016, 2019-2025 * Rami Lehti, Pablo Virolainen, Richard van den Berg, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "util.h" #include "conf_yacc.h" #include "errorcodes.h" #include "commandconf.h" #include "log.h" #include "progress.h" #include "conf_ast.h" #define LOG_LEX_TOKEN(log_level, token, text) \ log_msg(log_level, "%s:%d: \u2502 " #token " (text: '%s')", conf_filename, conf_linenumber, text); #define LOG_CONFIG_LINE(log_level, msg) \ log_msg(log_level, "%s:%d: %s (line: '%s')", conf_filename, conf_linenumber, msg, conf_linebuf); #define DEPRECATION_NOTICE(deprecated_option, new_option) \ log_msg(LOG_LEVEL_NOTICE, "%s:%d: Using '%s' is DEPRECATED and will be removed in the release after next. Update your config and use '%s' instead (line: '%s')", conf_filename, conf_linenumber, deprecated_option, new_option ,conf_linebuf); #define DEPRECATION_WARNING(deprecated_option, new_option) \ log_msg(LOG_LEVEL_WARNING, "%s:%d: Using '%s' is DEPRECATED and will be removed in the next release.. Update your config and use '%s' instead (line: '%s')", conf_filename, conf_linenumber, deprecated_option, new_option ,conf_linebuf); int conf_linenumber = 0; char *conf_filename; char *conf_linebuf; LOG_LEVEL lex_log_level = LOG_LEVEL_DEBUG; #define YY_INPUT(buf,result,max_size) \ if( ((result=conf_input_wrapper(buf,max_size,confin)) == 0) \ && ferror(yyin) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #line 1127 "src/conf_lex.c" #define YY_NO_INPUT 1 #line 1130 "src/conf_lex.c" #define INITIAL 0 #define CONFIG 1 #define DEFSTMT 2 #define ENVVAR 3 #define EXPR 4 #define EXPREQUHUNT 5 #define PATH 6 #define STRING 7 #define STRINGS 8 #define STRINGEQHUNT 9 #define STRINGHUNT 10 #define CONDITION 11 #define CONDSTRING 12 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals ( void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy ( void ); int yyget_debug ( void ); void yyset_debug ( int debug_flag ); YY_EXTRA_TYPE yyget_extra ( void ); void yyset_extra ( YY_EXTRA_TYPE user_defined ); FILE *yyget_in ( void ); void yyset_in ( FILE * _in_str ); FILE *yyget_out ( void ); void yyset_out ( FILE * _out_str ); int yyget_leng ( void ); char *yyget_text ( void ); int yyget_lineno ( void ); void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap ( void ); #else extern int yywrap ( void ); #endif #endif #ifndef YY_NO_UNPUT #endif #ifndef yytext_ptr static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput ( void ); #else static int input ( void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ if ( yyleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { yy_state_type yy_current_state; char *yy_cp, *yy_bp; int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } yy_load_buffer_state( ); } { #line 71 "src/conf_lex.l" #line 1362 "src/conf_lex.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); yy_match: do { YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 494 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 859 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case YY_STATE_EOF(INITIAL): #line 72 "src/conf_lex.l" { log_msg(lex_log_level,"%s: - ", conf_filename); return (0); } YY_BREAK case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 76 "src/conf_lex.l" { conf_linebuf = checked_strndup(conftext, confleng-1); ++conf_linenumber; LOG_CONFIG_LINE(lex_log_level, "- skip comment line") free(conf_linebuf); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP #line 82 "src/conf_lex.l" { conf_linebuf = ""; ++conf_linenumber; LOG_CONFIG_LINE(lex_log_level, "- skip empty line") } YY_BREAK case 3: YY_RULE_SETUP #line 87 "src/conf_lex.l" { conf_linebuf = checked_strndup(conftext, confleng); ++conf_linenumber; log_msg(lex_log_level,"%s:%d: \u252c '%s'", conf_filename, conf_linenumber, conf_linebuf); yyless(0); BEGIN(CONFIG); } YY_BREAK case 4: YY_RULE_SETUP #line 94 "src/conf_lex.l" { /* inline comment */ LOG_LEX_TOKEN(lex_log_level, skip inline comment, conftext) } YY_BREAK case 5: YY_RULE_SETUP #line 98 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TEQURXRULE, "=") yyless(strchr(conftext,'/')-conftext); BEGIN(PATH); return (TEQURXRULE); } YY_BREAK case 6: YY_RULE_SETUP #line 105 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TSELRXRULE, "") yyless(strchr(conftext,'/')-conftext); BEGIN(PATH); return (TSELRXRULE); } YY_BREAK case 7: YY_RULE_SETUP #line 112 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TRECNEGRXRULE, "!") yyless(strchr(conftext,'/')-conftext); BEGIN(PATH); return (TRECNEGRXRULE); } YY_BREAK case 8: YY_RULE_SETUP #line 119 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TNONRECNEGRXRULE, "-") yyless(strchr(conftext,'/')-conftext); BEGIN(PATH); return (TNONRECNEGRXRULE); } YY_BREAK case 9: YY_RULE_SETUP #line 126 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, '=', conftext) BEGIN(EXPR); return('='); } YY_BREAK case 10: YY_RULE_SETUP #line 132 "src/conf_lex.l" { /* no restriction */ LOG_LEX_TOKEN(lex_log_level, '0', conftext) return ('0'); } YY_BREAK case 11: YY_RULE_SETUP #line 137 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TEXPR, conftext) conflval.s=checked_strdup(conftext); return (TEXPR); } YY_BREAK case 12: YY_RULE_SETUP #line 143 "src/conf_lex.l" { /* attribute operator */ LOG_LEX_TOKEN(lex_log_level, '+', conftext) return ('+'); } YY_BREAK case 13: YY_RULE_SETUP #line 148 "src/conf_lex.l" { /* attribute operator */ LOG_LEX_TOKEN(lex_log_level, '-', conftext) return ('-'); } YY_BREAK case 14: YY_RULE_SETUP #line 153 "src/conf_lex.l" { /* restriction separator */ LOG_LEX_TOKEN(lex_log_level, ',', conftext) return (','); } YY_BREAK case 15: YY_RULE_SETUP #line 158 "src/conf_lex.l" { /* restriction file system type separator */ LOG_LEX_TOKEN(lex_log_level, '=', conftext) return ('='); } YY_BREAK case 16: YY_RULE_SETUP #line 163 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TVARIABLE, conftext) conflval.s=checked_strdup(conftext); BEGIN(STRINGHUNT); return (TVARIABLE); } YY_BREAK case 17: YY_RULE_SETUP #line 170 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TDEFINE, conftext) BEGIN DEFSTMT; return (TDEFINE); } YY_BREAK case 18: YY_RULE_SETUP #line 176 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TUNDEFINE, conftext) BEGIN DEFSTMT; return (TUNDEFINE); } YY_BREAK case 19: YY_RULE_SETUP #line 182 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TIF, conftext) BEGIN(CONDITION); return (TIF); } YY_BREAK case 20: YY_RULE_SETUP #line 188 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TBOOLNOT, conftext) return (TBOOLNOT); } YY_BREAK case 21: YY_RULE_SETUP #line 193 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TBOOLFUNC (BOOL_OP_DEFINED), conftext) conflval.operator = BOOL_OP_DEFINED; BEGIN(STRINGHUNT); return (TBOOLFUNC); } YY_BREAK case 22: YY_RULE_SETUP #line 200 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TBOOLFUNC (BOOL_OP_HOSTNAME), conftext) conflval.operator = BOOL_OP_HOSTNAME; BEGIN(STRINGHUNT); return (TBOOLFUNC); } YY_BREAK case 23: YY_RULE_SETUP #line 207 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TBOOLFUNC (BOOL_OP_EXISTS), conftext) conflval.operator = BOOL_OP_EXISTS; BEGIN(STRINGHUNT); return (TBOOLFUNC); } YY_BREAK case 24: YY_RULE_SETUP #line 214 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TBOOLOP (BOOL_OP_VERSION_GE), conftext) conflval.operator = BOOL_OP_VERSION_GE; BEGIN(STRINGHUNT); return (TBOOLOP); } YY_BREAK case 25: YY_RULE_SETUP #line 221 "src/conf_lex.l" { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, found string -> unput, conftext) yyless(0); BEGIN(CONDSTRING); } YY_BREAK case 26: YY_RULE_SETUP #line 227 "src/conf_lex.l" { DEPRECATION_WARNING("@@ifdef", "@@if defined") LOG_LEX_TOKEN(lex_log_level, TIFDEF, conftext) BEGIN(STRINGHUNT); return (TIFDEF); } YY_BREAK case 27: YY_RULE_SETUP #line 234 "src/conf_lex.l" { DEPRECATION_WARNING("@@ifndef", "@@if not defined") LOG_LEX_TOKEN(lex_log_level, TIFNDEF, conftext) BEGIN(STRINGHUNT); return (TIFNDEF); } YY_BREAK case 28: YY_RULE_SETUP #line 241 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TELSE, conftext) BEGIN CONFIG; return (TELSE); } YY_BREAK case 29: YY_RULE_SETUP #line 247 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TENDIF, conftext) BEGIN CONFIG; return (TENDIF); } YY_BREAK case 30: YY_RULE_SETUP #line 253 "src/conf_lex.l" { DEPRECATION_WARNING("@@ifhost", "@@if hostname") LOG_LEX_TOKEN(lex_log_level, TIFHOST, conftext) BEGIN(STRINGHUNT); return (TIFHOST); } YY_BREAK case 31: YY_RULE_SETUP #line 260 "src/conf_lex.l" { DEPRECATION_WARNING("@@ifnhost", "@@if not hostname") LOG_LEX_TOKEN(lex_log_level, TIFNHOST, conftext) BEGIN(STRINGHUNT); return (TIFNHOST); } YY_BREAK case 32: YY_RULE_SETUP #line 267 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TINCLUDE, conftext) BEGIN(STRINGS); return (TINCLUDE); } YY_BREAK case 33: YY_RULE_SETUP #line 273 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TXINCLUDE, conftext) BEGIN(STRINGS); return (TXINCLUDE); } YY_BREAK case 34: YY_RULE_SETUP #line 279 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TSETENV, conftext) BEGIN ENVVAR; return (TSETENV); } YY_BREAK case 35: YY_RULE_SETUP #line 285 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TVARIABLE, conftext) conflval.s=checked_strdup(conftext); BEGIN(STRINGHUNT); return (TVARIABLE); } YY_BREAK case 36: YY_RULE_SETUP #line 292 "src/conf_lex.l" { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) } YY_BREAK case 37: YY_RULE_SETUP #line 296 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_IN_OPTION), conftext) conflval.option = DATABASE_IN_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 38: YY_RULE_SETUP #line 303 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_OUT_OPTION), conftext) conflval.option = DATABASE_OUT_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 39: YY_RULE_SETUP #line 310 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_NEW_OPTION), conftext) conflval.option = DATABASE_NEW_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 40: YY_RULE_SETUP #line 317 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_ATTRIBUTES_OPTION), conftext) conflval.option = DATABASE_ATTRIBUTES_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } YY_BREAK case 41: YY_RULE_SETUP #line 324 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (WARN_DEAD_SYMLINKS_OPTION), conftext) conflval.option = WARN_DEAD_SYMLINKS_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 42: YY_RULE_SETUP #line 331 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_GROUPED_OPTION), conftext) conflval.option = REPORT_GROUPED_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 43: YY_RULE_SETUP #line 338 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_SUMMARIZE_CHANGES_OPTION), conftext) conflval.option = REPORT_SUMMARIZE_CHANGES_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 44: YY_RULE_SETUP #line 344 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (ACL_NO_SYMLINK_FOLLOW_OPTION), conftext) conflval.option = ACL_NO_SYMLINK_FOLLOW_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 45: YY_RULE_SETUP #line 351 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_FORMAT_OPTION), conftext) conflval.option = REPORT_FORMAT_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 46: YY_RULE_SETUP #line 358 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_LEVEL_OPTION), conftext) conflval.option = REPORT_LEVEL_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 47: YY_RULE_SETUP #line 365 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_ADDED_ATTRS_OPTION), conftext) conflval.option = REPORT_IGNORE_ADDED_ATTRS_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } YY_BREAK case 48: YY_RULE_SETUP #line 372 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_REMOVED_ATTRS_OPTION), conftext) conflval.option = REPORT_IGNORE_REMOVED_ATTRS_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } YY_BREAK case 49: YY_RULE_SETUP #line 379 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_CHANGED_ATTRS_OPTION), conftext) conflval.option = REPORT_IGNORE_CHANGED_ATTRS_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } YY_BREAK case 50: YY_RULE_SETUP #line 386 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_FORCE_ATTRS_OPTION), conftext) conflval.option = REPORT_FORCE_ATTRS_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } YY_BREAK case 51: YY_RULE_SETUP #line 393 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (LOG_LEVEL_OPTION), conftext) conflval.option = LOG_LEVEL_OPTION; BEGIN(STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 52: YY_RULE_SETUP #line 400 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_ADD_METADATA_OPTION), conftext) conflval.option = DATABASE_ADD_METADATA_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 53: YY_RULE_SETUP #line 407 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_URL_OPTION), conftext) conflval.option = REPORT_URL_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 54: YY_RULE_SETUP #line 414 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_DETAILED_INIT_OPTION), conftext) conflval.option = REPORT_DETAILED_INIT_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 55: YY_RULE_SETUP #line 421 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_BASE16_OPTION), conftext) conflval.option = REPORT_BASE16_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 56: YY_RULE_SETUP #line 428 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_QUIET_OPTION), conftext) conflval.option = REPORT_QUIET_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 57: YY_RULE_SETUP #line 435 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_APPEND_OPTION), conftext) conflval.option = REPORT_APPEND_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 58: YY_RULE_SETUP #line 442 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_E2FSATTRS_OPTION), conftext) conflval.option = REPORT_IGNORE_E2FSATTRS_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 59: YY_RULE_SETUP #line 449 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_GZIP_OPTION), conftext) conflval.option = DATABASE_GZIP_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 60: YY_RULE_SETUP #line 456 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (ROOT_PREFIX_OPTION), conftext) conflval.option = ROOT_PREFIX_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 61: YY_RULE_SETUP #line 463 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (CONFIG_VERSION), conftext) conflval.option = CONFIG_VERSION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 62: YY_RULE_SETUP #line 470 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (CONFIG_CHECK_WARN_UNRESTRICTED_RULES), conftext) conflval.option = CONFIG_CHECK_WARN_UNRESTRICTED_RULES; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 63: YY_RULE_SETUP #line 477 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (NUM_WORKERS), conftext) conflval.option = NUM_WORKERS; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } YY_BREAK case 64: YY_RULE_SETUP #line 484 "src/conf_lex.l" { log_msg(LOG_LEVEL_ERROR,"%s:%d: unknown config option: '%s' (line: '%s')", conf_filename, conf_linenumber, conftext, conf_linebuf); exit(INVALID_CONFIGURELINE_ERROR); } YY_BREAK case 65: YY_RULE_SETUP #line 489 "src/conf_lex.l" { /* group definition */ conflval.s=checked_strdup(conftext); LOG_LEX_TOKEN(lex_log_level, TGROUP, conftext) BEGIN(EXPREQUHUNT); return (TGROUP); } YY_BREAK case 66: YY_RULE_SETUP #line 496 "src/conf_lex.l" { /* group definition, deprecated group names */ log_msg(LOG_LEVEL_WARNING, "%s:%d: special characters in group names are DEPRECATED. Update your config and only use alphanumeric characters (A-Za-z0-9) (line: '%s')", conf_filename, conf_linenumber, conf_linebuf); \ conflval.s=checked_strdup(conftext); LOG_LEX_TOKEN(lex_log_level, TGROUP, conftext) BEGIN(EXPREQUHUNT); return (TGROUP); } YY_BREAK case 67: YY_RULE_SETUP #line 504 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, '=', conftext) BEGIN(STRING); return('='); } YY_BREAK case 68: YY_RULE_SETUP #line 510 "src/conf_lex.l" { size_t length = strlen(conftext)-4; conflval.s=checked_malloc(length+1); strncpy(conflval.s, conftext+3, length); conflval.s[length] = '\0'; LOG_LEX_TOKEN(lex_log_level, TVARIABLE, conflval.s) return (TVARIABLE); } YY_BREAK case 69: YY_RULE_SETUP #line 519 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TSTRING, conftext) conflval.s=checked_strdup(conftext); return (TSTRING); } YY_BREAK case 70: YY_RULE_SETUP #line 525 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, (escaped) TSTRING, conftext) conflval.s=checked_strdup(conftext+1); return (TSTRING); } YY_BREAK case 71: YY_RULE_SETUP #line 531 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, (single-character) TSTRING, conftext) conflval.s=checked_strdup(conftext); return (TSTRING); } YY_BREAK case 72: YY_RULE_SETUP #line 537 "src/conf_lex.l" { LOG_LEX_TOKEN(lex_log_level, TSPACE, conftext) return (TSPACE); } YY_BREAK case 73: YY_RULE_SETUP #line 542 "src/conf_lex.l" { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) BEGIN(CONFIG); } YY_BREAK case 74: YY_RULE_SETUP #line 547 "src/conf_lex.l" { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) BEGIN(CONDITION); } YY_BREAK case 75: YY_RULE_SETUP #line 552 "src/conf_lex.l" { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) BEGIN(EXPR); } YY_BREAK case 76: YY_RULE_SETUP #line 557 "src/conf_lex.l" { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) BEGIN(STRING); } YY_BREAK case 77: YY_RULE_SETUP #line 562 "src/conf_lex.l" { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, found string -> unput, conftext) yyless(0); BEGIN(STRING); } YY_BREAK case 78: /* rule 78 can match eol */ YY_RULE_SETUP #line 568 "src/conf_lex.l" { log_msg(lex_log_level,"%s:%d: \u2534 TNEWLINE (text: '%s')", conf_filename, conf_linenumber, strlen(conftext) == 2?"\\r\\n":"\\n"); BEGIN 0; return (TNEWLINE); } YY_BREAK case YY_STATE_EOF(CONFIG): case YY_STATE_EOF(DEFSTMT): case YY_STATE_EOF(ENVVAR): case YY_STATE_EOF(EXPR): case YY_STATE_EOF(EXPREQUHUNT): case YY_STATE_EOF(PATH): case YY_STATE_EOF(STRING): case YY_STATE_EOF(STRINGS): case YY_STATE_EOF(STRINGEQHUNT): case YY_STATE_EOF(STRINGHUNT): case YY_STATE_EOF(CONDITION): case YY_STATE_EOF(CONDSTRING): #line 574 "src/conf_lex.l" { log_msg(lex_log_level,"%s:%d: \u2534 ", conf_filename, conf_linenumber); log_msg(LOG_LEVEL_NOTICE,"%s:%d: missing new line at end of file (line: '%s')", conf_filename, conf_linenumber, conf_linebuf); return (0); } YY_BREAK case 79: YY_RULE_SETUP #line 580 "src/conf_lex.l" { char *unexpected_character = conftext; switch (*conftext) { case '\r': unexpected_character = "\\r"; break; }; log_msg(LOG_LEVEL_ERROR,"%s:%d: unexpected character: '%s' (line: '%s')", conf_filename, conf_linenumber, unexpected_character, conf_linebuf); exit(INVALID_CONFIGURELINE_ERROR); } YY_BREAK case 80: YY_RULE_SETUP #line 589 "src/conf_lex.l" ECHO; YY_BREAK #line 2202 "src/conf_lex.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = (yytext_ptr); int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc( (void *) b->yy_ch_buf, (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); /* "- 2" to take care of EOB's */ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { yy_state_type yy_current_state; char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 494 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { int yy_is_jam; char *yy_cp = (yy_c_buf_p); YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 494 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 493); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } yy_init_buffer( YY_CURRENT_BUFFER, input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree( (void *) b->yy_ch_buf ); yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return NULL; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (const char * yystr ) { return yy_scan_bytes( yystr, (int) strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); buf = (char *) yyalloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yynoreturn yy_fatal_error (const char* msg ) { fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param _line_number line number * */ void yyset_lineno (int _line_number ) { yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * _in_str ) { yyin = _in_str ; } void yyset_out (FILE * _out_str ) { yyout = _out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int _bdebug ) { yy_flex_debug = _bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = NULL; yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, const char * s2, int n ) { int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (const char * s ) { int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return realloc(ptr, size); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 589 "src/conf_lex.l" int confwrap(void){ return 1; } void conf_lex_string(const char * name, const char *string) { log_msg(LOG_LEVEL_DEBUG, "parse: '%s'", name); conf_linenumber = 0; conf_filename = checked_strdup(name); /* not to be freed, needed for logging */ progress_status(PROGRESS_CONFIG, conf_filename); conf_scan_string(string); } void conf_lex_file(const char * config) { log_msg(LOG_LEVEL_DEBUG, "parse: '%s'", config); conf_linenumber = 0; if (strcmp(config,"-") == 0) { conf_filename = checked_strdup("(stdin)"); /* not to be freed, needed for logging */ confin = stdin; } else { conf_filename = checked_strdup(config); /* not to be freed, needed for logging */ progress_status(PROGRESS_CONFIG, conf_filename); char *expanded_config = expand_tilde(checked_strdup(config)); confin = fopen( expanded_config, "r" ); if (!confin) { log_msg(LOG_LEVEL_ERROR,"cannot open config file '%s': %s", config, strerror(errno)); exit(IO_ERROR); } free(expanded_config); expanded_config=NULL; } conf_switch_to_buffer(conf_create_buffer( confin, YY_BUF_SIZE )); BEGIN 0; } void conf_lex_delete_buffer(void) { conf_delete_buffer( YY_CURRENT_BUFFER ); if (confin && confin != stdin) { if (fclose(confin)) { log_msg(LOG_LEVEL_WARNING, "fclose() failed for '%s': %s", conf_filename, strerror(errno)); } else { confin = NULL; } } } aide-0.19/src/db_file.c0000644000175000017500000005346614774237261010400 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2007, 2010-2013, 2016, 2018-2025 Rami Lehti, * Pablo Virolainen, Mike Markley, Richard van den Berg, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" #include "aide.h" #include #include #include #include #include #include #include #include #include "db_config.h" #include "gen_list.h" #include "hashsum.h" #include "log.h" #include "progress.h" #include "url.h" #include "db.h" #ifdef WITH_CURL #include "fopen.h" #endif #include "attributes.h" #include #include "base64.h" #include "db_line.h" #include "db_file.h" #include "util.h" #include "errorcodes.h" #ifdef WITH_ZLIB #include #endif #define BUFSIZE 16384 #include "md.h" static bool db_parse_spec(database* db, char **saveptr){ char *token = NULL; DB_ATTR_TYPE seen_attrs = 0LLU; db->fields = checked_malloc(1*sizeof(ATTRIBUTE)); while ((token = strtok_r(NULL, " ", saveptr)) != NULL) { if (strncmp("@@", token, 2) == 0) { LOG_DB_FORMAT_LINE(LOG_LEVEL_ERROR, "unexpected token while reading db_spec: '%s'", token); return false; } else { ATTRIBUTE l; db->fields = checked_realloc(db->fields, (db->num_fields+1)*sizeof(ATTRIBUTE)); db->fields[db->num_fields]=attr_unknown; for (l=0;lnum_fields) db->fields[db->num_fields]=attr_unknown; } else { db->fields[db->num_fields]=l; seen_attrs |= ATTR(l); LOG_DB_FORMAT_LINE(LOG_LEVEL_DEBUG, "@@db_spec: define field '%s' at position %i", token, db->num_fields) } db->num_fields++; break; } } if(l==attr_unknown){ LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "@@db_spec: skip unknown field '%s' at position %i", token, db->num_fields); db->fields[db->num_fields]=attr_unknown; db->num_fields++; } } } /* Lets generate attr from db_order if database does not have attr */ conf->attr=DB_ATTR_UNDEF; for (int i=0;inum_fields;i++) { if (db->fields[i] == attr_attr) { conf->attr=1; } } if (conf->attr==DB_ATTR_UNDEF) { conf->attr=0; for(int i=0;inum_fields;i++) { conf->attr|=1LL<fields[i]; } char *str; LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "missing attr field, generated attr field from dbspec: %s (comparison may be incorrect)", str = diff_database_attributes(0, conf->attr)) free(str); } return true; } static char *fgets_wrapper(char *ptr, size_t size, database *db) { char * buf = NULL; #ifdef WITH_CURL switch ((db->url)->type) { case url_http: case url_https: case url_ftp: { buf = url_fgets(ptr, size, (URL_FILE *)db->fp); if (!buf) { log_msg(LOG_LEVEL_ERROR, "url_fgets failed for %s", (db->url)->raw); exit(IO_ERROR); } break; } default: #endif #ifdef WITH_ZLIB if (db->gzp == NULL) { db->gzp=gzdopen(fileno((FILE *)db->fp),"rb"); if (db->gzp == NULL) { log_msg(LOG_LEVEL_ERROR, "gzdopen failed for %s", (db->url)->raw); exit(IO_ERROR); } } buf = gzgets(db->gzp, ptr, size); if (!buf && !gzeof(db->gzp)) { int gzerrnum; log_msg(LOG_LEVEL_ERROR, "gzgets failed for %s: %s", (db->url)->raw, gzerror(db->gzp, &gzerrnum)); exit(IO_ERROR); } #else buf = fgets(ptr, size, db->fp); if (ferror(db->fp)) { log_msg(LOG_LEVEL_ERROR, "fgets failed for %s: %s", (db->url)->raw, strerror(errno)); exit(IO_ERROR); } #endif #ifdef WITH_CURL } #endif if (buf && db->mdc) { update_md(db->mdc, buf, strlen(buf)); } return buf; } static char *get_next_dbline(database *db) { char buffer[2048]; char *line = NULL; size_t len = 0; while (fgets_wrapper(buffer, sizeof(buffer), db) != NULL) { size_t buffer_len = strlen(buffer); line = checked_realloc(line, buffer_len + len + 1); strncpy(line + len, buffer, buffer_len+1); len += buffer_len; /* remove newline character */ if (line[len-1] == '\n') { line[len-1] = '\0'; break; } } return line; } db_entry_t db_readline_file(database* db, bool include_limited_entries) { char **s = NULL; char *saveptr, *token; char *line = NULL; db_entry_t entry = { .line = NULL, .limit = false }; while ((line = get_next_dbline(db)) != NULL) { db->lineno++; LOG_LEVEL db_parse_log_level = LOG_LEVEL_DEBUG; switch (line[0]) { case '#': LOG_DB_FORMAT_LINE(db_parse_log_level, "db_read_file: skip comment line: '%s'", line) break; case '\0': LOG_DB_FORMAT_LINE(db_parse_log_level, "%s", "db_read_file: skip empty line") break; default: saveptr = NULL; token = strtok_r(line, " ", &saveptr); if (strcmp("@@db_spec", token) == 0) { if (db->fields) { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "skip additional '%s' line", token) } else { LOG_DB_FORMAT_LINE(db_parse_log_level, "db_read_file: parse '%s'", token) db_parse_spec(db, &saveptr); } } else if (strcmp("@@begin_db", token) == 0) { if (db->flags&DB_FLAG_PARSE) { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "skip additional '%s' line", token) } else { LOG_DB_FORMAT_LINE(db_parse_log_level, "%s", "db_read_file: start reading database (found '@@begin_db')") db->flags |= DB_FLAG_PARSE; } if ((token = strtok_r(NULL, "\n", &saveptr)) != NULL) { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "skip unexpected string after '@@begin_db': '%s'", token) } } else if (strcmp("@@end_db", token) == 0) { if (db->flags&DB_FLAG_PARSE) { db->flags &= ~(DB_FLAG_PARSE); LOG_DB_FORMAT_LINE(db_parse_log_level, "%s", "db_read_file: stop reading database (found '@@end_db')") if ((token = strtok_r(NULL, "\n", &saveptr)) != NULL) { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "skip unexpected string after '@@end_db': '%s'", token) } return entry; } else { LOG_DB_FORMAT_LINE(LOG_LEVEL_ERROR, "%s", "unexpected '@@end_db', expected '@@begin_db'") exit(DATABASE_ERROR); } } else if (db->flags&DB_FLAG_PARSE) { if (*token != '/') { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "skip line with invalid path: '%s'", token) break; } else { if (check_limit(token, true, NULL)) { if (include_limited_entries) { entry.limit = true; db_parse_log_level = LOG_LEVEL_LIMIT; } else { progress_status(PROGRESS_SKIPPED, NULL); break; } } LOG_DB_FORMAT_LINE(db_parse_log_level, "db_read_file: parse '%s'", token) s = checked_malloc(sizeof(char*)*num_attrs); for(ATTRIBUTE j=0; j= db->num_fields) { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "skip unexpected string '%s')", token); } else if (db->fields[i] != attr_unknown) { s[db->fields[i]] = checked_strdup(token); LOG_DB_FORMAT_LINE(db_parse_log_level, "db_read_file: '%s' set field '%s' (position %d): '%s'", s[0], attributes[db->fields[i]].db_name, i, token) } else { LOG_DB_FORMAT_LINE(db_parse_log_level, "skip unknown/redefined field at position: %d: '%s'", i, token); } token = strtok_r(NULL, " ", &saveptr); i++; } if (inum_fields) { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "skip cutoff database line '%s' found (field '%s' (position: %d) is missing)", s[0], attributes[db->fields[i]].db_name, i) for(int a=0;afields[a]]); s[db->fields[a]] = NULL; } free(s); s = NULL; } else { entry.line = db_char2line(s, db); for(int j=0;jnum_fields;j++){ if(db->fields[j]!=attr_unknown && s[db->fields[j]]!=NULL){ free(s[db->fields[j]]); s[db->fields[j]]=NULL; } } free(s); return entry; } } } else { LOG_DB_FORMAT_LINE(db_parse_log_level, "skip line '%s' ('@@begin_db' not (yet) found)", line) } } free(line); line = NULL; } if (db->flags&DB_FLAG_PARSE) { LOG_DB_FORMAT_LINE(LOG_LEVEL_ERROR, "%s", "missing '@@end_db' (incomplete database file)") exit(DATABASE_ERROR); } else { /* empty database */ return entry; } } static int str_format(char *, int n, const char*, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 3, 4))) #endif ; static int str_format(char *str, int n, const char* format, ...) { va_list ap; va_start(ap, format); int len = vsnprintf(NULL, 0, format, ap); va_end(ap); if (str) { va_start(ap, format); vsnprintf(&str[n], len+1, format, ap); va_end(ap); } return len; } static int str_filename(char *str, int n, char *path) { char *safe_path = NULL; int len = 0; if (contains_unsafe(path)) { safe_path = encode_string(path); } len = str_format(str, n+len, "%s", safe_path?safe_path:path); free(safe_path); return len; } static int str_linkname(char *str, int n, char *path) { char *safe_path = NULL; int len = 0; if (path == NULL) { len = str_format(str, n, " %s", "0"); return len; } if (*path == '\0') { len = str_format(str, n, " %s", "0-"); return len; } if (contains_unsafe(path)) { safe_path = encode_string(path); } len += str_format(str, n, " %s%s", *path == '0'?"0":"", safe_path?safe_path:path); free(safe_path); return len; } static int byte_base64(char *str, int n, byte *src, int src_len) { char *enc = src ? encode_base64(src, src_len) : NULL; int len = str_format(str, n, " %s", enc ? enc : "0"); free(enc); return len; } #define CASE_BYTE_BASE64(attr, src, src_len) case attr : { n += byte_base64(str, n, src, src_len); break; } #define CASE_HASHSUM(x) CASE_BYTE_BASE64(attr_ ##x, line->hashsums[hash_ ##x], hashsums[hash_ ##x].length) #ifdef WITH_XATTR static int str_xattr(char *str, int n, xattrs_type *xattrs) { if (xattrs) { size_t m = 0; m = str_format(str, n, " %lu", xattrs->num); xattr_node *xattr = xattrs->ents; for (size_t i = xattrs->num; i > 0; --i) { char *enc_key = NULL; if (contains_unsafe(xattr->key)) { enc_key = encode_string(xattr->key); } char *enc_value = encode_base64(xattr->val, xattr->vsz); m += str_format(str, n + m, ",%s,%s", enc_key?enc_key:xattr->key, enc_value); free(enc_key); free(enc_value); ++xattr; } return m; } else { return str_format(str, n, " %lu", 0LU); } } #endif #ifdef WITH_ACL static int str_acl(char *str, int n, acl_type *acl) { #ifdef WITH_POSIX_ACL if (acl) { char *enc_acl_a = acl->acl_a ? encode_base64((byte *)acl->acl_a, strlen(acl->acl_a)) : NULL; char *enc_acl_d = acl->acl_d ? encode_base64((byte *)acl->acl_d, strlen(acl->acl_d)) : NULL; int len = str_format(str, n, " %s,%s,%s", "POSIX", enc_acl_a ? enc_acl_a : "0", enc_acl_d ? enc_acl_d : "0"); free(enc_acl_d); free(enc_acl_a); return len; } else { return str_format(str, n, " %lu", 0LU); } #endif } #endif static int construct_database_line(db_line *line, char *str) { int n = 0; for (ATTRIBUTE i = 0; i < num_attrs; ++i) { if (attributes[i].db_name && ATTR(i) & conf->db_out_attrs) { switch (i) { case attr_filename: { n += str_filename(str, n, line->filename); break; } case attr_attr: { n += str_format(str, n, " %llu", line->attr); break; } case attr_inode: { n += str_format(str, n, " %li", line->inode); break; } case attr_size: { n += str_format(str, n, " %lli", line->size); break; } case attr_bcount: { n += str_format(str, n, " %lli", line->bcount); break; } case attr_perm: { n += str_format(str, n, " %lo", (long)line->perm); break; } case attr_uid: { n += str_format(str, n, " %li", line->uid); break; } case attr_gid: { n += str_format(str, n, " %li", line->gid); break; } case attr_atime: { n += str_format(str, n, " %ld", (long)line->atime); break; } case attr_ctime: { n += str_format(str, n, " %ld", (long)line->ctime); break; } case attr_mtime: { n += str_format(str, n, " %ld", (long)line->mtime); break; } case attr_linkname: { n += str_linkname(str, n, line->linkname); break; ; } case attr_linkcount: { n += str_format(str, n, " %li", line->nlink); break; } CASE_HASHSUM(md5) CASE_HASHSUM(sha1) CASE_HASHSUM(rmd160) CASE_HASHSUM(tiger) CASE_HASHSUM(crc32) CASE_HASHSUM(crc32b) CASE_HASHSUM(haval) CASE_HASHSUM(gostr3411_94) CASE_HASHSUM(stribog256) CASE_HASHSUM(stribog512) CASE_HASHSUM(sha256) CASE_HASHSUM(sha512) CASE_HASHSUM(whirlpool) CASE_HASHSUM(sha512_256) CASE_HASHSUM(sha3_256) CASE_HASHSUM(sha3_512) case attr_acl: { #ifdef WITH_ACL n += str_acl(str, n, line->acl); #endif break; } case attr_xattrs: { #ifdef WITH_XATTR n += str_xattr(str, n, line->xattrs); #endif break; } case attr_selinux: { #ifdef WITH_SELINUX n += byte_base64(str, n, (byte *)line->cntx, line->cntx ? strlen(line->cntx) : 0); #endif break; } case attr_e2fsattrs: { #ifdef WITH_E2FSATTRS n += str_format(str, n, " %lu", line->e2fsattrs); #endif break; } case attr_capabilities: { #ifdef WITH_CAPABILITIES n += byte_base64(str, n, (byte *)line->capabilities, line->capabilities ? strlen(line->capabilities) : 0); #endif break; } case attr_fs_type : { #ifdef HAVE_FSTYPE n += str_format(str, n, " %llu", (unsigned long long) line->fs_type); #endif break; } case attr_ftype: case attr_bsize: case attr_rdev: case attr_dev: case attr_allhashsums: case attr_sizeg: case attr_checkinode: case attr_allownewfile: case attr_allowrmfile: case attr_growing: case attr_compressed: case attr_unknown: { /* nothing to write to database */ break; } } } } if (str) { snprintf(&str[n], 2, "\n"); } n++; return n; } static void handle_io_error_on_write(char *function_str) { if (conf->database_out.url->type == url_file && conf->database_out.flags&DB_FLAG_CREATED) { log_msg(LOG_LEVEL_ERROR, "%s failed for %s (remove incompletely written database)", function_str, ((conf->database_out).url)->raw); unlink(conf->database_out.url->value); } else { log_msg(LOG_LEVEL_ERROR, "%s failed for %s", function_str, ((conf->database_out).url)->raw); } exit(IO_ERROR); } static void db_out_write(char * str, size_t len) { if ((conf->database_out).mdc) { update_md((conf->database_out).mdc, str, len); } #ifdef WITH_ZLIB if(conf->gzip_dbout) { if (gzwrite((conf->database_out).gzp, str, len) < (int) len) { handle_io_error_on_write("gzwrite"); } } else { #endif if (fwrite(str, sizeof(char), len, conf->database_out.fp) < len) { handle_io_error_on_write("fwrite"); } if (fflush(conf->database_out.fp) != 0) { handle_io_error_on_write("fflush"); } #ifdef WITH_ZLIB } #endif } int db_writeline_file(db_line* line) { char *str = NULL; int n = construct_database_line(line, str); str = checked_malloc(n+1); construct_database_line(line, str); db_out_write(str, n); free(str); return RETOK; } static int construct_database_header(db_config *dbconf, char *str) { int n = 0; n += str_format(str, n, "%s", "@@begin_db\n"); if (dbconf->database_add_metadata) { time_t db_gen_time = time(NULL); char *time_str = get_time_string(&db_gen_time); n += str_format(str, n, "# This file was generated by Aide, version %s\n" "# Time of generation was %s\n", conf->aide_version, time_str); free(time_str); } if (dbconf->config_version) { n += str_format(str, n, "# The config version used to generate this file was:\n" "# %s\n", dbconf->config_version); } n += str_format(str, n, "%s", "@@db_spec"); for (ATTRIBUTE i = 0; i < num_attrs; ++i) { if (attributes[i].db_name && attributes[i].attr & conf->db_out_attrs) { n += str_format(str, n, " %s", attributes[i].db_name); } } n += str_format(str, n, "%s", "\n"); return n; } int db_writespec_file(db_config* dbconf) { char *str = NULL; int n = construct_database_header(dbconf, str); str = checked_malloc(n+1); construct_database_header(dbconf, str); db_out_write(str, n); free(str); return RETOK; } int db_close_file(db_config* dbconf){ if(dbconf->database_out.fp #ifdef WITH_ZLIB || dbconf->database_out.gzp #endif ){ char *end_db_str = "@@end_db\n"; db_out_write(end_db_str, strlen(end_db_str)); } #ifdef WITH_ZLIB if(dbconf->gzip_dbout){ if(gzclose(dbconf->database_out.gzp)){ log_msg(LOG_LEVEL_ERROR,"unable to gzclose database '%s': %s", (dbconf->database_out.url)->raw, strerror(errno)); return RETFAIL; } dbconf->database_out.gzp = NULL; }else { #endif if(fclose(dbconf->database_out.fp)){ log_msg(LOG_LEVEL_ERROR,"unable to close database '%s': %s", (dbconf->database_out.url)->raw, strerror(errno)); return RETFAIL; } dbconf->database_out.fp = NULL; #ifdef WITH_ZLIB } #endif return RETOK; } // vi: ts=8 sw=8 aide-0.19/src/rx_rule.c0000644000175000017500000001160514774237261010461 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2016, 2020-2022,2024,2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" #include #include "file.h" #include "rx_rule.h" #include "util.h" static int generate_restriction_string(rx_restriction_t r, char *str) { int n = 0; if (r.f_type == FT_NULL #ifdef HAVE_FSTYPE && r.fs_type == 0 #endif ) { const char *no_restriction_string = "(none)"; size_t length = strlen(no_restriction_string); if (str) { sprintf(&str[n], "%s", no_restriction_string); } n = length+1; } else { FT_TYPE f_types = r.f_type; unsigned int i = 0; while (f_types) { FT_TYPE t = (1U< #include #include #include #include #include #include #include #include "aide.h" #include "progress.h" #include "log.h" #include "errorcodes.h" #include "util.h" #define BILLION 1000000000L pthread_t progress_updater_thread = 0LU; pthread_mutex_t progress_update_mutex = PTHREAD_MUTEX_INITIALIZER; static progress_state state = PROGRESS_NONE; static struct timespec time_start; static long unsigned num_entries = 0; static long unsigned num_skipped = 0LU; static char* path = NULL; static char *get_state_string(progress_state s) { switch (s) { case PROGRESS_OLDDB: return "read old db"; case PROGRESS_NEWDB: return "read new db"; case PROGRESS_DISK: return "scan file system"; case PROGRESS_WRITEDB: return "write db"; case PROGRESS_CONFIG: return "parse config"; case PROGRESS_SKIPPED: case PROGRESS_CLEAR: case PROGRESS_NONE: return NULL; } return NULL; } static void * progress_updater( __attribute__((unused)) void *arg) { const char *whoami = "(progress)"; log_msg(LOG_LEVEL_THREAD, "%10s: initialized progress_updater thread", whoami); mask_sig(whoami); bool _continue = true; while (_continue) { pthread_mutex_lock(&progress_update_mutex); time_t now = time(NULL); int elapsed = (unsigned long) now - (unsigned long) conf->start_time; char *progress_bar = NULL; switch (state) { case PROGRESS_CONFIG: case PROGRESS_NEWDB: case PROGRESS_SKIPPED: case PROGRESS_DISK: case PROGRESS_WRITEDB: case PROGRESS_OLDDB: progress_bar = get_progress_bar_string(get_state_string(state), path, num_entries, num_skipped, elapsed, conf->progress); stderr_msg("%s\r", progress_bar); free(progress_bar); progress_bar = NULL; break; case PROGRESS_CLEAR: _continue = false; break; case PROGRESS_NONE: /* do nothing */ ;; } pthread_mutex_unlock(&progress_update_mutex); usleep(100000); } return (void *) pthread_self(); } static void update_state(progress_state new_state) { LOG_LEVEL log_level = LOG_LEVEL_INFO; struct timespec time_now; clock_gettime( CLOCK_REALTIME, &time_now); double elapsed = (time_now.tv_sec - time_start.tv_sec) + (time_now.tv_nsec - time_start.tv_nsec)/(double)BILLION; long elapsed_minutes = (long)floor(elapsed)/60; double elapsed_seconds = elapsed - elapsed_minutes*60; unsigned long performance = (num_entries+num_skipped)/elapsed; char * entries_string = num_entries == 1 ? "entry" : "entries"; char *skipped_str = NULL; if (num_skipped) { const char *skipped_format = " (%lu skipped)"; int n = snprintf(NULL, 0, skipped_format, num_skipped); skipped_str = checked_malloc(n+1); snprintf(skipped_str, n+1, skipped_format, num_skipped); } switch (state) { case PROGRESS_OLDDB: log_msg(log_level, "read %lu %s%s [%lu entries/s] from %s in %ldm %.4lfs", num_entries, entries_string, skipped_str?skipped_str:"", performance, (conf->database_in.url)->raw, elapsed_minutes, elapsed_seconds); break; case PROGRESS_NEWDB: log_msg(log_level, "read %lu %s%s [%lu entries/s] from %s in %ldm %.4lfs", num_entries, entries_string, skipped_str?skipped_str:"", performance, (conf->database_new.url)->raw, elapsed_minutes, elapsed_seconds); break; case PROGRESS_DISK: log_msg(log_level, "read %lu %s [%lu entries/s] from file system in %ldm %.4lfs", num_entries, entries_string, performance, elapsed_minutes, elapsed_seconds); break; case PROGRESS_CONFIG: log_msg(log_level, "parsed %lu config %s [%lu files/s] in %ldm %.4lfs", num_entries, num_entries == 1 ? "file" : "files", performance, elapsed_minutes, elapsed_seconds); break; case PROGRESS_WRITEDB: log_msg(log_level, "wrote %lu %s [%lu entries/s] to %s in %ldm %.4lfs", num_entries, entries_string, performance, (conf->database_out.url)->raw, elapsed_minutes, elapsed_seconds); break; case PROGRESS_SKIPPED: case PROGRESS_CLEAR: case PROGRESS_NONE: /* no logging */ break; } if (skipped_str) { free(skipped_str); skipped_str = NULL; } time_start = time_now; state = new_state; } bool progress_start(void) { struct winsize winsize; if (ioctl(STDERR_FILENO, TIOCGWINSZ, &winsize) == -1) { conf->progress = 80; } else { conf->progress = winsize.ws_col; } if (pthread_create(&progress_updater_thread, NULL, &progress_updater, NULL) != 0) { log_msg(LOG_LEVEL_WARNING, "failed to start progress_updater thread (disable progress bar)"); return false; } stderr_set_line_erasure(true); return true; } void progress_stop(void) { pthread_mutex_lock(&progress_update_mutex); update_state(PROGRESS_CLEAR); stderr_set_line_erasure(false); pthread_mutex_unlock(&progress_update_mutex); if (progress_updater_thread) { if (pthread_join(progress_updater_thread, NULL) != 0) { log_msg(LOG_LEVEL_ERROR, "failed to join progress_updater thread"); exit(THREAD_ERROR); } log_msg(LOG_LEVEL_THREAD, "%10s: progress_updater thread finished", "(main)"); } } void progress_status(progress_state new_state, const char* data) { pthread_mutex_lock(&progress_update_mutex); switch (new_state) { case PROGRESS_CONFIG: case PROGRESS_OLDDB: case PROGRESS_NEWDB: case PROGRESS_DISK: case PROGRESS_WRITEDB: if (state == new_state) { num_entries++; } else { update_state(new_state); num_entries = 0LU; num_skipped = 0LU; } free(path); path = NULL; if (data) { path = checked_strdup(data); } break; case PROGRESS_SKIPPED: num_skipped++; break; case PROGRESS_CLEAR: case PROGRESS_NONE: update_state(new_state); break; } pthread_mutex_unlock(&progress_update_mutex); } aide-0.19/src/commandconf.c0000644000175000017500000003443614774237261011274 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2006, 2010-2011, 2013, 2015-2016, 2019-2025 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "aide.h" #include #include #include #include #include #include #include "attributes.h" #include "conf_ast.h" #include "config.h" #include "errorcodes.h" #include "hashsum.h" #include "list.h" #include "rx_rule.h" #include "url.h" #include "commandconf.h" #include "conf_lex.h" #include "log.h" #include "conf_yacc.h" #include "db.h" #include "db_config.h" #include "report.h" #include "symboltable.h" #include "md.h" #include "util.h" #include "conf_eval.h" #include "seltree.h" /*for locale support*/ #include "locale-aide.h" /*for locale support*/ #ifdef WITH_CURL #include "fopen.h" #endif #ifdef WITH_E2FSATTRS #include "e2fsattrs.h" #endif #include #include #include #define BUFSIZE 4096 #define ZBUFSIZE 16384 url_t* parse_url(char* val, int linenumber, char* filename, char* linebuf) { url_t* u=NULL; char* r=NULL; char* val_copy=NULL; int i=0; u=checked_malloc(sizeof(url_t)); /* We don't want to modify the original hence strdup(val) */ val_copy=checked_strdup(val); for(r=val_copy;r[0]!=':'&&r[0]!='\0';r++); if(r[0]!='\0'){ r[0]='\0'; r++; } u->type = get_url_type(val_copy); if (u->type) { switch (u->type) { case url_file : { if(r[0]=='/'&&(r+1)[0]=='/'&&(r+2)[0]=='/'){ u->value=checked_strdup(r+2); break; } if(r[0]=='/'&&(r+1)[0]=='/'&&(r+2)[0]!='/'){ char* t=r+2; r+=2; for(i=0;r[0]!='/'&&r[0]!='\0';r++,i++); if(r[0]=='\0'){ LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "invalid file-URL '%s': no path after hostname", val) free(val_copy); free(u); return NULL; } if( (strcmp(t,"localhost") != 0) && !( conf->hostname && strcmp(t,conf->hostname)==0)){ LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "invalid file-URL '%s': cannot use hostname other than 'localhost' or '%s'", val, conf->hostname); free(u); free(val_copy); return NULL; } u->value=checked_strdup(r); r[0]='\0'; break; } u->value=checked_strdup(r); break; } case url_ftp : case url_https : case url_http : { #ifdef WITH_CURL u->value=checked_strdup(val); #else LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "%s", "http, https and ftp URL support not compiled in, recompile AIDE with '--with-curl'") free(val_copy); free(u); return NULL; #endif /* WITH CURL */ break; } case url_fd: case url_stdin: case url_stdout: case url_stderr: { u->value=checked_strdup(r); break; } case url_syslog : { #ifdef HAVE_SYSLOG u->value=checked_strdup(r); #else LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "%s", "syslog url support not compiled in, recompile AIDE with syslog support") free(val_copy); free(u); return NULL; #endif break; } } } else { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "unknown URL-type: '%s'", val_copy); free(val_copy); free(u); return NULL; } free(val_copy); u->raw = checked_strdup(val); return u; } int parse_config(char *before, char *config, char* after) { if(before==NULL && after==NULL && (config==NULL||strcmp(config,"")==0)){ log_msg(LOG_LEVEL_ERROR,_("missing configuration (use '--config' '--before' or '--after' command line parameter)")); return RETFAIL; } ast* config_ast = NULL; if (before) { conf_lex_string("(--before)", before); if(confparse(&config_ast)){ return RETFAIL; } conf_lex_delete_buffer(); eval_config(config_ast, 0, NULL); deep_free(config_ast); config_ast = NULL; } if (config) { conf_lex_file(config); if(confparse(&config_ast)){ return RETFAIL; } conf_lex_delete_buffer(); eval_config(config_ast, 0, NULL); deep_free(config_ast); config_ast = NULL; } if (after) { conf_lex_string("(--after)", after); if(confparse(&config_ast)){ return RETFAIL; } conf_lex_delete_buffer(); eval_config(config_ast, 0, NULL); deep_free(config_ast); config_ast = NULL; } return RETOK; } int conf_input_wrapper(char* buf, int max_size, FILE* in) { int retval=0; retval=fread(buf,1,max_size,in); return retval; } void do_define(char* name, char* value, int linenumber, char* filename, char* linebuf) { symba* s=NULL; list* l=NULL; if(!(l=list_find(name,conf->defsyms))){ LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_CONFIG, "define '%s' with value '%s'", name, value) s=(symba*)checked_malloc(sizeof(symba)); s->name=checked_strdup(name); s->value=value; conf->defsyms=list_append(conf->defsyms,(void*)s); } else { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_NOTICE, "redefine '%s' with value '%s' (previous value: '%s')", name, value, ((symba*)l->data)->value) free(((symba*)l->data)->value); ((symba*)l->data)->value=NULL; ((symba*)l->data)->value=value; } } void do_undefine(char* name, int linenumber, char* filename, char* linebuf) { list*r=NULL; if((r=list_find(name,conf->defsyms))){ LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_CONFIG, "undefine '%s' (value: '%s')", name, ((symba*)r->data)->value) free(((symba*)r->data)->name); free(((symba*)r->data)->value); free((symba*)r->data); r->data=NULL; conf->defsyms=list_delete_item(r); } else { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_NOTICE, "variable '%s' to be undefined not found", name); } } bool add_rx_rule_to_tree(char* rx, char* rule_prefix, rx_restriction_t restriction, DB_ATTR_TYPE attr, int type, seltree *tree, int linenumber, char* filename, char* linebuf) { rx_rule* r=NULL; bool retval = false; char *attr_str = NULL; char *rs_str = NULL; char *regex; char *node_path = NULL; if (rule_prefix) { int length = strlen(rule_prefix)+strlen(rx); regex = checked_malloc(length+1); strncpy(regex, rule_prefix, length+1); strncat(regex, rx, length-strlen(rule_prefix)+1); log_msg(LOG_LEVEL_DEBUG, "prepend regex '%s' with prefix '%s': '%s'", rx, rule_prefix, regex); } else { regex = checked_strdup(rx); } if ((r = add_rx_to_tree(regex, restriction, type, tree, linenumber, filename, linebuf, &node_path)) == NULL) { retval = false; }else { r->prefix = rule_prefix; attr &= validate_hashes(attr, linenumber, filename, linebuf); DB_ATTR_TYPE unsupported_attrs = attr& (0 #ifndef WITH_ACL |ATTR(attr_acl) #endif #ifndef WITH_SELINUX |ATTR(attr_selinux) #endif #ifndef WITH_XATTR |ATTR(attr_xattrs) #endif #ifndef WITH_E2FSATTRS |ATTR(attr_e2fsattrs) #endif #ifndef WITH_CAPABILITIES |ATTR(attr_capabilities) #endif #ifndef HAVE_FSTYPE |ATTR(attr_fs_type) #endif ) ; if (unsupported_attrs) { char *str; LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_WARNING, "ignoring not compiiled-in attribute(s): %s", str = diff_attributes(0, unsupported_attrs)); free(str); attr &= ~unsupported_attrs; } r->attr=attr; if (attr&ATTR(attr_sizeg)) { log_msg(LOG_LEVEL_WARNING, "%s:%d: Using 'S' attribute is DEPRECATED and will be removed in the release after next. Update your config and use 'growing+s' instead (line: '%s')", filename, linenumber, linebuf); } if (attr&ATTR(attr_compressed) && !(attr&get_hashes(false))) { log_msg(LOG_LEVEL_WARNING, "%s:%d: ignore 'comprressed' attribute (no hashsum attributes are set) (line: '%s')", filename, linenumber, linebuf); } conf->db_out_attrs |= attr; LOG_CONFIG_FORMAT_LINE_PREFIX(LOG_LEVEL_CONFIG, "add %s '%s%s %s %s' to node '%s'", get_rule_type_long_string(type), get_rule_type_char(type), r->rx, rs_str = get_restriction_string(r->restriction), attr_str = diff_attributes(0, r->attr), node_path) free(rs_str); free(attr_str); retval = true; } return retval; } DB_ATTR_TYPE do_groupdef(char* group,DB_ATTR_TYPE value) { log_msg(LOG_LEVEL_DEBUG, "define attribute group '%s' with value %llu", group, value); list* r=NULL; symba* s=NULL; if((r=list_find(group,conf->groupsyms))){ DB_ATTR_TYPE prev_value = ((symba*)r->data)->ival; ((symba*)r->data)->ival=value; return prev_value; } /* This is a new group */ s=checked_malloc(sizeof(symba)); s->name=checked_strdup(group); s->ival=value; conf->groupsyms=list_append(conf->groupsyms,(void*)s); return 0; } DB_ATTR_TYPE get_groupval(char* group) { list* r=NULL; if((r=list_find(group,conf->groupsyms))){ return (((symba*)r->data)->ival); } return DB_ATTR_UNDEF; } bool do_dbdef(DB_TYPE dbtype ,char* val, int linenumber, char* filename, char* linebuf) { url_t* u=NULL; database *db = NULL; char *db_option_name = NULL; switch(dbtype) { case DB_TYPE_IN: { db_option_name = "database_in"; db = &(conf->database_in); break; } case DB_TYPE_OUT: { db_option_name = "database_out"; db = &(conf->database_out); break; } case DB_TYPE_NEW: { db_option_name = "database_new"; db = &(conf->database_new); break; } } if(db->url == NULL){ if ((u=parse_url(val, linenumber, filename, linebuf)) != NULL) { /* FIXME Check the URL if you add support for databases that cannot be * both input and output urls */ switch (dbtype) { case DB_TYPE_IN: case DB_TYPE_NEW:{ switch (u->type) { case url_stdout: case url_stderr: case url_syslog: { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "'%s': unsupported URL-type: '%s'", db_option_name, get_url_type_string(u->type)) return false; } case url_stdin: case url_ftp: case url_http: case url_https: case url_fd: case url_file: /* url type is supported */ break; } break; } case DB_TYPE_OUT: { switch (u->type) { case url_stdin: case url_stderr: case url_syslog: { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "'%s': unsupported URL-type: '%s'", db_option_name, get_url_type_string(u->type)) return false; } case url_stdout: case url_ftp: case url_http: case url_https: case url_fd: case url_file: /* url type is supported */ break; } break; } } db->url = u; db->linenumber = linenumber; db->filename = filename; db->linebuf = linebuf?checked_strdup(linebuf):NULL; LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_CONFIG, "set '%s' option to '%s'", db_option_name, u->raw) } else { return false; } } else { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_NOTICE, "'%s' option already set to '%s' (ignore new value '%s')", db_option_name, (db->url)->raw, val); } return true; } bool do_repurldef(char* val, int linenumber, char* filename, char* linebuf) { url_t* u = parse_url(val, linenumber, filename, linebuf); return add_report_url(u, linenumber, filename, linebuf); } bool do_reportlevel(char* val, int linenumber, char* filename, char* linebuf) { REPORT_LEVEL report_level = REPORT_LEVEL_UNKNOWN; report_level = get_report_level(val); if (report_level) { conf->report_level = report_level; LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_CONFIG, "set 'report_level' option to '%s' (raw: %d)", val, report_level) return true; } else { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "invalid report level: '%s'", val); return false; } } bool do_rootprefix(char* val, int linenumber, char* filename, char* linebuf) { if (conf->root_prefix == NULL) { conf->root_prefix=val; conf->root_prefix_length=strlen(conf->root_prefix); if (conf->root_prefix_length && conf->root_prefix[conf->root_prefix_length-1] == '/') { conf->root_prefix[--conf->root_prefix_length] = '\0'; LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_NOTICE, "removed trailing '/' from root prefix: '%s'", conf->root_prefix); } LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_CONFIG, "set 'root_prefix' option to '%s'", conf->root_prefix) return true; } else { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_NOTICE, "'root_prefix' option already set to '%s' (ignore new value '%s')", conf->root_prefix, val); return false; } } long do_num_workers(const char *str) { char *err; long number = strtol(str,&err,10); if (err[0] == '%' && err[1] == '\0') { if (number >= 0 && number <= 100) { long num_of_processors = sysconf(_SC_NPROCESSORS_ONLN); return ceill(num_of_processors * number / 100.0); } else { return -1; } } else if(*err != '\0' || number < 0 || errno == ERANGE) { return -1; } return number; } #ifdef WITH_E2FSATTRS void do_report_ignore_e2fsattrs(char* val, int linenumber, char* filename, char* linebuf) { conf->report_ignore_e2fsattrs = 0UL; if (strcmp(val, "0") != 0) { while (*val) { unsigned long flag = e2fsattrs_get_flag(*val); if (flag) { conf->report_ignore_e2fsattrs |= flag; } else { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_NOTICE, "ignore invalid ext2 file attribute: '%c'", *val) } val++; } } } #endif aide-0.19/src/attributes.c0000644000175000017500000001571214774237261011172 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2015,2016,2019-2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include #include "util.h" #include "attributes.h" attributes_t attributes[] = { { ATTR(attr_filename), NULL, NULL, "name", "name", '\0' }, { ATTR(attr_linkname), "l", "Lname", "lname", "link_name", 'l' }, { ATTR(attr_perm), "p", "Perm", "perm", "perm", 'p' }, { ATTR(attr_uid), "u", "Uid", "uid", "uid", 'u' }, { ATTR(attr_gid), "g", "Gid", "gid", "gid", 'g' }, { ATTR(attr_size), "s", "Size", "size", "size", '>' }, { ATTR(attr_atime), "a", "Atime", "atime", "access_time", 'a' }, { ATTR(attr_ctime), "c", "Ctime", "ctime", "change_time", 'c' }, { ATTR(attr_mtime), "m", "Mtime" , "mtime", "modify_time", 'm' }, { ATTR(attr_inode), "i", "Inode", "inode", "inode", 'i' }, { ATTR(attr_bcount), "b", "Bcount", "bcount", "block_count", 'b' }, { ATTR(attr_linkcount), "n", "Linkcount", "lcount", "link_count", 'n' }, { ATTR(attr_md5), "md5", "MD5", "md5", "md5", '\0' }, { ATTR(attr_sha1), "sha1", "SHA1", "sha1", "sha1", '\0' }, { ATTR(attr_rmd160), "rmd160", "RMD160", "rmd160", "rmd160", '\0' }, { ATTR(attr_tiger), "tiger", "TIGER", "tiger", "tiger", '\0' }, { ATTR(attr_crc32), "crc32", "CRC32", "crc32", "crc32", '\0' }, { ATTR(attr_haval), "haval", "HAVAL", "haval", "haval", '\0' }, { ATTR(attr_gostr3411_94), "gost", "GOST", "gost", "gost", '\0' }, { ATTR(attr_crc32b), "crc32b", "CRC32B", "crc32b", "crc32b", '\0' }, { ATTR(attr_attr), NULL, "Attributes", "attr", "attributes", '\0' }, { ATTR(attr_acl), "acl", "ACL", "acl", "acl", 'A' }, { ATTR(attr_bsize), NULL, NULL, NULL, NULL, '\0' }, { ATTR(attr_rdev), NULL, NULL , NULL, NULL, '\0' }, { ATTR(attr_dev), NULL, NULL , NULL, NULL, '\0' }, { ATTR(attr_allhashsums), NULL, NULL, NULL, NULL, 'H' }, /* "H" is also default compound group for all compiled in hashsums */ { ATTR(attr_sizeg), "S", "Size (>)", NULL, "growing_size", '\0' }, { ATTR(attr_checkinode), "I", NULL, NULL, NULL, '\0' }, { ATTR(attr_allownewfile), "ANF", NULL, NULL, NULL, '\0' }, { ATTR(attr_allowrmfile), "ARF", NULL, NULL, NULL, '\0' }, { ATTR(attr_sha256), "sha256", "SHA256", "sha256", "sha256", '\0' }, { ATTR(attr_sha512), "sha512", "SHA512", "sha512", "sha512", '\0' }, { ATTR(attr_selinux), "selinux", "SELinux", "selinux", "selinux", 'S' }, { ATTR(attr_xattrs), "xattrs", "XAttrs", "xattrs", "xattrs", 'X' }, { ATTR(attr_whirlpool), "whirlpool", "WHIRLPOOL", "whirlpool", "whirlpool", '\0' }, { ATTR(attr_ftype), "ftype", "File type", NULL, "file_type", '!' }, { ATTR(attr_e2fsattrs), "e2fsattrs", "E2FSAttrs", "e2fsattrs", "e2fsattrs", 'E' }, { ATTR(attr_capabilities), "caps", "Caps", "capabilities", "capabilities", 'C' }, { ATTR(attr_stribog256), "stribog256", "STRIBOG256", "stribog256", "stribog256", '\0' }, { ATTR(attr_stribog512), "stribog512", "STRIBOG512", "stribog512", "stribog512", '\0' }, { ATTR(attr_growing), "growing", NULL, NULL, NULL, '\0' }, { ATTR(attr_compressed), "compressed", NULL, NULL, NULL, '\0' }, { ATTR(attr_sha512_256), "sha512_256", "SHA512/256", "sha512_256", "sha512-256", '\0' }, { ATTR(attr_sha3_256), "sha3_256", "SHA3-256", "sha3_256", "sha3-256", '\0' }, { ATTR(attr_sha3_512), "sha3_512", "SHA3-512", "sha3_512", "sha3-512", '\0' }, { ATTR(attr_fs_type), "fstype", "FS type", "fstype", "fs_type", 'F' }, }; DB_ATTR_TYPE num_attrs = sizeof(attributes)/sizeof(attributes_t); static int get_diff_attrs_string(DB_ATTR_TYPE a, DB_ATTR_TYPE b, char *str, bool db) { int n = 0; for (ATTRIBUTE i = 0; i < num_attrs; ++i) { if (db?attributes[i].db_name:attributes[i].config_name) { if (((1LLU< #include #include #include #include #include #include #include #include #ifdef HAVE_FSTYPE #include #endif #include #include "aide.h" #include "attributes.h" #include "do_md.h" #include "db.h" #include "db_config.h" #include "db_disk.h" #include "db_line.h" #include "errorcodes.h" #include "file.h" #include "gen_list.h" #include "log.h" #include "queue.h" #include "rx_rule.h" #include "seltree_struct.h" #include "util.h" queue_ts_t *queue_worker_entries = NULL; struct worker_args { long worker_index; bool dry_run; }; typedef struct worker_thread { pthread_t thread; struct worker_args args; } worker_thread; static char *name_construct (const char *dirpath, const char *filename) { int dirpath_len = strlen (dirpath); int len = dirpath_len + strlen(filename) + (dirpath[dirpath_len-1] != '/'?1:0) + 1; char *ret = checked_malloc(len); snprintf(ret, len, "%s%s%s", dirpath, dirpath[dirpath_len-1] != '/'?"/":"", filename); log_msg(LOG_LEVEL_TRACE,"name_construct: dir: '%s' (%p) + filename: '%s' (%p): '%s' (%p)", dirpath, (void*) dirpath, filename, (void*) filename, ret, (void*) ret); return ret; } static bool open_for_reading(disk_entry *entry, bool dir_rec, const char *whoami) { int fd = -1; struct stat fs; char* failure_str = NULL; char* error_str = NULL; DB_ATTR_TYPE attrs_req_read = entry->attrs & (get_hashes(false) #ifdef WITH_E2FSATTRS | ATTR(attr_e2fsattrs) #endif #ifndef O_PATH #ifdef WITH_POSIX_ACL | ATTR(attr_acl) #endif #ifdef WITH_XATTR | ATTR(attr_xattrs) #endif #ifdef WITH_CAPABILITIES | ATTR(attr_capabilities) #endif #endif ); if (attrs_req_read || dir_rec) { #ifdef O_NOATIME if ((fd = open(entry->filename, O_NOFOLLOW | O_RDONLY | O_NOATIME | O_NONBLOCK)) == -1) { LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> open() with O_NOATIME flag failed: %s (retrying without O_NOATIME)", entry->filename, strerror(errno)); #endif fd = open(entry->filename, O_NOFOLLOW | O_RDONLY | O_NONBLOCK); #ifdef O_NOATIME } #endif if (fd == -1) { failure_str = "open() failed"; error_str = checked_strdup(strerror(errno)); } else { LOG_WHOAMI(LOG_LEVEL_TRACE, "%s> open() returned O_RDONLY fd %d", entry->filename, fd); if (fstat(fd, &fs) != 0) { failure_str = "fstat() failed"; error_str = checked_strdup(strerror(errno)); if (close(fd) < 0) { log_msg(LOG_LEVEL_WARNING, "close() failed for '%s' (fd: %d): %s", entry->filename, fd, strerror(errno)); } fd = -1; } else { if(!(entry->attrs&ATTR(attr_rdev))) { fs.st_rdev=0; } DB_ATTR_TYPE stat_diff; if ((stat_diff = stat_cmp(&entry->fs, &fs, entry->attrs&ATTR(attr_growing))) != RETOK) { failure_str = "stat fields changed"; error_str = diff_attributes(0, stat_diff); if (close(fd) < 0) { log_msg(LOG_LEVEL_WARNING, "close() failed for '%s' (fd: %d): %s", entry->filename, fd, strerror(errno)); } fd = -1; } } } if (fd == -1) { char *attrs_str = diff_attributes(0, attrs_req_read); log_msg(LOG_LEVEL_WARNING, "failed to open %s '%s' for reading: %s: %s (%s%s%s%s)", get_f_type_string_from_perm(entry->fs.st_mode), entry->filename, failure_str, error_str, dir_rec ? "skipping recursion" : "", dir_rec && attrs_req_read ? ", " : "", attrs_req_read ? "disabling attrs requiring read permissions: " : "", attrs_req_read ? attrs_str : "" ); free(error_str); free(attrs_str); entry->attrs &= ~attrs_req_read; return false; } else { if (entry->fd >= 0) { LOG_WHOAMI(LOG_LEVEL_TRACE, "%s> replace O_PATH fd %d with O_RDONLY fd %d", entry->filename, entry->fd, fd); if (close(entry->fd) < 0) { log_msg(LOG_LEVEL_WARNING, "close() failed for '%s' (fd: %d): %s", entry->filename, entry->fd, strerror(errno)); } } entry->fd = fd; return true; } } return false; } static void process_path(char *path, bool dry_run, const char *whoami) { db_line *line = NULL; LOG_WHOAMI(LOG_LEVEL_DEBUG, "process '%s' (fullpath: '%s')", &path[conf->root_prefix_length], path); struct stat stat; int fd = -1; #ifdef O_PATH fd = open(path, O_NOFOLLOW | O_PATH); if (fd == -1) { log_msg(LOG_LEVEL_WARNING, "failed to access '%s': %s (skipping)", path, strerror(errno)); return; } LOG_WHOAMI(LOG_LEVEL_TRACE, "%s> open() returned O_PATH fd %d", path, fd); if (fstat(fd, &stat) == -1) { log_msg(LOG_LEVEL_WARNING, "fstat() failed for %s: %s (skipping)", path, strerror(errno)); } else { #else if(lstat(path, &stat) == -1) { log_msg(LOG_LEVEL_WARNING, "lstat() failed for '%s': %s (skipping)", path, strerror(errno)); } else { #endif file_t file = { .name = &path[conf->root_prefix_length], .type = get_f_type_from_perm(stat.st_mode), #ifdef HAVE_FSTYPE .fs_type = 0UL, #endif }; #ifdef HAVE_FSTYPE struct statfs statfs; if (fstatfs(fd, &statfs) == -1) { log_msg(LOG_LEVEL_WARNING, "fstatfs() failed for %s: %s (file system type information missing)", path, strerror(errno)); } else { file.fs_type = statfs.f_type; } #endif match_t path_match = check_rxtree(file, conf->tree, "disk", false, whoami); char *attrs_str = NULL; disk_entry entry = { .filename = path, .fs = stat, .attrs = 0LLU, #ifdef HAVE_FSTYPE .fs_type = file.fs_type, #endif .fd = fd, }; if (!dry_run && path_match.result & (RESULT_SELECTIVE_MATCH|RESULT_EQUAL_MATCH)) { entry.attrs = path_match.rule->attr; /* disable unsupported attributes */ DB_ATTR_TYPE attrs_to_disable; LOG_LEVEL log_level_unavailable = LOG_LEVEL_DEBUG; if (!S_ISREG(stat.st_mode)) { /* hashsum attributes */ attrs_to_disable = entry.attrs & get_hashes(false); if (attrs_to_disable) { attrs_str = diff_attributes(0, attrs_to_disable); LOG_WHOAMI(log_level_unavailable, "%s> disabling hashsum attribute(s) for non-regular file: %s)", path, attrs_str); free(attrs_str); entry.attrs &= ~attrs_to_disable; } #ifdef WITH_CAPABILITIES /* capability attribute */ attrs_to_disable = entry.attrs & ATTR(attr_capabilities); if (attrs_to_disable) { LOG_WHOAMI(log_level_unavailable, "%s> disabling capability attribute for non-regular file", path); entry.attrs &= ~attrs_to_disable; } #endif } if (!S_ISLNK(stat.st_mode)) { /* linkname attribute */ attrs_to_disable = entry.attrs & ATTR(attr_linkname); if (attrs_to_disable) { LOG_WHOAMI(log_level_unavailable, "%s> disabling linkname attribute for non-symlink file", path); entry.attrs &= ~attrs_to_disable; } } #ifdef WITH_E2FSATTRS if (!(S_ISDIR(stat.st_mode) || S_ISREG(stat.st_mode))) { /* e2fsattrs attribute */ attrs_to_disable = entry.attrs & ATTR(attr_e2fsattrs); if (attrs_to_disable) { LOG_WHOAMI(log_level_unavailable, "%s> disabling e2fsattrs attribute for non-directory/non-regular file", path); entry.attrs &= ~attrs_to_disable; } } #endif } if (S_ISDIR(stat.st_mode)) { const char * whoami_log_thread = whoami ? whoami : "(main)"; DIR *dir = NULL; switch (path_match.result) { case RESULT_SELECTIVE_MATCH: case RESULT_EQUAL_MATCH: case RESULT_PARTIAL_MATCH: case RESULT_RECURSIVE_NEGATIVE_MATCH: case RESULT_PARTIAL_LIMIT_MATCH: LOG_WHOAMI(LOG_LEVEL_DEBUG, "read directory contents of '%s' (reason: %s)", path, get_match_result_desc(path_match.result)); if (open_for_reading(&entry, true, whoami)) { int dupfd = dup(entry.fd); if (dupfd == -1) { log_msg(LOG_LEVEL_WARNING, "'%s': failed to duplicate file descriptor: %s", path, strerror(errno)); } else { if ((dir = fdopendir(dupfd)) == NULL) { log_msg(LOG_LEVEL_WARNING, "failed to open directory '%s' for reading directory contents: %s (skipping recursion)", path, strerror(errno)); } else { const struct dirent *entp = NULL; while ((entp = readdir(dir)) != NULL) { if (strcmp(entp->d_name, ".") != 0 && strcmp(entp->d_name, "..") != 0) { char *entry_full_path = name_construct(path, entp->d_name); log_msg(LOG_LEVEL_THREAD, "%10s: add entry %p to queue of worker entries (filename: '%s')", whoami_log_thread, (void *)entry_full_path, entry_full_path); queue_ts_enqueue(queue_worker_entries, entry_full_path, whoami_log_thread); } } if (closedir(dir) < 0) { log_msg(LOG_LEVEL_WARNING, "closedir() failed for '%s': %s", path, strerror(errno)); } } } } break; case RESULT_NON_RECURSIVE_NEGATIVE_MATCH: case RESULT_NEGATIVE_PARENT_MATCH: case RESULT_NO_RULE_MATCH: case RESULT_PART_LIMIT_AND_NO_RECURSE_MATCH: LOG_WHOAMI(LOG_LEVEL_DEBUG, "do NOT read directory contents of '%s' (reason: %s)", path, get_match_result_desc(path_match.result)); break; case RESULT_NO_LIMIT_MATCH: LOG_WHOAMI(LOG_LEVEL_LIMIT, "do NOT read directory contents of '%s' (reason: %s)", path, get_match_result_desc(path_match.result)); break; } } if (dry_run) { print_match(file, path_match); } else { DB_ATTR_TYPE transition_hashsums = 0LL; if (path_match.result & (RESULT_SELECTIVE_MATCH|RESULT_EQUAL_MATCH)) { if (S_ISREG(stat.st_mode)) { if (open_for_reading(&entry, false, whoami)) { if (conf->action & DO_COMPARE && entry.attrs & get_hashes(false)) { const seltree *node = get_seltree_node(conf->tree, &path[conf->root_prefix_length]); if (node && node->old_data) { transition_hashsums = get_transition_hashsums( (node->old_data)->filename, (node->old_data)->attr, &path[conf->root_prefix_length], entry.attrs); } } } } attrs_str = diff_attributes(0, entry.attrs); LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> requested attributes: %s", entry.filename, attrs_str); free(attrs_str); line = get_file_attrs(&entry, entry.attrs, transition_hashsums, whoami); /* attr_filename is always needed/returned but never requested */ DB_ATTR_TYPE returned_attr = (~ATTR(attr_filename) & line->attr); attrs_str = diff_attributes(0, returned_attr); LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> returned attributes: %llu (%s)", entry.filename, returned_attr, attrs_str); free(attrs_str); if (returned_attr ^ entry.attrs) { attrs_str = diff_attributes(entry.attrs, returned_attr); LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> requested (%llu) and returned (%llu) attributes are not equal: %s", entry.filename, entry.attrs, returned_attr, attrs_str); free(attrs_str); } add_file_to_tree(conf->tree, line, DB_NEW | DB_DISK, NULL, &entry, whoami); } } if (entry.fd != -1) { if (close(entry.fd) < 0) { log_msg(LOG_LEVEL_WARNING, "close() failed for '%s': %s", path, strerror(errno)); } } } } static void process_disk_entries(bool dry_run, const char *whoami) { const char * whoami_log_thread = whoami ? whoami : "(main)"; while (1) { log_msg(LOG_LEVEL_THREAD, "%10s: process_disk_entries: wait for entries", whoami_log_thread); char *data = queue_ts_dequeue_wait(queue_worker_entries, whoami_log_thread); if (data) { log_msg(LOG_LEVEL_THREAD, "%10s: process_disk_entries: got entry %p from queue of worker entries (path: '%s')", whoami_log_thread, (void*) data, data); process_path(data, dry_run, whoami); free(data); } else { log_msg(LOG_LEVEL_THREAD, "%10s: process_disk_entries: queue empty", whoami_log_thread); break; } } } static void * worker(void *arg) { struct worker_args args = *(struct worker_args *)arg; char whoami[32]; snprintf(whoami, 32, "(work-%03li)", args.worker_index); mask_sig(whoami); queue_ts_register(queue_worker_entries, whoami); log_msg(LOG_LEVEL_THREAD, "%10s: worker: initialized worker thread #%ld", whoami, args.worker_index); process_disk_entries(args.dry_run, whoami); log_msg(LOG_LEVEL_THREAD, "%10s: worker: exit thread", whoami); return (void *) pthread_self(); } void db_scan_disk(bool dry_run) { const char *whoami_main = "(main)"; char* full_path=checked_malloc((conf->root_prefix_length+2)*sizeof(char)); /* freed in process_disk_entries() */ strncpy(full_path, conf->root_prefix, conf->root_prefix_length+1); strcat (full_path, "/"); if (dry_run || conf->num_workers == 0) { queue_worker_entries = queue_ts_init(); /* freed below */ queue_ts_enqueue(queue_worker_entries, full_path, whoami_main); queue_ts_release(queue_worker_entries, whoami_main); process_disk_entries(dry_run, NULL); queue_ts_free(queue_worker_entries); } else { queue_worker_entries = queue_ts_init(); /* freed below */ log_msg(LOG_LEVEL_THREAD, "%10s: initialized worker entries queue %p", whoami_main, (void*) queue_worker_entries); worker_thread *worker_threads = checked_malloc(conf->num_workers * sizeof(worker_thread)); /* freed below */ for (int i = 0 ; i < conf->num_workers ; ++i) { worker_threads[i].args.worker_index = i + 1L; worker_threads[i].args.dry_run = dry_run; if (pthread_create(&worker_threads[i].thread, NULL, &worker, (void *) &worker_threads[i].args) != 0) { log_msg(LOG_LEVEL_ERROR, "failed to start file attributes worker thread #%d", i+1); exit(THREAD_ERROR); } } queue_ts_enqueue(queue_worker_entries, full_path, whoami_main); queue_ts_release(queue_worker_entries, whoami_main); log_msg(LOG_LEVEL_THREAD, "%10s: wait for worker threads to be finished", whoami_main); for (int i = 0 ; i < conf->num_workers ; ++i) { if (pthread_join(worker_threads[i].thread, NULL) != 0) { log_msg(LOG_LEVEL_WARNING, "failed to join file attributes thread #%d", i); } log_msg(LOG_LEVEL_THREAD, "%10s: worker thread #%d finished", whoami_main, i); } free(worker_threads); queue_ts_free(queue_worker_entries); } } aide-0.19/src/db.c0000644000175000017500000003316414771737364007400 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2006, 2010-2011, 2013, 2019-2025 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "aide.h" #include #include #include #include #include #include "attributes.h" #include "config.h" #include "hashsum.h" #include "url.h" #include #include "db.h" #include "db_line.h" #include "db_file.h" #include "md.h" #ifdef WITH_CURL #include "fopen.h" #endif #include "db_config.h" #include "log.h" #include "be.h" #include "base64.h" #include "util.h" static long readoct(char* s, database* db, char* field_name){ long i; char* e; i=strtol(s,&e,8); if (e[0]!='\0') { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "could not read '%s' from database: strtol (base: 8) failed for '%s'", field_name, s) } return i; } static long readlong(char* s, database* db, char* field_name){ long i; char* e; i=strtol(s,&e,10); if (e[0]!='\0') { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "could not read '%s' from database: strtol failed for '%s'", field_name, s) } return i; } #ifdef HAVE_FSTYPE static unsigned long readunsignedlong(char* s, database* db, char* field_name){ unsigned long i; char* e; i=strtoul(s,&e,10); if (e[0]!='\0') { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "could not read '%s' from database: strtoul failed for '%s'", field_name, s) return 0; } return i; } #endif static long long readlonglong(char* s, database* db, char* field_name){ long long int i; char* e; i=strtoll(s,&e,10); if (e[0]!='\0') { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "could not read '%s' from database: strtoll failed for '%s'", field_name, s) } return i; } static time_t read_time_t(char *str, database *db, const char *field_name) { char *decoded = NULL; char *time_t_str = str; if (strcmp(str, "0") == 0) { return 0; } if (*str >= 'M' && *str <= 'O') { /* handle legacy base64 representation */ decoded = (char *) decode_base64(str, strlen(str), NULL); if (decoded == NULL) { /* warning is logged in decode_base64 */ return 0; } time_t_str = decoded; log_msg(LOG_LEVEL_TRACE, "read_time_t: base64 decoded '%s' to '%s'", str, decoded); } char *endp = NULL; time_t t = strtol(time_t_str, &endp, 10); if (endp[0] != '\0' || (errno = ERANGE && (t == LONG_MAX || t == LONG_MIN))) { LOG_DB_FORMAT_LINE(LOG_LEVEL_WARNING, "could not read '%s' from database: strtol failed for '%s' (setting '%s' to 0)", field_name, time_t_str, field_name) t = 0; } else { log_msg(LOG_LEVEL_TRACE, "read_time_t: converted '%s' '%s' to %lld ", field_name, time_t_str, (long long)t); } free(decoded); return t; } static struct md_container *init_db_attrs(url_t *u) { struct md_container *mdc = NULL; if (conf->db_attrs) { switch (u->type) { case url_stdin: case url_stdout: case url_stderr: case url_fd: case url_file: case url_http: case url_https: case url_ftp: { mdc = checked_malloc(sizeof(struct md_container)); /* freed in close_db_attrs */ mdc->todo_attr = conf->db_attrs; init_md(mdc, u->value, NULL); break; } /* unsupported database types */ case url_syslog: { /* do nothing */ break; } } } return mdc; } static db_line *close_db_attrs (database *db) { db_line *line = NULL; if (db->mdc != NULL) { md_hashsums hs; line = checked_malloc(sizeof(struct db_line)); line->filename = (db->url)->value; line->perm = 0; line->attr = conf->db_attrs; close_md(db->mdc, &hs, line->filename, NULL); hashsums2line(&hs, line, NULL); free(db->mdc); } return line; } int db_init(database* db, bool readonly, bool gzip) { void* fp = NULL; log_msg(LOG_LEVEL_TRACE,"db_init(): arguments: db=%p, gzip=%s", (void*) db, btoa(gzip)); db->mdc = init_db_attrs(db->url); bool created = false; fp=be_init(db->url, readonly, gzip, false, db->linenumber, db->filename, db->linebuf, &created); if (created) { db->flags |= DB_FLAG_CREATED; } if(fp==NULL) { return RETFAIL; } else { #ifdef WITH_ZLIB if (gzip) { db->gzp = fp; } else { #endif db->fp = fp; #ifdef WITH_ZLIB } #endif return RETOK; } } db_entry_t db_readline(database* db, bool include_limited_entries){ return db_readline_file(db, include_limited_entries); } byte* base64tobyte(char* src,int len,size_t *ret_len) { if(strcmp(src,"0")!=0){ return decode_base64(src,len,ret_len); } return NULL; } static char *read_linkname(char *s) { if (s == NULL) return (NULL); if (s[0] == '0') { if (s[1] == '\0') return (NULL); if (s[1] == '-') return (checked_strdup("")); if (s[1] == '0') { s++; } } decode_string(s); return checked_strdup(s); } #define CHAR2HASH(hash) \ case attr_ ##hash : { \ line->hashsums[hash_ ##hash]=base64tobyte(ss[db->fields[i]], \ strlen(ss[db->fields[i]]), NULL); \ log_msg(LOG_LEVEL_TRACE, "%s: copy " #hash " hashsum (%s) to %p", line->filename, ss[db->fields[i]], (void*) line->hashsums[hash_ ##hash]); \ break; \ } db_line* db_char2line(char** ss, database* db){ db_line* line=(db_line*)checked_malloc(sizeof(db_line)*1); line->perm=0; line->uid=0; line->gid=0; line->atime=0; line->ctime=0; line->mtime=0; line->inode=0; line->nlink=0; line->bcount=0; line->size=0; line->filename=NULL; line->fullpath=NULL; line->linkname=NULL; #ifdef WITH_POSIX_ACL line->acl=NULL; #endif #ifdef WITH_XATTR line->xattrs=NULL; #endif line->e2fsattrs=0; line->cntx=NULL; line->capabilities=NULL; for (int i = 0 ; i < num_hashes ; ++i) { line->hashsums[i]=NULL; } line->attr=conf->attr; /* attributes from @@dbspec */ for(int i=0;inum_fields;i++){ log_msg(LOG_LEVEL_TRACE, "db_char2line(): %ld[%d]: '%s' (%p)", db->lineno, i, ss[i], (void*) ss[i]); switch (db->fields[i]) { case attr_filename : { if(ss[db->fields[i]]!=NULL){ decode_string(ss[db->fields[i]]); line->fullpath=checked_strdup(ss[db->fields[i]]); line->filename=line->fullpath; } else { log_msg(LOG_LEVEL_ERROR, "db_char2line(): error while reading database"); exit(EXIT_FAILURE); } break; } case attr_linkname : { line->linkname = read_linkname(ss[db->fields[i]]); break; } case attr_mtime : { line->mtime=read_time_t(ss[db->fields[i]], db, "mtime"); break; } case attr_bcount : { line->bcount=readlonglong(ss[db->fields[i]], db, "bcount"); break; } case attr_atime : { line->atime=read_time_t(ss[db->fields[i]], db, "atime"); break; } case attr_ctime : { line->ctime=read_time_t(ss[db->fields[i]], db, "ctime"); break; } case attr_inode : { line->inode=readlong(ss[db->fields[i]], db, "inode"); break; } case attr_uid : { line->uid=readlong(ss[db->fields[i]], db, "uid"); break; } case attr_gid : { line->gid=readlong(ss[db->fields[i]], db, "gid"); break; } case attr_size : { line->size=readlonglong(ss[db->fields[i]], db, "size"); break; } CHAR2HASH(md5) CHAR2HASH(sha256) CHAR2HASH(sha512) CHAR2HASH(sha1) CHAR2HASH(rmd160) CHAR2HASH(tiger) CHAR2HASH(crc32) CHAR2HASH(crc32b) CHAR2HASH(haval) CHAR2HASH(whirlpool) CHAR2HASH(gostr3411_94) CHAR2HASH(stribog256) CHAR2HASH(stribog512) CHAR2HASH(sha512_256) CHAR2HASH(sha3_256) CHAR2HASH(sha3_512) case attr_acl : { #ifdef WITH_POSIX_ACL char *tval = NULL; tval = strtok(ss[db->fields[i]], ","); line->acl = NULL; if (tval[0] == '0') line->acl = NULL; else if (!strcmp(tval, "POSIX")) { line->acl = checked_malloc(sizeof(acl_type)); line->acl->acl_a = NULL; line->acl->acl_d = NULL; tval = strtok(NULL, ","); line->acl->acl_a = (char *)base64tobyte(tval, strlen(tval), NULL); tval = strtok(NULL, ","); line->acl->acl_d = (char *)base64tobyte(tval, strlen(tval), NULL); } /* else, it's broken... */ #endif break; } case attr_xattrs : { #ifdef WITH_XATTR size_t num = 0; char *tval = NULL; tval = strtok(ss[db->fields[i]], ","); num = readlong(tval, db, "xattrs"); if (num) { line->xattrs = checked_malloc(sizeof(xattrs_type)); line->xattrs->ents = checked_calloc(sizeof(xattr_node), num); line->xattrs->sz = num; line->xattrs->num = num; num = 0; while (num < line->xattrs->num) { byte *val = NULL; size_t vsz = 0; tval = strtok(NULL, ","); decode_string(tval); line->xattrs->ents[num].key = checked_strdup(tval); tval = strtok(NULL, ","); val = base64tobyte(tval, strlen(tval), &vsz); line->xattrs->ents[num].val = val; line->xattrs->ents[num].vsz = vsz; ++num; } } #endif break; } case attr_selinux : { byte *val = NULL; val = base64tobyte(ss[db->fields[i]], strlen(ss[db->fields[i]]),NULL); line->cntx = (char *)val; break; } case attr_perm : { line->perm=readoct(ss[db->fields[i]], db, "permissions"); break; } case attr_linkcount : { line->nlink=readlong(ss[db->fields[i]], db, "nlink"); break; } case attr_attr : { line->attr=readlonglong(ss[db->fields[i]], db, "attr"); break; } case attr_e2fsattrs : { line->e2fsattrs=readlong(ss[db->fields[i]], db, "e2fsattrs"); break; } case attr_capabilities : { byte *val = NULL; val = base64tobyte(ss[db->fields[i]], strlen(ss[db->fields[i]]),NULL); line->capabilities = (char *)val; break; } case attr_fs_type : { #ifdef HAVE_FSTYPE line->fs_type = readunsignedlong(ss[db->fields[i]], db, attributes[attr_fs_type].db_name); #endif break; } case attr_bsize : case attr_sizeg : case attr_rdev : case attr_dev : case attr_ftype : case attr_checkinode : case attr_allhashsums : case attr_growing : case attr_compressed : case attr_allownewfile : case attr_allowrmfile : { /* no db field */ break; } case attr_unknown : { /* Unknown fields are ignored. */ break; } } } return line; } int db_writespec(db_config* dbconf) { if( #ifdef WITH_ZLIB (dbconf->gzip_dbout && dbconf->database_out.gzp) || #endif (dbconf->database_out.fp!=NULL)){ if(db_writespec_file(dbconf)==RETOK){ return RETOK; } } return RETFAIL; } int db_writeline(db_line* line,db_config* dbconf){ if (line==NULL||dbconf==NULL) return RETOK; if ( #ifdef WITH_ZLIB (dbconf->gzip_dbout && dbconf->database_out.gzp) || #endif (dbconf->database_out.fp!=NULL)) { if (db_writeline_file(line)==RETOK) { return RETOK; } } return RETFAIL; } void db_close(void) { if (conf->database_out.url) { switch (conf->database_out.url->type) { case url_stdin: case url_stdout: case url_stderr: case url_fd: case url_file: { if ( #ifdef WITH_ZLIB (conf->gzip_dbout && conf->database_out.gzp) || #endif (conf->database_out.fp!=NULL)) { db_close_file(conf); } break; } case url_http: case url_https: case url_ftp: { #ifdef WITH_CURL if (conf->database_out.fp!=NULL) { url_fclose(conf->database_out.fp); conf->database_out.fp = NULL; } #endif /* WITH CURL */ break; } /* unsupported database types */ case url_syslog: { /* do nothing */ break; } } } conf->database_in.db_line = close_db_attrs(&conf->database_in); conf->database_out.db_line = close_db_attrs(&conf->database_out); conf->database_new.db_line = close_db_attrs(&conf->database_new); } void free_db_line(db_line* dl) { if (dl==NULL) { return; } #define checked_free(x) do { free(x); x=NULL; } while (0) for (int i = 0 ; i < num_hashes ; ++i) { checked_free(dl->hashsums[i]); } dl->filename=NULL; checked_free(dl->fullpath); checked_free(dl->linkname); #ifdef WITH_ACL if (dl->acl) { free(dl->acl->acl_a); free(dl->acl->acl_d); } checked_free(dl->acl); #endif #ifdef WITH_XATTR if (dl->xattrs) free(dl->xattrs->ents); checked_free(dl->xattrs); checked_free(dl->cntx); #endif } aide-0.19/src/fopen.c0000644000175000017500000002526514772245307010115 /***************************************************************************** * * This example source code introduces a c library buffered I/O interface to * URL reads it supports fopen(), fread(), fgets(), feof(), fclose(), * rewind(). Supported functions have identical prototypes to their normal c * lib namesakes and are preceaded by url_ . * * Using this code you can replace your program's fopen() with url_fopen() * and fread() with url_fread() and it become possible to read remote streams * instead of (only) local files. Local files (ie those that can be directly * fopened) will drop back to using the underlying clib implementations * * See the main() function at the bottom that shows an app that retrives from a * specified url using fgets() and fread() and saves as two output files. * * Copyright (c) 2003 Simtec Electronics * * Re-implemented by Vincent Sanders with extensive * reference to original curl example code * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This example requires libcurl 7.9.7 or later. * * Modified for aide by Hannes von Haugwitz * based on modifications of previous version by Pablo Virolainen * (pablo@ipi.fi): * 2013-05-14: - moved declarations to 'include/fopen.h' * - removed (unneeded) main method * 2022-02-12: - update #include statements */ #include #include #include #include #include #include #include "fopen.h" /* we use a global one for convenience */ CURLM *multi_handle; /* curl calls this routine to get more data */ static size_t write_callback(char *buffer, size_t size, size_t nitems, void *userp) { char *newbuff; size_t rembuff; URL_FILE *url = (URL_FILE *)userp; size *= nitems; rembuff=url->buffer_len - url->buffer_pos; /* remaining space in buffer */ if(size > rembuff) { /* not enough space in buffer */ newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff)); if(newbuff==NULL) { fprintf(stderr,"callback buffer grow failed\n"); size=rembuff; } else { /* realloc suceeded increase buffer size*/ url->buffer_len+=size - rembuff; url->buffer=newbuff; } } memcpy(&url->buffer[url->buffer_pos], buffer, size); url->buffer_pos += size; return size; } /* use to attempt to fill the read buffer up to requested number of bytes */ static int fill_buffer(URL_FILE *file, size_t want) { fd_set fdread; fd_set fdwrite; fd_set fdexcep; struct timeval timeout; int rc; /* only attempt to fill buffer if transactions still running and buffer * doesnt exceed required size already */ if((!file->still_running) || (file->buffer_pos > want)) return 0; /* attempt to fill buffer */ do { int maxfd = -1; long curl_timeo = -1; FD_ZERO(&fdread); FD_ZERO(&fdwrite); FD_ZERO(&fdexcep); /* set a suitable timeout to fail on */ timeout.tv_sec = 60; /* 1 minute */ timeout.tv_usec = 0; curl_multi_timeout(multi_handle, &curl_timeo); if(curl_timeo >= 0) { timeout.tv_sec = curl_timeo / 1000; if(timeout.tv_sec > 1) timeout.tv_sec = 1; else timeout.tv_usec = (curl_timeo % 1000) * 1000; } /* get file descriptors from the transfers */ curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); /* In a real-world program you OF COURSE check the return code of the function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in case of (maxfd == -1), we call select(0, ...), which is basically equal to sleep. */ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); switch(rc) { case -1: /* select error */ break; case 0: default: /* timeout or readable/writable sockets */ curl_multi_perform(multi_handle, &file->still_running); break; } } while(file->still_running && (file->buffer_pos < want)); return 1; } /* use to remove want bytes from the front of a files buffer */ static int use_buffer(URL_FILE *file,int want) { /* sort out buffer */ if((file->buffer_pos - want) <=0) { /* ditch buffer - write will recreate */ if(file->buffer) free(file->buffer); file->buffer=NULL; file->buffer_pos=0; file->buffer_len=0; } else { /* move rest down make it available for later */ memmove(file->buffer, &file->buffer[want], (file->buffer_pos - want)); file->buffer_pos -= want; } return 0; } URL_FILE *url_fopen(const char *url,const char *operation) { /* this code could check for URLs or types in the 'url' and basicly use the real fopen() for standard files */ URL_FILE *file; (void)operation; file = malloc(sizeof(URL_FILE)); if(!file) return NULL; memset(file, 0, sizeof(URL_FILE)); if((file->handle.file=fopen(url,operation))) file->type = CFTYPE_FILE; /* marked as URL */ else { file->type = CFTYPE_CURL; /* marked as URL */ file->handle.curl = curl_easy_init(); curl_easy_setopt(file->handle.curl, CURLOPT_URL, url); curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file); curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0L); curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback); if(!multi_handle) multi_handle = curl_multi_init(); curl_multi_add_handle(multi_handle, file->handle.curl); /* lets start the fetch */ curl_multi_perform(multi_handle, &file->still_running); if((file->buffer_pos == 0) && (!file->still_running)) { /* if still_running is 0 now, we should return NULL */ /* make sure the easy handle is not in the multi handle anymore */ curl_multi_remove_handle(multi_handle, file->handle.curl); /* cleanup */ curl_easy_cleanup(file->handle.curl); free(file); file = NULL; } } return file; } int url_fclose(URL_FILE *file) { int ret=0;/* default is good return */ switch(file->type) { case CFTYPE_FILE: ret=fclose(file->handle.file); /* passthrough */ break; case CFTYPE_CURL: /* make sure the easy handle is not in the multi handle anymore */ curl_multi_remove_handle(multi_handle, file->handle.curl); /* cleanup */ curl_easy_cleanup(file->handle.curl); break; default: /* unknown or supported type - oh dear */ ret=EOF; errno=EBADF; break; } if(file->buffer) free(file->buffer);/* free any allocated buffer space */ free(file); return ret; } int url_feof(URL_FILE *file) { int ret=0; switch(file->type) { case CFTYPE_FILE: ret=feof(file->handle.file); break; case CFTYPE_CURL: if((file->buffer_pos == 0) && (!file->still_running)) ret = 1; break; default: /* unknown or supported type - oh dear */ ret=-1; errno=EBADF; break; } return ret; } size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file) { size_t want; switch(file->type) { case CFTYPE_FILE: want=fread(ptr,size,nmemb,file->handle.file); break; case CFTYPE_CURL: want = nmemb * size; fill_buffer(file,want); /* check if theres data in the buffer - if not fill_buffer() * either errored or EOF */ if(!file->buffer_pos) return 0; /* ensure only available data is considered */ if(file->buffer_pos < want) want = file->buffer_pos; /* xfer data to caller */ memcpy(ptr, file->buffer, want); use_buffer(file,want); want = want / size; /* number of items */ break; default: /* unknown or supported type - oh dear */ want=0; errno=EBADF; break; } return want; } char *url_fgets(char *ptr, size_t size, URL_FILE *file) { size_t want = size - 1;/* always need to leave room for zero termination */ size_t loop; switch(file->type) { case CFTYPE_FILE: ptr = fgets(ptr,size,file->handle.file); break; case CFTYPE_CURL: fill_buffer(file,want); /* check if theres data in the buffer - if not fill either errored or * EOF */ if(!file->buffer_pos) return NULL; /* ensure only available data is considered */ if(file->buffer_pos < want) want = file->buffer_pos; /*buffer contains data */ /* look for newline or eof */ for(loop=0;loop < want;loop++) { if(file->buffer[loop] == '\n') { want=loop+1;/* include newline */ break; } } /* xfer data to caller */ memcpy(ptr, file->buffer, want); ptr[want]=0;/* allways null terminate */ use_buffer(file,want); break; default: /* unknown or supported type - oh dear */ ptr=NULL; errno=EBADF; break; } return ptr;/*success */ } void url_rewind(URL_FILE *file) { switch(file->type) { case CFTYPE_FILE: rewind(file->handle.file); /* passthrough */ break; case CFTYPE_CURL: /* halt transaction */ curl_multi_remove_handle(multi_handle, file->handle.curl); /* restart */ curl_multi_add_handle(multi_handle, file->handle.curl); /* ditch buffer - write will recreate - resets stream pos*/ if(file->buffer) free(file->buffer); file->buffer=NULL; file->buffer_pos=0; file->buffer_len=0; break; default: /* unknown or supported type - oh dear */ break; } } aide-0.19/src/util.c0000644000175000017500000003311714774237261007760 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2004-2006, 2010-2011, 2013, 2016, 2019-2023 * Rami Lehti, Pablo Virolainen, Mike Markley, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "url.h" /*for locale support*/ #include "locale-aide.h" /*for locale support*/ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 #endif #include "log.h" #include "db_config.h" #include "util.h" #include "errorcodes.h" #define URL_UNSAFE " <>\"#%{}|\\^~[]`@:\033'" #define ISPRINT(c) (isascii(c) && isprint(c)) pthread_mutex_t stderr_mutex = PTHREAD_MUTEX_INITIALIZER; bool stderr_erase_line = false; void stderr_msg(const char* format, ...) { pthread_mutex_lock(&stderr_mutex); if (stderr_erase_line) { fprintf(stderr, "\33[2K"); } va_list ap; va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap); pthread_mutex_unlock(&stderr_mutex); } void vstderr_prefix_line(const char* prefix, const char* format, va_list ap) { pthread_mutex_lock(&stderr_mutex); if (stderr_erase_line) { fprintf(stderr, "\33[2K"); } fprintf(stderr, "%s: ", prefix); vfprintf(stderr, format, ap); fprintf(stderr, "\n"); pthread_mutex_unlock(&stderr_mutex); } void stderr_set_line_erasure(bool erase_line) { pthread_mutex_lock(&stderr_mutex); if (stderr_erase_line) { fprintf(stderr, "\33[2K"); } stderr_erase_line = erase_line; pthread_mutex_unlock(&stderr_mutex); } const char* btoa(bool b) { return b?"true":"false"; } void* checked_malloc(size_t size) { void * p = malloc(size); if (p == NULL) { log_msg(LOG_LEVEL_ERROR, "malloc: failed to allocate %lu bytes of memory", (unsigned long) size); exit(MEMORY_ALLOCATION_FAILURE); } return p; } void* checked_calloc(size_t nmemb, size_t size) { void * p = calloc(nmemb, size); if (p == NULL) { log_msg(LOG_LEVEL_ERROR, "calloc: failed to allocate %lu bytes of memory", (unsigned long) size); exit(MEMORY_ALLOCATION_FAILURE); } return p; } void* checked_strdup(const char *s) { void * p = strdup(s); if (p == NULL) { log_msg(LOG_LEVEL_ERROR, "strdup: failed to allocate memory"); exit(MEMORY_ALLOCATION_FAILURE); } return p; } void* checked_strndup(const char *s, size_t size) { void * p = strndup(s, size); if (p == NULL) { log_msg(LOG_LEVEL_ERROR, "strndup: failed to allocate memory"); exit(MEMORY_ALLOCATION_FAILURE); } return p; } void* checked_realloc(void *ptr, size_t size) { void * p = realloc(ptr,size); if (p == NULL) { log_msg(LOG_LEVEL_ERROR, "realloc: failed to re-allocate %lu bytes of memory", (unsigned long) size); exit(MEMORY_ALLOCATION_FAILURE); } return p; } int cmpurl(url_t* u1,url_t* u2) { if(u1->type!= u2->type){ return RETFAIL; }; if(strcmp(u1->value,u2->value)!=0){ return RETFAIL; } return RETOK; } /* Returns 1 if the string contains unsafe characters, 0 otherwise. */ int contains_unsafe (const char *s) { for (; *s; s++) if (strchr (URL_UNSAFE,(int) *s)||!ISPRINT((int)*s)) return 1; return 0; } /* Decodes the forms %xy in a URL to the character the hexadecimal code of which is xy. xy are hexadecimal digits from [0123456789ABCDEF] (case-insensitive). If x or y are not hex-digits or `%' precedes `\0', the sequence is inserted literally. */ void decode_string (char* s) { char *p = s; for (; *s; s++, p++) { if (*s != '%') *p = *s; else { /* Do nothing if at the end of the string, or if the chars are not hex-digits. */ if (!*(s + 1) || !*(s + 2) || !(ISXDIGIT (*(s + 1)) && ISXDIGIT (*(s + 2)))) { *p = *s; continue; } *p = (ASC2HEXD (*(s + 1)) << 4) + ASC2HEXD (*(s + 2)); s += 2; } } *p = '\0'; } /* Encodes the unsafe characters (listed in URL_UNSAFE) in a given string, returning a malloc-ed %XX encoded string. */ char* encode_string (const char* s) { const char *b; char *p, *res; int i; b = s; for (i = 0; *s; s++, i++){ if (strchr (URL_UNSAFE,(int) *s)||!ISPRINT((int)*s)){ i += 2; /* Two more characters (hex digits) */ } } res = (char *)checked_malloc (i + 1); s = b; for (p = res; *s; s++){ if (strchr (URL_UNSAFE, *s)||!ISPRINT((int)*s)) { const unsigned char c = *s; *p++ = '%'; *p++ = HEXD2ASC (c >> 4); *p++ = HEXD2ASC (c & 0xf); } else { *p++ = *s; } } *p = '\0'; return res; } char* byte_to_base16(const byte* src, size_t ssize) { char* str = checked_malloc((2*ssize+1) * sizeof (char)); for(size_t i=0; i < ssize; ++i) { snprintf(&str[2*i], 3, "%02x", src[i]); } return str; } char *get_progress_bar_string(const char* state_str, const char* path, long unsigned num_entries, long unsigned num_skipped, int elapsed, int length) { char *progress_bar = checked_malloc(length+1); int n = 0; int left = length; n += snprintf(&progress_bar[n], left+1, "[%02d:%02d] %s> %lu %s", elapsed/60, elapsed%60, state_str, num_entries, num_entries == 1?"file":"files"); left = length-n; if (num_skipped && left > 0) { n += snprintf(&progress_bar[n], left+1, " (%lu skipped)", num_skipped); left = length-n; } if (path && left > 0) { const char *ellipsis = "/..."; const char *last_str = ", last "; int last_str_len = strlen(last_str); int ellipsis_len = 0; int prefix_len = 0; const char *suffix_path = path; if ((long) strlen(path) > (left-last_str_len) ) { const char *first_slash = strchr(path+1, '/'); if (first_slash) { ellipsis_len = strlen(ellipsis); prefix_len = first_slash - path; suffix_path = first_slash+1; int path_left = left - last_str_len - prefix_len - ellipsis_len; while ((long) strlen(suffix_path) > path_left) { char *slash = strchr(suffix_path+1, '/'); if (slash) { suffix_path = slash; } else { break; } } } } snprintf(&progress_bar[n], left+1, "%s%.*s%.*s%s", last_str, prefix_len, path, ellipsis_len, ellipsis, suffix_path); } return progress_bar; } char* perm_to_char(mode_t perm) { char*pc=NULL; int i=0; pc=(char*)checked_malloc(sizeof(char)*11); for(i=0;i<10;i++){ pc[i]='-'; } pc[10]='\0'; if(S_ISDIR(perm)) pc[0]='d'; #ifdef S_ISFIFO if(S_ISFIFO(perm)) pc[0]='p'; #endif if(S_ISLNK(perm)) pc[0]='l'; if(S_ISBLK(perm)) pc[0]='b'; if(S_ISCHR(perm)) pc[0]='c'; #ifdef S_ISDOOR if(S_ISDOOR(perm)) pc[0]='|'; #endif #ifdef S_ISSOCK if(S_ISSOCK(perm)) pc[0]='s'; #endif if((S_IRUSR&perm)==S_IRUSR){ pc[1]='r'; } if((S_IWUSR&perm)==S_IWUSR){ pc[2]='w'; } if((S_IXUSR&perm)==S_IXUSR){ pc[3]='x'; } if((S_IRGRP&perm)==S_IRGRP){ pc[4]='r'; } if((S_IWGRP&perm)==S_IWGRP){ pc[5]='w'; } if((S_IXGRP&perm)==S_IXGRP){ pc[6]='x'; } if((S_IROTH&perm)==S_IROTH){ pc[7]='r'; } if((S_IWOTH&perm)==S_IWOTH){ pc[8]='w'; } if((S_IXOTH&perm)==S_IXOTH){ pc[9]='x'; } if((S_ISUID&perm)==S_ISUID){ if((S_IXUSR&perm)==S_IXUSR){ pc[3]='s'; } else { pc[3]='S'; } } if((S_ISGID&perm)==S_ISGID){ if((S_IXGRP&perm)==S_IXGRP){ pc[6]='s'; } else { pc[6]='l'; } } #if defined (S_ISVTX) && defined (S_IXOTH) if((S_ISVTX&perm)==S_ISVTX){ if((S_IXOTH&perm)==S_IXOTH){ pc[9]='t'; } else { pc[9]='T'; } } #endif log_msg(LOG_LEVEL_TRACE, "perm_to_char: %i -> %s",perm,pc); return pc; } char *expand_tilde(char *path) { char *homedir = NULL; char *full = NULL; if (path != NULL) { if (path[0] == '~') { if((homedir=getenv("HOME")) != NULL) { size_t path_len, homedir_len, full_len; path_len = strlen(path+sizeof(char)); homedir_len = strlen(homedir); full_len = (homedir_len+path_len+1) * sizeof(char); full = checked_malloc(full_len); snprintf(full, full_len, "%s%s", homedir, path+sizeof(char)); log_msg(LOG_LEVEL_DEBUG, "expanded '~' in '%s' to '%s'", path, full); free(path); /* Don't free(homedir); because it is not safe on some platforms */ path = full; } else { log_msg(LOG_LEVEL_WARNING, _("Variable name 'HOME' not found in environment. '~' cannot be expanded")); } } else if (path[0] == '\\' && path[1] == '~') { path += sizeof(char); } } return path; } char* pipe2string(int fd) { int nbytes; char buffer[1024]; char* str = NULL; while ((nbytes = read(fd, buffer, sizeof(buffer))) > 0) { int str_len = str?strlen(str):0U; int len = str_len+nbytes; str = checked_realloc(str, (len+1)*sizeof(char)); strncpy(str+str_len, buffer, nbytes); str[len] = '\0'; } return str; } char* get_time_string(const time_t *tm) { const char time_format[] = "%Y-%m-%d %H:%M:%S %z"; int time_string_len = strlen("1979-01-01 01:00:00 +0100")+1; char *time = checked_malloc(time_string_len * sizeof (char)); strftime(time, time_string_len, time_format, localtime(tm)); return time; } void mask_sig(const char* whoami) { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGINT); sigaddset(&set, SIGTERM); sigaddset(&set, SIGHUP); sigaddset(&set, SIGUSR1); sigaddset(&set, SIGWINCH); if(pthread_sigmask(SIG_BLOCK, &set, NULL)) { log_msg(LOG_LEVEL_ERROR, "%10s: pthread_sigmask failed to set mask of blocked signals", whoami); exit(THREAD_ERROR); } } /* Like strstr but only do search for maximum of n chars. haystack does not have to be NULL terminated needle has to be NULL terminated. NULL in needle is not used in compare. NULLs in haystack are ignored. */ #ifndef HAVE_STRNSTR char* strnstr(char* haystack,char* needle,int n) { char* h=haystack; char* s=needle; int slen=strlen(s); int i=0; for(i=0;imaxlen) return maxlen; return l; } #endif #ifdef HAVE_SYSLOG /* Lookup syslog facilities by name */ int syslog_facility_lookup(char *s) { if(!s || strlen(s)<1) return(AIDE_SYSLOG_FACILITY); #ifdef LOG_KERN if(strcasecmp(s,"LOG_KERN")==0) return(LOG_KERN); #endif #ifdef LOG_USER if(strcasecmp(s,"LOG_USER")==0) return(LOG_USER); #endif #ifdef LOG_MAIL if(strcasecmp(s,"LOG_MAIL")==0) return(LOG_MAIL); #endif #ifdef LOG_DAEMON if(strcasecmp(s,"LOG_DAEMON")==0) return(LOG_DAEMON); #endif #ifdef LOG_AUTH if(strcasecmp(s,"LOG_AUTH")==0) return(LOG_AUTH); #endif #ifdef LOG_SYSLOG if(strcasecmp(s,"LOG_SYSLOG")==0) return(LOG_SYSLOG); #endif #ifdef LOG_LPR if(strcasecmp(s,"LOG_LPR")==0) return(LOG_LPR); #endif #ifdef LOG_NEWS if(strcasecmp(s,"LOG_NEWS")==0) return(LOG_NEWS); #endif #ifdef LOG_UUCP if(strcasecmp(s,"LOG_UUCP")==0) return(LOG_UUCP); #endif #ifdef LOG_CRON if(strcasecmp(s,"LOG_CRON")==0) return(LOG_CRON); #endif #ifdef LOG_LOCAL0 if(strcasecmp(s,"LOG_LOCAL0")==0) return(LOG_LOCAL0); #endif #ifdef LOG_LOCAL1 if(strcasecmp(s,"LOG_LOCAL1")==0) return(LOG_LOCAL1); #endif #ifdef LOG_LOCAL2 if(strcasecmp(s,"LOG_LOCAL2")==0) return(LOG_LOCAL2); #endif #ifdef LOG_LOCAL3 if(strcasecmp(s,"LOG_LOCAL3")==0) return(LOG_LOCAL3); #endif #ifdef LOG_LOCAL4 if(strcasecmp(s,"LOG_LOCAL4")==0) return(LOG_LOCAL4); #endif #ifdef LOG_LOCAL5 if(strcasecmp(s,"LOG_LOCAL5")==0) return(LOG_LOCAL5); #endif #ifdef LOG_LOCAL6 if(strcasecmp(s,"LOG_LOCAL6")==0) return(LOG_LOCAL6); #endif #ifdef LOG_LOCAL7 if(strcasecmp(s,"LOG_LOCAL7")==0) return(LOG_LOCAL7); #endif log_msg(LOG_LEVEL_WARNING, "Syslog facility \"%s\" is unknown, using default",s); return(AIDE_SYSLOG_FACILITY); } #endif aide-0.19/src/getopt.c0000644000175000017500000007252714613411450010277 /* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #include "aide.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg = NULL; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (opterr) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ aide-0.19/src/conf_lex.l0000644000175000017500000004330014774237261010604 C [^\r\n\t ] L [a-zA-Z0-9_%] G [a-zA-Z0-9] V [a-zA-Z_]+[a-zA-Z0-9_]* E [\ ]*"="[\ ]* %{ #define YYDEBUG 1 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2004-2006, 2010-2013, 2015-2016, 2019-2025 * Rami Lehti, Pablo Virolainen, Richard van den Berg, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "util.h" #include "conf_yacc.h" #include "errorcodes.h" #include "commandconf.h" #include "log.h" #include "progress.h" #include "conf_ast.h" #define LOG_LEX_TOKEN(log_level, token, text) \ log_msg(log_level, "%s:%d: \u2502 " #token " (text: '%s')", conf_filename, conf_linenumber, text); #define LOG_CONFIG_LINE(log_level, msg) \ log_msg(log_level, "%s:%d: %s (line: '%s')", conf_filename, conf_linenumber, msg, conf_linebuf); #define DEPRECATION_NOTICE(deprecated_option, new_option) \ log_msg(LOG_LEVEL_NOTICE, "%s:%d: Using '%s' is DEPRECATED and will be removed in the release after next. Update your config and use '%s' instead (line: '%s')", conf_filename, conf_linenumber, deprecated_option, new_option ,conf_linebuf); #define DEPRECATION_WARNING(deprecated_option, new_option) \ log_msg(LOG_LEVEL_WARNING, "%s:%d: Using '%s' is DEPRECATED and will be removed in the next release.. Update your config and use '%s' instead (line: '%s')", conf_filename, conf_linenumber, deprecated_option, new_option ,conf_linebuf); int conf_linenumber = 0; char *conf_filename; char *conf_linebuf; LOG_LEVEL lex_log_level = LOG_LEVEL_DEBUG; #define YY_INPUT(buf,result,max_size) \ if( ((result=conf_input_wrapper(buf,max_size,confin)) == 0) \ && ferror(yyin) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); %} %option noinput nounput %x CONFIG DEFSTMT ENVVAR EXPR EXPREQUHUNT PATH STRING STRINGS STRINGEQHUNT STRINGHUNT CONDITION CONDSTRING %% <> { log_msg(lex_log_level,"%s: - ", conf_filename); return (0); } ^[\t\ ]*"#"[^\r\n]*\r?\n { conf_linebuf = checked_strndup(conftext, confleng-1); ++conf_linenumber; LOG_CONFIG_LINE(lex_log_level, "- skip comment line") free(conf_linebuf); } ^[\t\ ]*\r?\n { conf_linebuf = ""; ++conf_linenumber; LOG_CONFIG_LINE(lex_log_level, "- skip empty line") } ^[^\n\r]* { conf_linebuf = checked_strndup(conftext, confleng); ++conf_linenumber; log_msg(lex_log_level,"%s:%d: \u252c '%s'", conf_filename, conf_linenumber, conf_linebuf); yyless(0); BEGIN(CONFIG); } "#"[^\r\n]* { /* inline comment */ LOG_LEX_TOKEN(lex_log_level, skip inline comment, conftext) } "=/" { LOG_LEX_TOKEN(lex_log_level, TEQURXRULE, "=") yyless(strchr(conftext,'/')-conftext); BEGIN(PATH); return (TEQURXRULE); } "/" { LOG_LEX_TOKEN(lex_log_level, TSELRXRULE, "") yyless(strchr(conftext,'/')-conftext); BEGIN(PATH); return (TSELRXRULE); } "!/" { LOG_LEX_TOKEN(lex_log_level, TRECNEGRXRULE, "!") yyless(strchr(conftext,'/')-conftext); BEGIN(PATH); return (TRECNEGRXRULE); } "-/" { LOG_LEX_TOKEN(lex_log_level, TNONRECNEGRXRULE, "-") yyless(strchr(conftext,'/')-conftext); BEGIN(PATH); return (TNONRECNEGRXRULE); } {E} { LOG_LEX_TOKEN(lex_log_level, '=', conftext) BEGIN(EXPR); return('='); } 0 { /* no restriction */ LOG_LEX_TOKEN(lex_log_level, '0', conftext) return ('0'); } ({L}|">")+ { LOG_LEX_TOKEN(lex_log_level, TEXPR, conftext) conflval.s=checked_strdup(conftext); return (TEXPR); } \+ { /* attribute operator */ LOG_LEX_TOKEN(lex_log_level, '+', conftext) return ('+'); } \- { /* attribute operator */ LOG_LEX_TOKEN(lex_log_level, '-', conftext) return ('-'); } , { /* restriction separator */ LOG_LEX_TOKEN(lex_log_level, ',', conftext) return (','); } = { /* restriction file system type separator */ LOG_LEX_TOKEN(lex_log_level, '=', conftext) return ('='); } ({L})+ { LOG_LEX_TOKEN(lex_log_level, TVARIABLE, conftext) conflval.s=checked_strdup(conftext); BEGIN(STRINGHUNT); return (TVARIABLE); } "\@\@define" { LOG_LEX_TOKEN(lex_log_level, TDEFINE, conftext) BEGIN DEFSTMT; return (TDEFINE); } "\@\@undef" { LOG_LEX_TOKEN(lex_log_level, TUNDEFINE, conftext) BEGIN DEFSTMT; return (TUNDEFINE); } "\@\@if" { LOG_LEX_TOKEN(lex_log_level, TIF, conftext) BEGIN(CONDITION); return (TIF); } "not" { LOG_LEX_TOKEN(lex_log_level, TBOOLNOT, conftext) return (TBOOLNOT); } "defined" { LOG_LEX_TOKEN(lex_log_level, TBOOLFUNC (BOOL_OP_DEFINED), conftext) conflval.operator = BOOL_OP_DEFINED; BEGIN(STRINGHUNT); return (TBOOLFUNC); } "hostname" { LOG_LEX_TOKEN(lex_log_level, TBOOLFUNC (BOOL_OP_HOSTNAME), conftext) conflval.operator = BOOL_OP_HOSTNAME; BEGIN(STRINGHUNT); return (TBOOLFUNC); } "exists" { LOG_LEX_TOKEN(lex_log_level, TBOOLFUNC (BOOL_OP_EXISTS), conftext) conflval.operator = BOOL_OP_EXISTS; BEGIN(STRINGHUNT); return (TBOOLFUNC); } "version_ge" { LOG_LEX_TOKEN(lex_log_level, TBOOLOP (BOOL_OP_VERSION_GE), conftext) conflval.operator = BOOL_OP_VERSION_GE; BEGIN(STRINGHUNT); return (TBOOLOP); } [^\ \t\r\n] { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, found string -> unput, conftext) yyless(0); BEGIN(CONDSTRING); } "\@\@ifdef" { DEPRECATION_WARNING("@@ifdef", "@@if defined") LOG_LEX_TOKEN(lex_log_level, TIFDEF, conftext) BEGIN(STRINGHUNT); return (TIFDEF); } "\@\@ifndef" { DEPRECATION_WARNING("@@ifndef", "@@if not defined") LOG_LEX_TOKEN(lex_log_level, TIFNDEF, conftext) BEGIN(STRINGHUNT); return (TIFNDEF); } "\@\@else" { LOG_LEX_TOKEN(lex_log_level, TELSE, conftext) BEGIN CONFIG; return (TELSE); } "\@\@endif" { LOG_LEX_TOKEN(lex_log_level, TENDIF, conftext) BEGIN CONFIG; return (TENDIF); } "\@\@ifhost" { DEPRECATION_WARNING("@@ifhost", "@@if hostname") LOG_LEX_TOKEN(lex_log_level, TIFHOST, conftext) BEGIN(STRINGHUNT); return (TIFHOST); } "\@\@ifnhost" { DEPRECATION_WARNING("@@ifnhost", "@@if not hostname") LOG_LEX_TOKEN(lex_log_level, TIFNHOST, conftext) BEGIN(STRINGHUNT); return (TIFNHOST); } "\@\@include" { LOG_LEX_TOKEN(lex_log_level, TINCLUDE, conftext) BEGIN(STRINGS); return (TINCLUDE); } "\@\@x_include" { LOG_LEX_TOKEN(lex_log_level, TXINCLUDE, conftext) BEGIN(STRINGS); return (TXINCLUDE); } "\@\@x_include_setenv" { LOG_LEX_TOKEN(lex_log_level, TSETENV, conftext) BEGIN ENVVAR; return (TSETENV); } ({V})+ { LOG_LEX_TOKEN(lex_log_level, TVARIABLE, conftext) conflval.s=checked_strdup(conftext); BEGIN(STRINGHUNT); return (TVARIABLE); } [\t\ ]+ { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) } "database_in" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_IN_OPTION), conftext) conflval.option = DATABASE_IN_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "database_out" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_OUT_OPTION), conftext) conflval.option = DATABASE_OUT_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "database_new" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_NEW_OPTION), conftext) conflval.option = DATABASE_NEW_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "database_attrs" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_ATTRIBUTES_OPTION), conftext) conflval.option = DATABASE_ATTRIBUTES_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } "warn_dead_symlinks" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (WARN_DEAD_SYMLINKS_OPTION), conftext) conflval.option = WARN_DEAD_SYMLINKS_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_grouped" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_GROUPED_OPTION), conftext) conflval.option = REPORT_GROUPED_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_summarize_changes" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_SUMMARIZE_CHANGES_OPTION), conftext) conflval.option = REPORT_SUMMARIZE_CHANGES_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "acl_no_symlink_follow" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (ACL_NO_SYMLINK_FOLLOW_OPTION), conftext) conflval.option = ACL_NO_SYMLINK_FOLLOW_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_format" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_FORMAT_OPTION), conftext) conflval.option = REPORT_FORMAT_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_level" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_LEVEL_OPTION), conftext) conflval.option = REPORT_LEVEL_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_ignore_added_attrs" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_ADDED_ATTRS_OPTION), conftext) conflval.option = REPORT_IGNORE_ADDED_ATTRS_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } "report_ignore_removed_attrs" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_REMOVED_ATTRS_OPTION), conftext) conflval.option = REPORT_IGNORE_REMOVED_ATTRS_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } "report_ignore_changed_attrs" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_CHANGED_ATTRS_OPTION), conftext) conflval.option = REPORT_IGNORE_CHANGED_ATTRS_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } "report_force_attrs" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_FORCE_ATTRS_OPTION), conftext) conflval.option = REPORT_FORCE_ATTRS_OPTION; BEGIN (EXPREQUHUNT); return (CONFIGOPTION); } "log_level" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (LOG_LEVEL_OPTION), conftext) conflval.option = LOG_LEVEL_OPTION; BEGIN(STRINGEQHUNT); return (CONFIGOPTION); } "database_add_metadata" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_ADD_METADATA_OPTION), conftext) conflval.option = DATABASE_ADD_METADATA_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_url" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_URL_OPTION), conftext) conflval.option = REPORT_URL_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_detailed_init" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_DETAILED_INIT_OPTION), conftext) conflval.option = REPORT_DETAILED_INIT_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_base16" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_BASE16_OPTION), conftext) conflval.option = REPORT_BASE16_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_quiet" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_QUIET_OPTION), conftext) conflval.option = REPORT_QUIET_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_append" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_APPEND_OPTION), conftext) conflval.option = REPORT_APPEND_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "report_ignore_e2fsattrs" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_E2FSATTRS_OPTION), conftext) conflval.option = REPORT_IGNORE_E2FSATTRS_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "gzip_dbout" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_GZIP_OPTION), conftext) conflval.option = DATABASE_GZIP_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "root_prefix" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (ROOT_PREFIX_OPTION), conftext) conflval.option = ROOT_PREFIX_OPTION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "config_version" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (CONFIG_VERSION), conftext) conflval.option = CONFIG_VERSION; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "config_check_warn_unrestricted_rules" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (CONFIG_CHECK_WARN_UNRESTRICTED_RULES), conftext) conflval.option = CONFIG_CHECK_WARN_UNRESTRICTED_RULES; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } "num_workers" { LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (NUM_WORKERS), conftext) conflval.option = NUM_WORKERS; BEGIN (STRINGEQHUNT); return (CONFIGOPTION); } [a-z]+(_[a-z]+)+ { log_msg(LOG_LEVEL_ERROR,"%s:%d: unknown config option: '%s' (line: '%s')", conf_filename, conf_linenumber, conftext, conf_linebuf); exit(INVALID_CONFIGURELINE_ERROR); } ({G})+ { /* group definition */ conflval.s=checked_strdup(conftext); LOG_LEX_TOKEN(lex_log_level, TGROUP, conftext) BEGIN(EXPREQUHUNT); return (TGROUP); } ({L})+ { /* group definition, deprecated group names */ log_msg(LOG_LEVEL_WARNING, "%s:%d: special characters in group names are DEPRECATED. Update your config and only use alphanumeric characters (A-Za-z0-9) (line: '%s')", conf_filename, conf_linenumber, conf_linebuf); \ conflval.s=checked_strdup(conftext); LOG_LEX_TOKEN(lex_log_level, TGROUP, conftext) BEGIN(EXPREQUHUNT); return (TGROUP); } {E} { LOG_LEX_TOKEN(lex_log_level, '=', conftext) BEGIN(STRING); return('='); } "@@{"({L}+)"}" { size_t length = strlen(conftext)-4; conflval.s=checked_malloc(length+1); strncpy(conflval.s, conftext+3, length); conflval.s[length] = '\0'; LOG_LEX_TOKEN(lex_log_level, TVARIABLE, conflval.s) return (TVARIABLE); } [^@\\ \t\r\n]+ { LOG_LEX_TOKEN(lex_log_level, TSTRING, conftext) conflval.s=checked_strdup(conftext); return (TSTRING); } \\[\\@ ] { LOG_LEX_TOKEN(lex_log_level, (escaped) TSTRING, conftext) conflval.s=checked_strdup(conftext+1); return (TSTRING); } [\\@] { LOG_LEX_TOKEN(lex_log_level, (single-character) TSTRING, conftext) conflval.s=checked_strdup(conftext); return (TSTRING); } [\ \t]+ { LOG_LEX_TOKEN(lex_log_level, TSPACE, conftext) return (TSPACE); } [\ \t]+ { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) BEGIN(CONFIG); } [\ \t]+ { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) BEGIN(CONDITION); } [\ \t]+ { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) BEGIN(EXPR); } [\ \t]+ { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext) BEGIN(STRING); } [^\ \t\r\n] { LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, found string -> unput, conftext) yyless(0); BEGIN(STRING); } \r?\n { log_msg(lex_log_level,"%s:%d: \u2534 TNEWLINE (text: '%s')", conf_filename, conf_linenumber, strlen(conftext) == 2?"\\r\\n":"\\n"); BEGIN 0; return (TNEWLINE); } <*><> { log_msg(lex_log_level,"%s:%d: \u2534 ", conf_filename, conf_linenumber); log_msg(LOG_LEVEL_NOTICE,"%s:%d: missing new line at end of file (line: '%s')", conf_filename, conf_linenumber, conf_linebuf); return (0); } <*>. { char *unexpected_character = conftext; switch (*conftext) { case '\r': unexpected_character = "\\r"; break; }; log_msg(LOG_LEVEL_ERROR,"%s:%d: unexpected character: '%s' (line: '%s')", conf_filename, conf_linenumber, unexpected_character, conf_linebuf); exit(INVALID_CONFIGURELINE_ERROR); } %% int confwrap(void){ return 1; } void conf_lex_string(const char * name, const char *string) { log_msg(LOG_LEVEL_DEBUG, "parse: '%s'", name); conf_linenumber = 0; conf_filename = checked_strdup(name); /* not to be freed, needed for logging */ progress_status(PROGRESS_CONFIG, conf_filename); conf_scan_string(string); } void conf_lex_file(const char * config) { log_msg(LOG_LEVEL_DEBUG, "parse: '%s'", config); conf_linenumber = 0; if (strcmp(config,"-") == 0) { conf_filename = checked_strdup("(stdin)"); /* not to be freed, needed for logging */ confin = stdin; } else { conf_filename = checked_strdup(config); /* not to be freed, needed for logging */ progress_status(PROGRESS_CONFIG, conf_filename); char *expanded_config = expand_tilde(checked_strdup(config)); confin = fopen( expanded_config, "r" ); if (!confin) { log_msg(LOG_LEVEL_ERROR,"cannot open config file '%s': %s", config, strerror(errno)); exit(IO_ERROR); } free(expanded_config); expanded_config=NULL; } conf_switch_to_buffer(conf_create_buffer( confin, YY_BUF_SIZE )); BEGIN 0; } void conf_lex_delete_buffer(void) { conf_delete_buffer( YY_CURRENT_BUFFER ); if (confin && confin != stdin) { if (fclose(confin)) { log_msg(LOG_LEVEL_WARNING, "fclose() failed for '%s': %s", conf_filename, strerror(errno)); } else { confin = NULL; } } } aide-0.19/src/be.c0000644000175000017500000001311314774237261007363 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2003, 2005-2006, 2010-2011, 2013, 2019-2023 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" #include #include #include #include #ifdef HAVE_FCNTL #include #endif #include #include #ifdef WITH_ZLIB #include #endif #include "log.h" #include "util.h" #include "errorcodes.h" #ifdef WITH_CURL #include "fopen.h" #endif #include "be.h" #include "url.h" /*for locale support*/ #include "locale-aide.h" /*for locale support*/ void* be_init(url_t* u, bool readonly, bool iszipped, bool append, int linenumber, char* filename, char* linebuf, bool *created) { FILE* fh=NULL; long a=0; char* err=NULL; int fd; #if HAVE_FCNTL && HAVE_FTRUNCATE struct flock fl; #endif switch (u->type) { case url_file : { u->value = expand_tilde(u->value); log_msg(LOG_LEVEL_DEBUG, "open (%s, gzip: %s, append: %s) file '%s'", readonly?"read-only":"read/write", btoa(iszipped), btoa(append), u->value); bool new_file = false; if (readonly) { fd = open(u->value, O_RDONLY, 0); } else { int flag_truncate; #if HAVE_FCNTL && HAVE_FTRUNCATE flag_truncate = 0; #else flag_truncate = O_TRUNC; #endif fd = open(u->value, O_CREAT|O_EXCL|O_RDWR, 0666); new_file = fd >= 0; if (fd == -1 && errno == EEXIST) { fd = open(u->value, O_RDWR|(append?O_APPEND:flag_truncate), 0666); } } if(fd==-1) { LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "open (%s) failed for file '%s': %s", readonly?"read-only":"read/write", u->value, strerror(errno)); return NULL; } else { if (created) { *created = new_file; } log_msg(LOG_LEVEL_DEBUG, "%s file '%s' with fd=%i",new_file?"created":"opened existing", u->value,fd); } #if HAVE_FCNTL && HAVE_FTRUNCATE if(!readonly) { if (strcmp(u->value, "/dev/null")) { fl.l_type = F_WRLCK; fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; log_msg(LOG_LEVEL_DEBUG, "try to get lock for file '%s'", u->value); if (fcntl(fd, F_SETLK, &fl) == -1) { log_msg(LOG_LEVEL_ERROR, "cannot get lock for file '%s': %s", u->value, strerror(errno)); exit(LOCK_ERROR); } else { log_msg(LOG_LEVEL_DEBUG, "successfully got lock for file '%s'", u->value); } if (!append) { if(ftruncate(fd,0)==-1) { log_msg(LOG_LEVEL_ERROR,_("ftruncate failed for file %s: %s"),u->value, strerror(errno)); return NULL; } else { log_msg(LOG_LEVEL_DEBUG, "successfully truncated file '%s' to size 0", u->value); } } } else { log_msg(LOG_LEVEL_DEBUG, "skip lock for '/dev/null'"); } } #endif #ifdef WITH_ZLIB if(iszipped && !readonly){ gzFile gzfh = gzdopen(fd,"wb9"); if(gzfh==NULL){ log_msg(LOG_LEVEL_ERROR, _("gzdopen (%s) failed for file %s"), readonly?"read-only":"read/write", u->value); } return gzfh; } else{ #endif fh=fdopen(fd,readonly?"r":"w+"); if(fh==NULL){ log_msg(LOG_LEVEL_ERROR, _("fdopen (%s) failed for file '%s': %s"), readonly?"read-only":"read/write", u->value, strerror(errno)); } return fh; #ifdef WITH_ZLIB } #endif } case url_stdout : { #ifdef WITH_ZLIB if(iszipped){ return gzdopen(fileno(stdout),"wb"); } else{ #endif return stdout; #ifdef WITH_ZLIB } #endif } case url_stdin : { #ifdef WITH_ZLIB if(iszipped){ return gzdopen(fileno(stdin),"r"); } else{ #endif return stdin; #ifdef WITH_ZLIB } #endif } case url_stderr : { #ifdef WITH_ZLIB if(iszipped){ return gzdopen(fileno(stderr),"wb"); } else{ #endif return stderr; #ifdef WITH_ZLIB } #endif } case url_fd : { a=strtol(u->value,&err,10); if(*err!='\0'||errno==ERANGE){ log_msg(LOG_LEVEL_ERROR,"illegal file descriptor value:%s",u->value); } #ifdef WITH_ZLIB if(iszipped && !readonly){ gzFile gzfh = gzdopen(a,"w"); if(gzfh==NULL){ log_msg(LOG_LEVEL_ERROR,"couldn't reopen file descriptor %li",a); } return gzfh; } else{ #endif fh=fdopen(a,readonly?"r":"w"); if(fh==NULL){ log_msg(LOG_LEVEL_ERROR,"couldn't reopen file descriptor %li",a); } return fh; #ifdef WITH_ZLIB } #endif } #ifdef WITH_CURL case url_http: case url_https: case url_ftp: { log_msg(LOG_LEVEL_DEBUG,_("opening curl '%s' for %s"),u->value,readonly?"r":"w+"); if (iszipped) { return NULL; } return url_fopen(u->value,readonly?"r":"w+"); } #endif /* WITH CURL */ default:{ log_msg(LOG_LEVEL_ERROR, "unsupported backend: %i", u->type); return NULL; } } /* Not reached */ return NULL; } aide-0.19/src/conf_ast.c0000644000175000017500000003607314774237261010603 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2019-2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include "conf_ast.h" #include "conf_lex.h" #include "log.h" #include "rx_rule.h" #include "util.h" LOG_LEVEL ast_log_level = LOG_LEVEL_TRACE; config_option_t config_options[] = { { ACL_NO_SYMLINK_FOLLOW_OPTION, "acl_no_symlink_follow", NULL }, { DATABASE_ADD_METADATA_OPTION, NULL, NULL }, { DATABASE_ATTRIBUTES_OPTION, NULL, NULL }, { DATABASE_GZIP_OPTION, NULL, NULL }, { DATABASE_IN_OPTION, NULL, NULL }, { DATABASE_OUT_OPTION, NULL, NULL }, { DATABASE_NEW_OPTION, NULL, NULL }, { LOG_LEVEL_OPTION, NULL, NULL }, { REPORT_BASE16_OPTION, NULL, NULL }, { REPORT_DETAILED_INIT_OPTION, NULL, NULL }, { REPORT_FORCE_ATTRS_OPTION, "report_force_attrs", "Forced attributes" }, { REPORT_GROUPED_OPTION, NULL, NULL }, { REPORT_IGNORE_ADDED_ATTRS_OPTION, "report_ignore_added_attrs", "Ignored added attributes" }, { REPORT_IGNORE_REMOVED_ATTRS_OPTION, "report_ignore_removed_attrs", "Ignored removed attributes" }, { REPORT_IGNORE_CHANGED_ATTRS_OPTION, "report_ignore_changed_attrs", "Ignored changed attributes" }, { REPORT_IGNORE_E2FSATTRS_OPTION, "report_ignore_e2fsattrs", "Ignored e2fs attributes" }, { REPORT_LEVEL_OPTION, "report_level", "Report level" }, { REPORT_QUIET_OPTION, NULL, NULL }, { REPORT_APPEND_OPTION, NULL, NULL }, { REPORT_SUMMARIZE_CHANGES_OPTION, NULL, NULL }, { REPORT_URL_OPTION, NULL, NULL }, { ROOT_PREFIX_OPTION, "root_prefix", "Root prefix" }, { WARN_DEAD_SYMLINKS_OPTION, NULL, NULL }, { CONFIG_VERSION, "config_version", "Config version used" }, { CONFIG_CHECK_WARN_UNRESTRICTED_RULES, NULL, NULL }, { REPORT_FORMAT_OPTION, NULL, NULL }, { LIMIT_CMDLINE_OPTION, "limit", "Limit" }, { NUM_WORKERS, NULL, NULL }, }; static ast* new_ast_node(void) { ast* a = checked_malloc(sizeof(ast)); a->linenumber = conf_linenumber; a->filename = conf_filename; a->linebuf = conf_linebuf; a->next = NULL; return a; } ast* new_string_option_statement(config_option option, string_expression* value) { ast* a = new_ast_node(); a->type = config_option_type; a->statement._config.option = option; a->statement._config.a = NULL; a->statement._config.e = value; log_msg(ast_log_level, "ast: new string option statement (%p): option: %d, value: %p", (void*) a, option, (void*) value); return a; } ast* new_attribute_option_statement(config_option option, attribute_expression* value) { ast* a = new_ast_node(); a->type = config_option_type; a->statement._config.option = option; a->statement._config.a = value; a->statement._config.e = NULL; log_msg(ast_log_level, "ast: new attribute option statement (%p): option: %d, value: %p", (void*) a, option, (void*) value); return a; } ast* new_include_statement(string_expression* path, string_expression* rx, bool execute, string_expression* prefix) { ast* a = new_ast_node(); a->type = include_statement_type; a->statement._include.path = path; a->statement._include.rx = rx; a->statement._include.execute = execute; a->statement._include.prefix = prefix; log_msg(ast_log_level, "ast: new include statement (%p): path: %p, rx: %p, execute: %s, prefix: %p", (void*) a, (void*) path, (void*) rx, btoa(execute), (void*) prefix); return a; } ast* new_x_include_setenv_statement(char *variable, string_expression *value) { ast* a = new_ast_node(); a->type = x_include_setenv_statement_type; a->statement._x_include_setenv.variable = variable; a->statement._x_include_setenv.value = value; log_msg(ast_log_level, "ast: new x_include_setenv statement (%p): variable: '%s', value: %p", (void*) a, variable, (void*) value); return a; } ast* new_define_statement(char *name, string_expression *value) { ast* a = new_ast_node(); a->type = define_statement_type; a->statement._define.name = name; a->statement._define.value = value; log_msg(ast_log_level, "ast: new define statement (%p): name: '%s', value: %p", (void*) a, name, (void*) value); return a; } ast* new_undefine_statement(char *name) { ast* a = new_ast_node(); a->type = undefine_statement_type; a->statement._undefine.name = name; log_msg(ast_log_level, "ast: new undefine statement (%p): name: '%s'", (void*) a, name); return a; } ast* new_group_statement(char* name, attribute_expression* expr) { ast* a = new_ast_node(); a->type = group_statement_type; a->statement._group.name = name; a->statement._group.expr = expr; log_msg(ast_log_level, "ast: new group statement (%p): name: '%s', expr: %p", (void*) a, name, (void*) expr); return a; } bool_expression* new_string_bool_expression(bool_operator op, string_expression* left, string_expression* right) { bool_expression* e = checked_malloc(sizeof(bool_expression)); e->op = op; e->left._str = left; e->right._str = right; log_msg(ast_log_level, "ast: new string bool expression (%p): op: %d, left: %p, right: %p", (void*) e, op, (void*) left, (void*) right); return e; } bool_expression* new_bool_expression(bool_operator op, bool_expression* left, bool_expression* right) { bool_expression* e = checked_malloc(sizeof(bool_expression)); e->op = op; e->left._bool = left; e->right._bool = right; log_msg(ast_log_level, "ast: new bool expression (%p): op: %d, left: %p, right: %p", (void*) e, op, (void*) left, (void*) right); return e; } if_condition* new_if_condition(bool_expression* expression) { if_condition* c = checked_malloc(sizeof(if_condition)); c->linenumber = conf_linenumber; c->filename = conf_filename; c->linebuf = conf_linebuf; c->expression = expression; log_msg(ast_log_level, "ast: if condition (%p): expression: %p", (void*) c, (void*) expression); return c; } attribute_expression* new_attribute_expression(attribute_operator op, attribute_expression* left, char* right) { attribute_expression* e = checked_malloc(sizeof(attribute_expression)); e->op = op; e->left = left; e->right = right; log_msg(ast_log_level, "ast: new attribute expression (%p): op: %d, left: %p, right: '%s'", (void*) e, op, (void*) left, right); return e; } ft_restriction_expression* new_ft_restriction_expression(ft_restriction_expression* left, char* right) { ft_restriction_expression* e = checked_malloc(sizeof(ft_restriction_expression)); e->right = right; e->left = left; log_msg(ast_log_level, "ast: new file type restriction expression (%p): left: %p, right: '%s'", (void*) e, (void*) left, right); return e; } restriction_expression* new_restriction_expression(ft_restriction_expression* f_types, char* fs_type) { restriction_expression* e = checked_malloc(sizeof(restriction_expression)); e->f_types = f_types; e->fs_type = fs_type; log_msg(ast_log_level, "ast: new restriction expression (%p): f_types: '%p', fs_type: %s", (void*) e, (void*) f_types, (fs_type != NULL) ? fs_type : "(null)"); return e; } ast* new_if_statement(struct if_condition* condition, struct ast* if_branch, struct ast* else_branch) { ast* e = new_ast_node(); e->type = if_statement_type; e->statement._if.condition = condition; e->statement._if.if_branch = if_branch; e->statement._if.else_branch = else_branch; log_msg(ast_log_level, "ast: new if statement (%p): condition: %p, if_branch: %p, else_branch: %p", (void*) e, (void*) condition, (void*) if_branch, (void*) else_branch); return e; } ast* new_rule_statement(AIDE_RULE_TYPE rule_type, string_expression* path, restriction_expression* restriction, attribute_expression* attrs) { ast* e = new_ast_node(); e->type = rule_statement_type; e->statement._rule.type = rule_type; e->statement._rule.path = path; e->statement._rule.restriction = restriction; e->statement._rule.attributes = attrs; log_msg(ast_log_level, "ast: new rule statement (%p): type: %s, path: %p, restriction: %p, attributes: %p", (void*) e, get_rule_type_long_string(rule_type), (void*) path, (void*) restriction, (void*) attrs); return e; } string_expression* new_string(char *str) { string_expression* e = checked_malloc(sizeof(string_expression)); e->op = STR_OP_STR; e->str = str; e->left = NULL; e->right = NULL; log_msg(ast_log_level, "ast: new string (%p): str: '%s'", (void*) e, str); return e; } string_expression* new_variable(char *name) { string_expression* e = checked_malloc(sizeof(string_expression)); e->op = STR_OP_VARIABLE; e->str = name; e->left = NULL; e->right = NULL; log_msg(ast_log_level, "ast: new variable (%p): name: '%s'", (void*) e, name); return e; } string_expression* new_string_concat(string_expression* left, string_expression* right) { string_expression* e = checked_malloc(sizeof(string_expression)); e->op = STR_OP_CONCAT; e->str = NULL; e->left = left; e->right = right; log_msg(ast_log_level, "ast: new string concat (%p): left: %p, right: %p", (void*) e, (void*) left, (void*) right); return e; } void free_string(char * s) { if (s == NULL) { return; } log_msg(ast_log_level, "ast: free string %p", (void*) s); free(s); } void free_attribute_expression(attribute_expression *a) { if (a == NULL) { return; } free_attribute_expression(a->left); free_string(a->right); log_msg(ast_log_level, "ast: free attribute expression %p", (void*) a); free(a); } void free_string_expression(string_expression *s) { if (s == NULL) { return; } free_string_expression(s->left); free_string_expression(s->right); free_string(s->str); log_msg(ast_log_level, "ast: free string expression %p", (void*) s); free(s); } void free_bool_expression(bool_expression *b) { if (b == NULL) { return; } switch (b->op) { case BOOL_OP_NOT: free_bool_expression(b->left._bool); break; case BOOL_OP_EXISTS: case BOOL_OP_DEFINED: case BOOL_OP_HOSTNAME: free_string_expression(b->left._str); break; case BOOL_OP_VERSION_GE: free_string_expression(b->left._str); free_string_expression(b->right._str); break; } log_msg(ast_log_level, "ast: free bool expression %p", (void*) b); free(b); } void free_if_condition(if_condition *c) { free_bool_expression(c->expression); free_string(c->linebuf); log_msg(ast_log_level, "ast: free if condition %p", (void*) c); free(c); } void free_ft_restriction_expression(ft_restriction_expression *r) { if (r == NULL) { return; } free_ft_restriction_expression(r->left); free_string(r->right); log_msg(ast_log_level, "ast: free file type restriction expression %p", (void*) r); free(r); } void free_restriction_expression(restriction_expression *r) { if (r == NULL) { return; } #ifdef HAVE_FSTYPE free_string(r->fs_type); #endif free_ft_restriction_expression(r->f_types); log_msg(ast_log_level, "ast: free restriction expression %p", (void*) r); free(r); } void deep_free(ast* config_ast) { if (config_ast == NULL) { return; } ast* node = NULL; for(node = config_ast; node != NULL; ) { switch (node->type) { case config_option_type: free_attribute_expression(node->statement._config.a); free_string_expression(node->statement._config.e); break; case define_statement_type: free_string_expression(node->statement._define.value); free_string(node->statement._define.name); break; case group_statement_type: free_attribute_expression(node->statement._group.expr); free_string(node->statement._group.name); break; case if_statement_type: free_if_condition(node->statement._if.condition); deep_free(node->statement._if.if_branch); deep_free(node->statement._if.else_branch); break; case include_statement_type: free_string_expression(node->statement._include.path); free_string_expression(node->statement._include.rx); free_string_expression(node->statement._include.prefix); break; case x_include_setenv_statement_type: free_string_expression(node->statement._x_include_setenv.value); free_string(node->statement._x_include_setenv.variable); break; case rule_statement_type: free_string_expression(node->statement._rule.path); free_restriction_expression(node->statement._rule.restriction); free_attribute_expression(node->statement._rule.attributes); break; case undefine_statement_type: free_string(node->statement._define.name); break; } free(node->linebuf); ast* to_be_freed = node; node = node->next; log_msg(ast_log_level, "ast: free ast node %p (next: %p)", (void*) to_be_freed, (void*) node); free(to_be_freed); } } aide-0.19/src/symboltable.c0000644000175000017500000000254714613411450011305 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2005-2006,2022 Rami Lehti, Pablo Virolainen, * Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include "list.h" #include "symboltable.h" list* list_find(char* s,list* item){ list* l; list* p; if (item==NULL) { return NULL; } p=item; while(p!=NULL){ if (strcmp(s,((symba*)p->data)->name)==0) return p; p=p->next; } l=item->prev; while(l!=NULL){ /* Insert bug to here return l-> return p */ if (strcmp(s,((symba*)l->data)->name)==0) return l; l=l->prev; } return NULL; } aide-0.19/src/db_list.c0000644000175000017500000000263614613411450010407 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002,2022 Rami Lehti, Pablo Virolainen, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "db_list.h" void db_list_append(db_list*item) { db_list* tmp_listp=NULL; item->next=NULL; item->prev=NULL; item->head=NULL; if(db_list_head==NULL){ db_list_head=item; db_list_head->next=NULL; db_list_head->prev=NULL; db_list_head->head=db_list_head; db_list_head->tail=db_list_head; return; } else { tmp_listp=db_list_head->tail; tmp_listp->next=item; tmp_listp->tail=item; item->head=db_list_head; item->tail=db_list_head; db_list_head->tail=item; return; } } aide-0.19/src/seltree.c0000644000175000017500000005637514774237261010461 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2006, 2009-2011, 2015-2016, 2019-2025 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "file.h" #include #include #include #include #define PCRE2_CODE_UNIT_WIDTH 8 #include #include "attributes.h" #include "list.h" #include "log.h" #include #include "rx_rule.h" #include "seltree.h" #include "seltree_struct.h" #include "util.h" #include "errorcodes.h" #include "db.h" void log_tree(LOG_LEVEL log_level, seltree* node, int depth) { list* r; rx_rule* rxc; pthread_rwlock_rdlock(&node->rwlock); log_msg(log_level, "%-*s %s:", depth, depth?"\u251d":"\u250c", node->path); char *attr_str, *rs_str; for(r=node->equ_rx_lst;r!=NULL;r=r->next) { rxc=r->data; log_msg(log_level, "%-*s '=%s %s %s' (%s:%d: '%s%s%s')", depth+2, "\u2502", rxc->rx, rs_str = get_restriction_string(rxc->restriction), attr_str = diff_attributes(0, rxc->attr), rxc->config_filename, rxc->config_linenumber, rxc->config_line, rxc->prefix?"', prefix: '":"", rxc->prefix?rxc->prefix:""); free(rs_str); free(attr_str); } for(r=node->sel_rx_lst;r!=NULL;r=r->next) { rxc=r->data; log_msg(log_level, "%-*s '%s %s %s' (%s:%d: '%s%s%s')", depth+2, "\u2502", rxc->rx, rs_str = get_restriction_string(rxc->restriction), attr_str = diff_attributes(0, rxc->attr), rxc->config_filename, rxc->config_linenumber, rxc->config_line, rxc->prefix?"', prefix: '":"", rxc->prefix?rxc->prefix:""); free(rs_str); free(attr_str); } for(r=node->neg_rx_lst;r!=NULL;r=r->next) { rxc=r->data; log_msg(log_level, "%-*s '%s%s %s' (%s:%d: '%s%s%s')", depth+2, "\u2502", get_rule_type_char(rxc->type), rxc->rx, rs_str = get_restriction_string(rxc->restriction), rxc->config_filename, rxc->config_linenumber, rxc->config_line, rxc->prefix?"', prefix: '":"", rxc->prefix?rxc->prefix:""); free(rs_str); } for(tree_node *n = tree_walk_first(node->children); n != NULL ; n = tree_walk_next(n)) { log_tree(log_level, tree_get_data(n), depth+2); } pthread_rwlock_unlock(&node->rwlock); if (depth == 0) { log_msg(log_level, "%s", "\u2514"); } } /* * strrxtok() * return a pointer to a copy of the non-regexp path part of the argument */ static char* strrxtok(char* rx) { char*p=NULL; size_t i=0; /* The following code assumes that the first character is a slash */ size_t lastslash=1; p=checked_strdup(rx); p[0]='/'; for(i=1;ipath = checked_strdup(path); /* not to be freed */ node->parent = parent; pthread_rwlock_init(&node->rwlock, NULL); node->sel_rx_lst = NULL; node->neg_rx_lst = NULL; node->equ_rx_lst = NULL; node->children = NULL; node->checked = 0; node->new_data = NULL; node->old_data = NULL; node->changed_attrs = 0; return node; } static seltree *_insert_new_node(char *path, seltree *parent) { seltree *node = create_seltree_node(path, parent); pthread_rwlock_wrlock(&parent->rwlock); parent ->children = tree_insert(parent->children, strrchr(node->path,'/'), (void*)node, (tree_cmp_f) strcmp); pthread_rwlock_unlock(&parent->rwlock); return node; } static seltree* _get_seltree_node(seltree* node, char *path, bool create) { LOG_LEVEL log_level = LOG_LEVEL_TRACE; pthread_rwlock_rdlock(&node->rwlock); log_msg(log_level, "_get_seltree_node(): %s> node: '%s' (%p), create: %s", path, node->path, (void*) node, btoa(create)); pthread_rwlock_unlock(&node->rwlock); seltree *parent = NULL; char *tmp = checked_strdup(path); if (node && strcmp(node->path, path) != 0) { char *next_dir = path;; do { parent = node; next_dir = strchr(&next_dir[1], '/'); if (next_dir) { tmp[next_dir-path] = '\0'; } pthread_rwlock_rdlock(&parent->rwlock); log_msg(log_level, "_get_seltree_node(): %s> search for child node '%s' (parent: '%s' (%p))", path, strrchr(tmp,'/'), parent->path, (void*) parent); node = tree_search(parent->children, strrchr(tmp,'/'), (tree_cmp_f) strcmp); pthread_rwlock_unlock(&parent->rwlock); if (next_dir) { tmp[next_dir-path] = '/'; } } while (node != NULL && next_dir); if (create && node == NULL) { while (next_dir) { tmp[next_dir-path] = '\0'; node = _insert_new_node(tmp, parent); log_msg(log_level, "_get_seltree_node(): %s> created new inner node '%s' (%p) (parent: %p)", path, tmp, (void*) node, (void*) parent); parent = node; tmp[next_dir-path] = '/'; next_dir = strchr(&next_dir[1], '/'); } node = _insert_new_node(path, parent); log_msg(LOG_LEVEL_TRACE, "created new leaf node '%s' (%p) (parent: %p)", path, (void*) node, (void*) parent); } } free(tmp); if (node == NULL) { log_msg(log_level, "_get_seltree_node(): %s> return NULL (node == NULL)", path); } else { pthread_rwlock_rdlock(&node->rwlock); log_msg(log_level, "_get_seltree_node(): %s> return node: '%s' (%p)", path, node->path, (void*) node); pthread_rwlock_unlock(&node->rwlock); } return node; } seltree* get_or_create_seltree_node(seltree* node, char *path) { return _get_seltree_node(node, path, true); } seltree* get_seltree_node(seltree* node, char *path) { return _get_seltree_node(node, path, false); } seltree *init_tree(void) { seltree *node = create_seltree_node("/", NULL); log_msg(LOG_LEVEL_DEBUG, "created root node '%s' (%p)", node->path, (void*) node); return node; } bool is_tree_empty(seltree *node) { pthread_rwlock_rdlock(&node->rwlock); bool is_empty = (node->children == NULL && node->equ_rx_lst == NULL && node->sel_rx_lst == NULL && node->neg_rx_lst == NULL ); pthread_rwlock_unlock(&node->rwlock); return is_empty; } rx_rule * add_rx_to_tree(char * rx, rx_restriction_t restriction, AIDE_RULE_TYPE rule_type, seltree *tree, int linenumber, char* filename, char* linebuf, char **node_path) { rx_rule* r = NULL; seltree *curnode = NULL; char *rxtok = NULL; r=(rx_rule*)checked_malloc(sizeof(rx_rule)); r->rx=rx; r->type = rule_type; r->restriction = restriction; r->config_linenumber = linenumber; r->config_filename = filename; r->config_line = checked_strdup(linebuf); r->prefix = NULL; r->attr = 0; int pcre2_errorcode; PCRE2_SIZE pcre2_erroffset; if((r->crx=pcre2_compile((PCRE2_SPTR) r->rx, PCRE2_ZERO_TERMINATED, PCRE2_UTF|PCRE2_ANCHORED, &pcre2_errorcode, &pcre2_erroffset, NULL)) == NULL) { PCRE2_UCHAR pcre2_error[128]; pcre2_get_error_message(pcre2_errorcode, pcre2_error, 128); log_msg(LOG_LEVEL_ERROR, "%s:%d:%zu: error in rule '%s': %s (line: '%s')", filename, linenumber, pcre2_erroffset, rx, pcre2_error, linebuf); free(r); return NULL; } else { r->md = pcre2_match_data_create_from_pattern(r->crx, NULL); if (r->md == NULL) { log_msg(LOG_LEVEL_ERROR, "pcre2_match_data_create_from_pattern: failed to allocate memory"); exit(MEMORY_ALLOCATION_FAILURE); } int pcre2_jit = pcre2_jit_compile(r->crx, PCRE2_JIT_PARTIAL_SOFT); if (pcre2_jit < 0) { PCRE2_UCHAR pcre2_error[128]; pcre2_get_error_message(pcre2_jit, pcre2_error, 128); log_msg(LOG_LEVEL_DEBUG, "JIT compilation for regex '%s' failed: %s (fall back to interpreted matching)", r->rx, pcre2_error); } else { log_msg(LOG_LEVEL_DEBUG, "JIT compilation for regex '%s' successful", r->rx); } rxtok=strrxtok(r->rx); for(size_t i=1;i < strlen(rxtok); ++i){ if (rxtok[i] == '/' && rxtok[i-1] == '/') { log_msg(LOG_LEVEL_ERROR, "%s:%d:1: error in rule '%s': invalid double slash (line: '%s')", filename, linenumber, rx, linebuf); free(r); return NULL; } } curnode = get_or_create_seltree_node(tree, rxtok); pthread_rwlock_wrlock(&curnode->rwlock); *node_path = curnode->path; switch (rule_type){ case AIDE_RECURSIVE_NEGATIVE_RULE: case AIDE_NON_RECURSIVE_NEGATIVE_RULE:{ curnode->neg_rx_lst=list_append(curnode->neg_rx_lst,(void*)r); break; } case AIDE_EQUAL_RULE:{ curnode->equ_rx_lst=list_append(curnode->equ_rx_lst,(void*)r); break; } case AIDE_SELECTIVE_RULE:{ curnode->sel_rx_lst=list_append(curnode->sel_rx_lst,(void*)r); break; } } pthread_rwlock_unlock(&curnode->rwlock); free(rxtok); while (curnode) { pthread_rwlock_t *rwlock = &curnode->rwlock; pthread_rwlock_wrlock(rwlock); if(curnode->checked&NODE_HAS_SUB_RULES) { curnode = NULL; } else { log_msg(LOG_LEVEL_DEBUG, "set NODE_HAS_SUB_RULES for node '%s' (%p)", curnode->path, (void*) curnode); curnode->checked |= NODE_HAS_SUB_RULES; curnode = curnode->parent; } pthread_rwlock_unlock(rwlock); } } return r; } #define LOG_MATCH(log_level, border, format, ...) \ log_msg(log_level, "%*s%s%s %*c'%s' " #format " of %s (%s:%d: '%s%s%s')", whoami?10:0, whoami?whoami:"", whoami?": ":"", border, depth, ' ', file.name, __VA_ARGS__, get_rule_type_long_string(rx->type), rx->config_filename, rx->config_linenumber, rx->config_line, rx->prefix?"', prefix: '":"", rx->prefix?rx->prefix:""); static int check_list_for_match(list* rxrlist, file_t file, rx_rule* *rule, int depth, const char* whoami) { list* r=NULL; int retval=RESULT_NO_RULE_MATCH; int pcre_retval; char *rs_str = NULL; for(r=rxrlist;r;r=r->next){ rx_rule *rx = (rx_rule*)r->data; pcre_retval = pcre2_match(rx->crx, (PCRE2_SPTR) file.name, PCRE2_ZERO_TERMINATED, 0, PCRE2_PARTIAL_SOFT, rx->md, NULL); if (pcre_retval >= 0) { /* matching regex */ if (!rx->restriction.f_type || file.type&rx->restriction.f_type) { /* no file type restriction OR matching file type */ #ifdef HAVE_FSTYPE if (rx->restriction.fs_type && file.fs_type == 0) { /* no file system data but file system type restricted rule */ log_msg(LOG_LEVEL_WARNING, "unable to match the file system type restriction of %s (%s:%d: '%s%s%s'): file system type missing for '%s'", get_rule_type_long_string(rx->type), rx->config_filename, rx->config_linenumber, rx->config_line, rx->prefix?"', prefix: '":"", rx->prefix?rx->prefix:"", file.name); /* RESULT_NO_RULE_MATCH */ } else if (!rx->restriction.fs_type || rx->restriction.fs_type == file.fs_type) { /* no file system restriction OR matching file sytem */ #endif *rule = rx; LOG_MATCH(LOG_LEVEL_RULE, "\u251d", matches regex '%s' and restriction '%s', rx->rx, rs_str = get_restriction_string(rx->restriction)) free(rs_str); switch(rx->type) { case AIDE_SELECTIVE_RULE: retval = RESULT_SELECTIVE_MATCH; break; case AIDE_EQUAL_RULE: retval = RESULT_EQUAL_MATCH; break; case AIDE_RECURSIVE_NEGATIVE_RULE: retval = RESULT_RECURSIVE_NEGATIVE_MATCH; break; case AIDE_NON_RECURSIVE_NEGATIVE_RULE: retval = RESULT_NON_RECURSIVE_NEGATIVE_MATCH; break; } break; #ifdef HAVE_FSTYPE } else { /* file system restriction does not match */ LOG_MATCH(LOG_LEVEL_DEBUG, "\u2502", does not match file system of restriction '%s', rs_str = get_restriction_string(rx->restriction)) free(rs_str); retval=RESULT_PARTIAL_MATCH; } #endif } else { /* file type restriction does not match */ LOG_MATCH(LOG_LEVEL_DEBUG, "\u2502", does not match file type of rule restriction '%s', rs_str = get_restriction_string(rx->restriction)) free(rs_str); retval=RESULT_PARTIAL_MATCH; } } else if (pcre_retval == PCRE2_ERROR_PARTIAL) { /* partial match of regex */ LOG_MATCH(LOG_LEVEL_DEBUG, "\u2502", partially matches regex '%s', rx->rx) retval=RESULT_PARTIAL_MATCH; } else { /* regex does not match */ LOG_MATCH(LOG_LEVEL_DEBUG, "\u2502", does not match regex '%s', rx->rx) /* RESULT_NO_RULE_MATCH */ } } return retval; } static match_result _get_default_match_result(const seltree *node, int depth, const char* whoami) { if (node->checked&NODE_HAS_SUB_RULES) { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cdirectory node '%s' (%p) has NODE_HAS_SUB_RULES set (set default match result to RESULT_PARTIAL_MATCH)", depth, ' ', node->path, (void*) node); return RESULT_PARTIAL_MATCH; } LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cdirectory node '%s' (%p) has NODE_HAS_SUB_RULES NOT set (keep default match result at RESULT_NO_RULE_MATCH)", depth, ' ', node->path, (void*) node); return RESULT_NO_RULE_MATCH; } static match_t check_node_for_match(seltree *pnode, file_t file, const char* whoami) { match_t match = { RESULT_NO_RULE_MATCH, NULL, 0 }; match_result result; int depth = 1; char *last_slash = strrchr(file.name,'/'); int parent_length = (last_slash != file.name?last_slash-file.name:0); pthread_rwlock_rdlock(&pnode->rwlock); LOG_WHOAMI(LOG_LEVEL_TRACE, "\u2502 check_node_for_match: pnode: '%s' (%p), filename: '%s', file_type: %c", pnode->path, (void*) pnode, file.name, get_f_type_char_from_f_type(file.type)); if (strncmp(pnode->path, file.name, parent_length) == 0) { if (file.type == FT_DIR) { if (strcmp(pnode->path, file.name) == 0) { match.result = _get_default_match_result(pnode, depth, whoami); } else { seltree * child_node = tree_search(pnode->children, last_slash, (tree_cmp_f) strcmp); if (child_node) { pthread_rwlock_rdlock(&child_node->rwlock); match.result = _get_default_match_result(child_node, depth, whoami); pthread_rwlock_unlock(&child_node->rwlock); } else { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cno node for directory '%s' exists (keep default match result at RESULT_NO_RULE_MATCH)", depth, ' ', file.name); } } } if (pnode->equ_rx_lst) { LOG_WHOAMI(LOG_LEVEL_RULE, "\u2502 %*cnode: '%s': check equal list", depth, ' ', pnode->path); result = check_list_for_match(pnode->equ_rx_lst, file, &match.rule, depth+2, whoami); if (result == RESULT_EQUAL_MATCH || result == RESULT_PARTIAL_MATCH) { match.result = result; } } else { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cnode: '%s': skip equal list (reason: list is empty)", depth, ' ', pnode->path); } } else { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cnode: '%s' skip equal list (reason: not on top level)", depth, ' ', pnode->path); } pthread_rwlock_unlock(&pnode->rwlock); /* seltree* stack for negative rules */ int i = 0; seltree * p = pnode; while (p) { pthread_rwlock_t *rwlock = &p->rwlock; pthread_rwlock_rdlock(rwlock); p = p->parent; i++; pthread_rwlock_unlock(rwlock); } seltree* *nodes = checked_malloc(sizeof(seltree*)*i); i = 0; seltree *next_parent = NULL;; /* check selective rules down -> top */ do { pthread_rwlock_rdlock(&pnode->rwlock); if (pnode->sel_rx_lst || pnode->neg_rx_lst) { nodes[i++] = pnode; if (match.result != RESULT_EQUAL_MATCH && match.result != RESULT_SELECTIVE_MATCH) { if (pnode->sel_rx_lst) { LOG_WHOAMI(LOG_LEVEL_RULE, "\u2502 %*cnode: '%s': check selective list", depth, ' ', pnode->path); result = check_list_for_match(pnode->sel_rx_lst, file, &match.rule, depth+2, whoami); if (result == RESULT_SELECTIVE_MATCH || result == RESULT_PARTIAL_MATCH) { match.result = result; } } else { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cnode: '%s': skip selective list (reason: list is empty)", depth, ' ', pnode->path); } } else { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cnode: '%s': skip selective list (reason: previous positive match)", depth, ' ', pnode->path); } depth++; } else { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cnode: '%s': skip selective and negative list (reason: lists are empty)", depth, ' ', pnode->path); } next_parent = pnode->parent; pthread_rwlock_unlock(&pnode->rwlock); } while ((pnode = next_parent)); /* check negative rules top -> down */ while (--i >=0) { pnode = nodes[i]; depth--; pthread_rwlock_rdlock(&pnode->rwlock); if (match.result == RESULT_EQUAL_MATCH || match.result == RESULT_SELECTIVE_MATCH || match.result == RESULT_PARTIAL_MATCH) { if (pnode->neg_rx_lst) { LOG_WHOAMI(LOG_LEVEL_RULE, "\u2502 %*cnode: '%s': check negative list (reason: previous positive/partial match)", depth, ' ', pnode->path); result = check_list_for_match(pnode->neg_rx_lst, file, &match.rule, depth+2, whoami); if ((match.result != RESULT_PARTIAL_MATCH && result == RESULT_RECURSIVE_NEGATIVE_MATCH) || result == RESULT_NON_RECURSIVE_NEGATIVE_MATCH) { match.result = result; } } else { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cnode: '%s': skip negative list (reason: list is empty)", depth, ' ', pnode->path); } } else if (match.result == RESULT_NON_RECURSIVE_NEGATIVE_MATCH || match.result == RESULT_RECURSIVE_NEGATIVE_MATCH) { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cnode: '%s': skip negative list (reason: previous negative match)", depth, ' ', pnode->path); } else { LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 %*cnode: '%s': skip negative list (reason: no previous positive/partial match)", depth, ' ', pnode->path); } pthread_rwlock_unlock(&pnode->rwlock); } free(nodes); LOG_WHOAMI(LOG_LEVEL_TRACE, "\u2502 check_node_for_match: match result %s (%d) for '%s'", get_match_result_string(match.result), match.result, file.name); return match; } match_t check_seltree(seltree *tree, file_t file, bool check_parent_dirs, const char * whoami) { seltree* pnode=NULL; match_t match = { RESULT_NO_RULE_MATCH, NULL, 0 }; bool parent_negative_match = false; const char *next_dir = file.name; char *parent = checked_strdup(file.name); /* freed below */ pnode = tree; seltree *node = tree; LOG_WHOAMI(LOG_LEVEL_TRACE, "\u2502 search for parent node for '%s' (tree: '%s' (%p))", file.name, tree->path, (void*) tree); if (strcmp(file.name, "/") == 0) { check_parent_dirs = false; } /* do not check parent directories for '/' */ char *relative_child_path = parent; while ((next_dir = strchr(next_dir, '/'))) { int parent_length = next_dir-file.name; int relative_child_path_start = parent_length; if (next_dir == file.name) { /* handle "/" directory */ parent_length = 1; relative_child_path_start = 0; } parent[parent_length] = '\0'; if (node && relative_child_path_start) { node = get_seltree_node(pnode, relative_child_path); if (node) { pthread_rwlock_rdlock(&node->rwlock); LOG_WHOAMI(LOG_LEVEL_TRACE, "\u2502 got %s (%p) for '%s'", node->path, (void*) node, relative_child_path); pthread_rwlock_unlock(&node->rwlock); pnode = node; } } if (check_parent_dirs) { pthread_rwlock_rdlock(&pnode->rwlock); LOG_WHOAMI(LOG_LEVEL_RULE, "\u2502 check parent directory '%s' for non-recurse match (node: '%s' (%p))", parent, pnode->path, (void*) pnode); match = check_node_for_match(pnode, (file_t) { .name = parent, .type = FT_DIR, #ifdef HAVE_FSTYPE .fs_type = 0UL #endif }, whoami); pthread_rwlock_unlock(&pnode->rwlock); if (match.result == RESULT_NON_RECURSIVE_NEGATIVE_MATCH) { match.result = RESULT_NEGATIVE_PARENT_MATCH; match.length = parent_length; parent_negative_match = true; break; } else if (match.result == RESULT_NO_RULE_MATCH) { parent_negative_match = true; break; } else { LOG_WHOAMI(LOG_LEVEL_RULE, "\u2502 no non-recurse match found for parent directory '%s'", parent); } } parent[parent_length] = file.name[parent_length]; relative_child_path = &parent[relative_child_path_start]; next_dir += 1; } pthread_rwlock_rdlock(&pnode->rwlock); LOG_WHOAMI(LOG_LEVEL_TRACE, "\u2502 got parent node '%s' (%p) for parent name '%s'", pnode->path, (void*) pnode, parent); pthread_rwlock_unlock(&pnode->rwlock); free(parent); if (!parent_negative_match) { LOG_WHOAMI(LOG_LEVEL_RULE, "\u2502 check '%s' (filetype: %c)", file.name, get_f_type_char_from_f_type(file.type)); match = check_node_for_match(pnode, file, whoami); } LOG_WHOAMI(LOG_LEVEL_DEBUG, "\u2502 check_selree: match result %s (%d) for '%s'", get_match_result_string(match.result), match.result, file.name); return match; } aide-0.19/src/report_json.c0000644000175000017500000003470514774237261011353 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2022-2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include "config.h" #include "aide.h" #include "attributes.h" #include "conf_ast.h" #include "db.h" #include "db_config.h" #include "db_line.h" #include "report.h" #include "seltree.h" #include "stdbool.h" #include "url.h" #define JSON_FMT_ARRAY_BEGIN "%*c\"%s\": [\n" #define JSON_FMT_ARRAY_ELEMENT_INNER "%*c\"%s\",\n" #define JSON_FMT_ARRAY_ELEMENT_LAST "%*c\"%s\"\n" #define JSON_FMT_ARRAY_ELEMENT_PLAIN "%*c\"%s\"" #define JSON_FMT_ARRAY_END "%*c],\n" #define JSON_FMT_ARRAY_END_PLAIN "%*c]" #define JSON_FMT_LONG "%*c\"%s\": %ld,\n" #define JSON_FMT_LONG_LAST "%*c\"%s\": %ld\n" #define JSON_FMT_OBJECT_BEGIN "%*c\"%s\": {\n" #define JSON_FMT_OBJECT_END "%*c},\n" #define JSON_FMT_OBJECT_END_PLAIN "%*c}" #define JSON_FMT_STRING_COMMA "%*c\"%s\": \"%s\",\n" #define JSON_FMT_STRING_LAST "%*c\"%s\": \"%s\"\n" #define JSON_FMT_STRING_PLAIN "%*c\"%s\": \"%s\"" bool line_first = true; bool database_first = true; bool databases_first = true; bool details_first = true; bool attributes_first = true; static int _escape_json_string(const char *src, char *escaped_string) { size_t i; int n = 0; for (i = 0; i < strlen(src); ++i) { switch(src[i]) { case '\n': if (escaped_string) { escaped_string[n] = '\\'; } n++; if (escaped_string) { escaped_string[n] = 'n'; } n++; break; case '\t': if (escaped_string) { escaped_string[n] = '\\'; } n++; if (escaped_string) { escaped_string[n] = 't'; } n++; break; case '\b': if (escaped_string) { escaped_string[n] = '\\'; } n++; if (escaped_string) { escaped_string[n] = 'b'; } n++; break; case '\f': if (escaped_string) { escaped_string[n] = '\\'; } n++; if (escaped_string) { escaped_string[n] = 'f'; } n++; break; case '\r': if (escaped_string) { escaped_string[n] = '\\'; } n++; if (escaped_string) { escaped_string[n] = 'r'; } n++; break; case '"': case '\\': if (escaped_string) { escaped_string[n] = '\\'; } n++; if (escaped_string) { escaped_string[n] = src[i]; } n++; break; default: if (escaped_string) { escaped_string[n] = src[i]; } n++; } } if (escaped_string) { escaped_string[n] = '\0'; } n++; return n; } static char *_get_escaped_json_string(const char *src) { char *str = NULL; int n = _escape_json_string(src, str); str = checked_malloc(n); _escape_json_string(src, str); return str; } static void _print_config_option(report_t *report, config_option option, const char* value) { char *escaped_value = _get_escaped_json_string(value); report_printf(report, JSON_FMT_STRING_COMMA, 2, ' ', config_options[option].config_name, escaped_value); free(escaped_value); } static char* _get_value_format(ATTRIBUTE attribute) { switch(attribute) { case attr_uid: case attr_gid: case attr_size: case attr_sizeg: case attr_inode: case attr_bcount: case attr_linkcount: return "%*c\"%s\": %s"; default: return "%*c\"%s\": \"%s\""; } } static void print_line_json(report_t* report, char* filename, int node_checked, seltree* node) { if (line_first) { line_first=false; } else { report_printf(report,",\n"); } char *escaped_filename = _get_escaped_json_string(filename); if(report->summarize_changes) { char* summary = get_summarize_changes_string(report, node); report_printf(report, JSON_FMT_STRING_PLAIN, 4, ' ', escaped_filename, summary); free(summary); summary=NULL; } else if (!report->grouped) { char* change_type; if (node_checked&NODE_ADDED) { change_type = "added"; } else if (node_checked&NODE_REMOVED) { change_type = "removed"; } else { change_type = "changed"; } report_printf(report, JSON_FMT_STRING_PLAIN, 4, ' ', escaped_filename, change_type); } else { report_printf(report, JSON_FMT_ARRAY_ELEMENT_PLAIN, 4, ' ', escaped_filename); } free(escaped_filename); } static void _print_attribute_value(report_t *report, const char* name, ATTRIBUTE attribute, char **value, int num, int ident) { if (num) { if (num > 1) { report_printf(report, JSON_FMT_ARRAY_BEGIN, ident, ' ', name); for (int i = 0 ; i < num ; i++) { char *escaped_value = _get_escaped_json_string(value[i]); report_printf(report, i+1filename); database_first = true; report_printf(report, JSON_FMT_OBJECT_BEGIN, 4, ' ', escaped_filename); print_dbline_attrs(report, db, NULL, db->attr, _print_database_attribute); report_printf(report,"\n"); report_printf(report, JSON_FMT_OBJECT_END_PLAIN, 4, ' '); free(escaped_filename); } static void _print_report_dbline_attributes(report_t *report, db_line* oline, db_line* nline, DB_ATTR_TYPE report_attrs) { if (report_attrs) { if (details_first) { details_first=false; } else { report_printf(report,",\n"); } char *escaped_filename = _get_escaped_json_string((nline==NULL?oline:nline)->filename); report_printf(report, JSON_FMT_OBJECT_BEGIN, 4, ' ', escaped_filename); attributes_first = true; print_dbline_attrs(report, oline, nline, report_attrs, _print_attribute); report_printf(report,"\n"); report_printf(report, JSON_FMT_OBJECT_END_PLAIN, 4, ' '); free(escaped_filename); } } static void print_report_header_json(report_t *report) { report_printf(report, "{\n"); } static void print_report_footer_json(report_t *report) { report_printf(report, "}\n"); } static void print_report_outline_json(report_t *report) { report_printf(report, report->level >= REPORT_LEVEL_SUMMARY?JSON_FMT_STRING_COMMA:JSON_FMT_STRING_LAST , 2, ' ', "outline", get_summary_string(report)); } static void print_report_starttime_version_json(report_t *report, const char* start_time, const char* aide_version) { report_printf(report, JSON_FMT_STRING_COMMA, 2, ' ', "start_time", start_time); report_printf(report, JSON_FMT_STRING_COMMA, 2, ' ', "aide_version", aide_version); } static void print_report_endtime_runtime_json(report_t* report, const char* end_time, long run_time) { report_printf(report, JSON_FMT_STRING_COMMA, 2, ' ', "end_time", end_time); report_printf(report, JSON_FMT_LONG_LAST, 2, ' ', "run_time_seconds", run_time); } static void print_report_config_options_json(report_t *report) { print_report_config_options(report, _print_config_option); } static void print_report_report_options_json(report_t *report) { print_report_report_options(report, _print_config_option); } static void print_report_summary_json(report_t *report) { report_printf(report, JSON_FMT_OBJECT_BEGIN, 2, ' ', "number_of_entries"); if (conf->action&(DO_COMPARE|DO_DIFF) && (report->nadd||report->nrem||report->nchg)) { report_printf(report, JSON_FMT_LONG, 4, ' ', "total", report->ntotal); report_printf(report, JSON_FMT_LONG, 4, ' ', "added", report->nadd); report_printf(report, JSON_FMT_LONG, 4, ' ', "removed", report->nrem); report_printf(report, JSON_FMT_LONG_LAST, 4, ' ', "changed", report->nchg); } else { report_printf(report, JSON_FMT_LONG_LAST, 4, ' ', "total", report->ntotal); } report_printf(report, JSON_FMT_OBJECT_END, 2, ' '); } static void print_report_new_database_written_json(report_t *report) { report_printf(report, JSON_FMT_STRING_COMMA, 2, ' ', "new_database", conf->database_out.url->value); } static void print_report_details_json(report_t *report, seltree* node) { details_first = true; report_printf(report, JSON_FMT_OBJECT_BEGIN, 2, ' ', "details"); print_report_details(report, node, _print_report_dbline_attributes); report_printf(report,"\n"); report_printf(report, JSON_FMT_OBJECT_END, 2, ' '); } static void print_report_databases_json(report_t *report) { databases_first = true; report_printf(report, JSON_FMT_OBJECT_BEGIN, 2, ' ', "databases"); print_databases_attrs(report, _print_database_attributes); report_printf(report,"\n"); report_printf(report, JSON_FMT_OBJECT_END, 2, ' '); } static void print_report_entries_json(report_t *report, seltree* node, const int filter) { line_first = true; switch (filter) { case NODE_ADDED: report_printf(report, report->summarize_changes||!report->grouped?JSON_FMT_OBJECT_BEGIN:JSON_FMT_ARRAY_BEGIN, 2, ' ', "added"); break; case NODE_REMOVED: report_printf(report, report->summarize_changes||!report->grouped?JSON_FMT_OBJECT_BEGIN:JSON_FMT_ARRAY_BEGIN, 2, ' ', "removed"); break; case NODE_CHANGED: report_printf(report, report->summarize_changes||!report->grouped?JSON_FMT_OBJECT_BEGIN:JSON_FMT_ARRAY_BEGIN, 2, ' ', "changed"); break; default: report_printf(report, report->summarize_changes||!report->grouped?JSON_FMT_OBJECT_BEGIN:JSON_FMT_ARRAY_BEGIN, 2, ' ', "entries"); break; } print_report_entries(report, node, filter, print_line_json); report_printf(report,"\n"); report_printf(report, report->summarize_changes||!report->grouped?JSON_FMT_OBJECT_END:JSON_FMT_ARRAY_END, 2, ' '); } static void print_report_diff_attrs_entries_json(report_t *report) { if (report->num_diff_attrs_entries) { report_printf(report, JSON_FMT_OBJECT_BEGIN, 2, ' ', "different_attributes"); for(int i = 0; i < report->num_diff_attrs_entries; ++i) { char *escaped_filename = _get_escaped_json_string(report->diff_attrs_entries[i].entry); char *attrs = diff_attributes(report->diff_attrs_entries[i].old_attrs, report->diff_attrs_entries[i].new_attrs); report_printf(report, i + 1 < report->num_diff_attrs_entries ? JSON_FMT_STRING_COMMA : JSON_FMT_STRING_LAST, 4, ' ', escaped_filename, attrs); free(escaped_filename); free(attrs); } report->num_diff_attrs_entries = 0; free(report->diff_attrs_entries); report_printf(report, JSON_FMT_OBJECT_END, 2, ' '); } } report_format_module report_module_json = { .print_report_config_options = print_report_config_options_json, .print_report_databases = print_report_databases_json, .print_report_details = print_report_details_json, .print_report_diff_attrs_entries = print_report_diff_attrs_entries_json, .print_report_endtime_runtime = print_report_endtime_runtime_json, .print_report_entries = print_report_entries_json, .print_report_footer = print_report_footer_json, .print_report_header = print_report_header_json, .print_report_new_database_written = print_report_new_database_written_json, .print_report_outline = print_report_outline_json, .print_report_report_options = print_report_report_options_json, .print_report_starttime_version = print_report_starttime_version_json, .print_report_summary = print_report_summary_json, }; aide-0.19/src/md.c0000644000175000017500000001771614770012122007371 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2005-2006, 2010, 2019-2025 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" #include #include #include #include "attributes.h" #include "db_line.h" #include "db_config.h" #include "base64.h" #include "hashsum.h" #include "log.h" #include "md.h" #include "util.h" #include "errorcodes.h" #ifdef WITH_GCRYPT #include #endif #ifdef WITH_NETTLE #include #include #include #include #include #include #include #include typedef struct { nettle_hash_init_func *init; nettle_hash_update_func *update; nettle_hash_digest_func *digest; } nettle_fucntions_t; nettle_fucntions_t nettle_functions[] = { /* order must match hashsums array */ { (nettle_hash_init_func*) md5_init, (nettle_hash_update_func*) md5_update, (nettle_hash_digest_func*) md5_digest }, { (nettle_hash_init_func*) sha1_init, (nettle_hash_update_func*) sha1_update, (nettle_hash_digest_func*) sha1_digest }, { (nettle_hash_init_func*) sha256_init, (nettle_hash_update_func*) sha256_update, (nettle_hash_digest_func*) sha256_digest }, { (nettle_hash_init_func*) sha512_init, (nettle_hash_update_func*) sha512_update, (nettle_hash_digest_func*) sha512_digest }, { (nettle_hash_init_func*) ripemd160_init, (nettle_hash_update_func*) ripemd160_update, (nettle_hash_digest_func*) ripemd160_digest }, { NULL, NULL, NULL }, { NULL, NULL, NULL }, { NULL, NULL, NULL }, { NULL, NULL, NULL }, { NULL, NULL, NULL }, { (nettle_hash_init_func*) gosthash94_init, (nettle_hash_update_func*) gosthash94_update, (nettle_hash_digest_func*) gosthash94_digest }, { (nettle_hash_init_func*) streebog256_init, (nettle_hash_update_func*) streebog256_update, (nettle_hash_digest_func*) streebog256_digest }, { (nettle_hash_init_func*) streebog512_init, (nettle_hash_update_func*) streebog512_update, (nettle_hash_digest_func*) streebog512_digest }, { (nettle_hash_init_func*) sha512_256_init, (nettle_hash_update_func*) sha512_256_update, (nettle_hash_digest_func*) sha512_256_digest }, { (nettle_hash_init_func*) sha3_256_init, (nettle_hash_update_func*) sha3_256_update, (nettle_hash_digest_func*) sha3_256_digest }, { (nettle_hash_init_func*) sha3_512_init, (nettle_hash_update_func*) sha3_512_update, (nettle_hash_digest_func*) sha3_512_digest }, }; #endif /* Initialise md_container according its todo_attr field */ int init_md(struct md_container* md, const char *filename, const char *whoami) { /* First we check the parameter.. */ #ifdef _PARAMETER_CHECK_ if (md==NULL) { return RETFAIL; } #endif /* We don't have calculator for this yet :) */ md->calc_attr=0; #ifdef WITH_NETTLE for (HASHSUM i = 0 ; i < num_hashes ; ++i) { DB_ATTR_TYPE h = ATTR(hashsums[i].attribute); if (h&md->todo_attr) { nettle_functions[i].init(&md->ctx[i]); md->calc_attr|=h; } } #endif #ifdef WITH_GCRYPT if(gcry_md_open(&md->mdh,0,0)!=GPG_ERR_NO_ERROR){ log_msg(LOG_LEVEL_ERROR,"gcrypt_md_open failed"); exit(IO_ERROR); } for (HASHSUM i = 0 ; i < num_hashes ; ++i) { DB_ATTR_TYPE h = ATTR(hashsums[i].attribute); if (h&md->todo_attr) { if(gcry_md_enable(md->mdh,algorithms[i])==GPG_ERR_NO_ERROR){ md->calc_attr|=h; } else { log_msg(LOG_LEVEL_WARNING,"%s: gcry_md_enable (%s) failed for '%s'", filename, attributes[hashsums[i].attribute].db_name, filename); md->todo_attr&=~h; } } } #endif char *str; LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> initialized md_container: %s (%p)", filename, str = diff_attributes(0, md->calc_attr), (void*) md); free(str); return RETOK; } /* update :) Just call this when you have more data. */ int update_md(struct md_container* md,void* data,ssize_t size) { #ifdef _PARAMETER_CHECK_ if (md==NULL||data==NULL) { return RETFAIL; } #endif #ifdef WITH_NETTLE for (HASHSUM i = 0 ; i < num_hashes ; ++i) { DB_ATTR_TYPE h = ATTR(hashsums[i].attribute); if (h&md->calc_attr) { nettle_functions[i].update(&md->ctx[i], size, data); } } #endif #ifdef WITH_GCRYPT gcry_md_write(md->mdh, data, size); #endif return RETOK; } /* close.. Does some magic. After this calling update_db is not a good idea. */ int close_md(struct md_container* md, md_hashsums * hs, const char *filename, const char *whoami) { #ifdef _PARAMETER_CHECK_ if (md==NULL) { return RETFAIL; } #endif if (hs) { LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> copy hashsums from md_container (%p)", filename, (void*) md); #ifdef WITH_NETTLE for (HASHSUM i = 0 ; i < num_hashes ; ++i) { DB_ATTR_TYPE h = ATTR(hashsums[i].attribute); if (h&md->calc_attr) { nettle_functions[i].digest(&md->ctx[i].md5, hashsums[i].length, hs->hashsums[i]); } } #endif #ifdef WITH_GCRYPT for (HASHSUM i = 0 ; i < num_hashes ; ++i) { if (md->calc_attr&ATTR(hashsums[i].attribute)) { memcpy(hs->hashsums[i],gcry_md_read(md->mdh, algorithms[i]), hashsums[i].length); } } #endif hs->attrs = md->calc_attr; } LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> free md_container (%p)", filename, (void*) md); /* Nettle doesn’t do memory allocation */ #ifdef WITH_GCRYPT gcry_md_close(md->mdh); #endif return RETOK; } DB_ATTR_TYPE copy_hashsums(char *context, md_hashsums *hs, byte* (*target)[num_hashes], const char *whoami) { DB_ATTR_TYPE disabled_hashsums = 0LL; for (int i = 0 ; i < num_hashes ; ++i) { DB_ATTR_TYPE attr = ATTR(hashsums[i].attribute); if (hs->attrs&attr) { (*target)[i] = checked_malloc(hashsums[i].length); memcpy((*target)[i],hs->hashsums[i],hashsums[i].length); char* hashsum_str = encode_base64((*target)[i], hashsums[i].length); LOG_WHOAMI(LOG_LEVEL_TRACE, "%s: copy %s hashsum (%s) to %p", context, attributes[hashsums[i].attribute].db_name, hashsum_str, (void*) (*target)[i]); free (hashsum_str); } else { disabled_hashsums |= attr; (*target)[i] = NULL; } } return disabled_hashsums; } /* Writes md_container to db_line. */ void hashsums2line(md_hashsums *hs, struct db_line* line ,const char *whoami) { #ifdef _PARAMETER_CHECK_ if (md==NULL||line==NULL) { return RETFAIL; } #endif line->attr &= ~(copy_hashsums(line->filename, hs, &line->hashsums, whoami)); } aide-0.19/src/log.c0000644000175000017500000001444214771755145007567 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2020,2022,2023,2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" #include #include #include #include #include #include #include "log.h" #include "errorcodes.h" #include "util.h" LOG_LEVEL prev_log_level = LOG_LEVEL_UNSET; LOG_LEVEL log_level = LOG_LEVEL_UNSET; typedef struct log_cache { LOG_LEVEL level; char *message; } log_cache; log_cache *cached_lines = NULL; int ncachedlines = 0; int colored_log = -1; pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER; struct log_level { LOG_LEVEL log_level; const char *name; const char *log_string; const char *colored_log_string; }; static struct log_level log_level_array[] = { { LOG_LEVEL_ERROR, "error", " ERROR", COLOR_B_RED " ERROR" COLOR_RESET }, { LOG_LEVEL_WARNING, "warning", "WARNING", COLOR_B_YELLOW "WARNING" COLOR_RESET }, { LOG_LEVEL_NOTICE, "notice", " NOTICE", COLOR_L_ORANGE " NOTICE" COLOR_RESET }, { LOG_LEVEL_INFO, "info", " INFO", COLOR_L_GREEN " INFO" COLOR_RESET }, { LOG_LEVEL_COMPARE, "compare", "COMPARE", COLOR_B_BLUE "COMPARE" COLOR_RESET }, { LOG_LEVEL_RULE, "rule", " RULE", COLOR_L_BLUE " RULE" COLOR_RESET }, { LOG_LEVEL_CONFIG, "config", " CONFIG", COLOR_L_CYAN " CONFIG" COLOR_RESET }, { LOG_LEVEL_DEBUG, "debug", " DEBUG", COLOR_B_PURPLE " DEBUG" COLOR_RESET }, { LOG_LEVEL_LIMIT, "limit", " LIMIT", COLOR_L_GRAY " LIMIT" COLOR_RESET }, { LOG_LEVEL_THREAD, "thread", " THREAD", COLOR_B_CYAN " THREAD" COLOR_RESET }, { LOG_LEVEL_TRACE, "trace", " TRACE", COLOR_L_PURPLE " TRACE" COLOR_RESET }, { 0, NULL, NULL , NULL }, }; static const char* get_log_string(LOG_LEVEL level) { if (colored_log) { return log_level_array[level-1].colored_log_string; } else { return log_level_array[level-1].log_string; } } static void cache_line(LOG_LEVEL, const char*, va_list) #ifdef __GNUC__ __attribute__ ((format (printf, 2, 0))) #endif ; static void cache_line(LOG_LEVEL level, const char* format, va_list ap) { int n; cached_lines = realloc(cached_lines, (ncachedlines+1) * sizeof(log_cache)); /* freed in log_cached_lines() */ if (cached_lines == NULL) { stderr_msg("%s: realloc: failed to allocate memory\n", get_log_string(LOG_LEVEL_ERROR)); exit(MEMORY_ALLOCATION_FAILURE); } cached_lines[ncachedlines].level = level; cached_lines[ncachedlines].message = NULL; va_list aq; va_copy(aq, ap); n = vsnprintf(NULL, 0, format, aq) + 1; va_end(aq); int size = n * sizeof(char); cached_lines[ncachedlines].message = malloc(size); /* freed in log_cached_lines() */ if (cached_lines[ncachedlines].message == NULL) { stderr_msg("%s: malloc: failed to allocate %d bytes of memory\n", get_log_string(LOG_LEVEL_ERROR), size); exit(MEMORY_ALLOCATION_FAILURE); } vsnprintf(cached_lines[ncachedlines].message, n, format, ap); ncachedlines++; } const char * get_log_level_name(LOG_LEVEL level) { return level?log_level_array[level-1].name:NULL; } static void log_cached_lines(void) { pthread_mutex_lock(&log_mutex); for(int i = 0; i < ncachedlines; ++i) { LOG_LEVEL level = cached_lines[i].level; if (level == LOG_LEVEL_ERROR || level <= log_level) { stderr_msg("%s: %s\n", get_log_string(level), cached_lines[i].message); } free(cached_lines[i].message); } ncachedlines = 0; free(cached_lines); pthread_mutex_unlock(&log_mutex); } static void vlog_msg(LOG_LEVEL, const char*, va_list) #ifdef __GNUC__ __attribute__ ((format (printf, 2, 0))) #endif ; static void vlog_msg(LOG_LEVEL level,const char* format, va_list ap) { if (level != LOG_LEVEL_ERROR && (log_level == LOG_LEVEL_UNSET || colored_log < 0)) { pthread_mutex_lock(&log_mutex); cache_line(level, format, ap); pthread_mutex_unlock(&log_mutex); } else if (level == LOG_LEVEL_ERROR || level <= log_level) { vstderr_prefix_line(get_log_string(level), format, ap); } } bool is_log_level_unset(void) { return log_level == LOG_LEVEL_UNSET; } LOG_LEVEL get_log_level_from_string(char* val) { struct log_level *level; for (level = log_level_array; level->log_level != 0; level++) { if (strcmp(val, level->name) == 0) { return level->log_level; } } return LOG_LEVEL_UNSET; } void set_colored_log(bool color) { colored_log = color; if (ncachedlines && log_level != LOG_LEVEL_UNSET) { log_cached_lines(); } } void set_log_level(LOG_LEVEL level) { log_level = level; if (colored_log >= 0 && ncachedlines && log_level != LOG_LEVEL_UNSET) { log_cached_lines(); } } LOG_LEVEL toogle_log_level(LOG_LEVEL level) { if (prev_log_level != LOG_LEVEL_UNSET && log_level != level) { set_log_level(level); } else if (log_level != level || prev_log_level != LOG_LEVEL_UNSET) { if (prev_log_level == LOG_LEVEL_UNSET) { prev_log_level = log_level; set_log_level(level); } else { set_log_level(prev_log_level); prev_log_level = LOG_LEVEL_UNSET; } } return log_level; } void log_msg(LOG_LEVEL level, const char* format, ...) { va_list argp; va_start(argp, format); vlog_msg(level, format, argp); va_end(argp); } aide-0.19/src/getopt1.c0000644000175000017500000001065114613411450010346 /* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file was part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "aide.h" #include "getopt.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ aide-0.19/src/list.c0000644000175000017500000001217414613411450007740 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2005-2006, 2010, 2019-2020, 2023 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include "list.h" #include "log.h" #include "util.h" /*for locale support*/ /* list * limitations: * Only the head knows where the tail is * Every item knows where the head is * And that is not true anymore. * Now list has header which knows head and tail. * Every item knows header. */ /* list_sorted_insert() * Adds an item in a sorted list: * - The first argument is the head of the list * - The second argument is the data to be added * - The third argument is the function pointer to the compare function to use * - Returns the head of the list */ list* list_sorted_insert(list* listp, void* data, int (*compare) (const void*, const void*)) { list* newitem=NULL; list* curitem=NULL; newitem = checked_malloc(sizeof(list)); if (listp==NULL){ list_header* header = checked_malloc(sizeof(list_header)); newitem->data=data; newitem->header=header; newitem->next=NULL; newitem->prev=NULL; header->head=newitem; header->tail=newitem; return newitem; } else { /* add element in sorted, non-empty list (use insertion sort) */ curitem = listp->header->head; newitem->header=listp->header; newitem->data=data; if (compare(newitem->data,curitem->data) <= 0) { /* new element is the new head */ listp->header->head=newitem; curitem->prev=newitem; newitem->next=curitem; newitem->prev=NULL; return newitem; } else { /* find position for new element */ while(compare(newitem->data, curitem->data) > 0 && curitem->next != NULL) { curitem=curitem->next; } if (curitem->next == NULL && compare(newitem->data, curitem->data) > 0) { /* new element is the new tail */ listp->header->tail=newitem; curitem->next=newitem; newitem->prev=curitem; newitem->next=NULL; } else { /* new element is an inner element */ curitem->prev->next=newitem; newitem->prev=curitem->prev; curitem->prev=newitem; newitem->next=curitem; } } return listp; } } /* list_append() * append an item to list * returns the head * The first argument is the head of the list * The second argument is the data to be added * Returns list head */ list* list_append(list* listp,void*data) { list* newitem=NULL; newitem = checked_malloc(sizeof(list)); if(listp==NULL){ list_header* header = checked_malloc(sizeof(list_header)); newitem->data=data; newitem->header=header; newitem->next=NULL; newitem->prev=NULL; header->head=newitem; header->tail=newitem; return newitem; }else { /* We have nonempty list. * add to last */ newitem->prev=listp->header->tail; newitem->next=NULL; newitem->data=data; newitem->header=listp->header; listp->header->tail->next=newitem; listp->header->tail=newitem; return listp; } /* Not reached */ return NULL; } /* * delete_list_item() * delete a item from list * returns head of a list. */ list* list_delete_item(list* item){ list* r; if (item==NULL) { log_msg(LOG_LEVEL_DEBUG, "tried to remove from empty list"); return item; } if (item->header->head==item->header->tail) { /* * Ollaan poistamassa listan ainoaa alkiota. * Tllin palautetaan NULL */ free(item->header); free(item); return NULL; } /* * Nyt meill on listassa ainakin kaksi alkiota * */ /* poistetaan listan viimeist alkiota */ if (item==item->header->tail){ r=item->prev; item->header->tail=r; r->next=NULL; r=r->header->head; free(item); return r; } /* * Poistetaan listan ensimminen alkio. */ if (item==item->header->head) { r=item->next; item->header->head=r; r->prev=NULL; r=r->header->head; free(item); return r; } r=item->prev; item->prev->next=item->next; item->next->prev=item->prev; free(item); r=r->header->head; return r; } aide-0.19/src/hashsum.c0000644000175000017500000002015714756544261010454 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2020,2022,2024-2025 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include "config.h" #include "attributes.h" #include "hashsum.h" #include "log.h" #include "errorcodes.h" #ifdef WITH_GCRYPT #include #define NEED_LIBGCRYPT_VERSION "1.8.0" #endif hashsum_t hashsums[] = { { attr_md5, 16 }, { attr_sha1, 20 }, { attr_sha256, 32 }, { attr_sha512, 64 }, { attr_rmd160, 20 }, { attr_tiger, 24 }, { attr_crc32, 4 }, { attr_crc32b, 4 }, { attr_haval, 32 }, { attr_whirlpool, 64 }, { attr_gostr3411_94, 32 }, { attr_stribog256, 32 }, { attr_stribog512, 64 }, { attr_sha512_256, 32 }, { attr_sha3_256, 32 }, { attr_sha3_512, 64 }, }; DB_ATTR_TYPE DEPRECATED_HASHES = ATTR(attr_md5)|ATTR(attr_sha1)|ATTR(attr_rmd160)|ATTR(attr_gostr3411_94); DB_ATTR_TYPE REMOVED_HASHES = ATTR(attr_crc32)|ATTR(attr_crc32b)|ATTR(attr_haval)|ATTR(attr_tiger)|ATTR(attr_whirlpool); #ifdef WITH_NETTLE int algorithms[] = { /* order must match hashsums array */ 1, /* md5 */ 1, /* sha1 */ 1, /* sha256 */ 1, /* sha512 */ 1, /* rmd160 */ -1, /* tiger NOT available */ -1, /* crc32 NOT available */ -1, /* crc32b NOT available */ -1, /* haval NOT available */ -1, /* whirlpool NOT available */ 1, /* gost */ 1, /* stribog256 */ 1, /* stribog512 */ 1, /* sha512_256 */ 1, /* sha3-256 */ 1, /* sha3-512 */ }; #endif #ifdef WITH_GCRYPT int algorithms[] = { /* order must match hashsums array */ GCRY_MD_MD5, GCRY_MD_SHA1, GCRY_MD_SHA256, GCRY_MD_SHA512, GCRY_MD_RMD160, -1, /* tiger is no longer supported by aide */ -1, /* crc32 is no longer supported by aide */ -1, /* CRC32B is not available */ -1, /* GCRY_MD_HAVAL is not (yet) implemented */ -1, /* whirlpool is no longer supported by aide */ GCRY_MD_GOSTR3411_94, GCRY_MD_STRIBOG256, GCRY_MD_STRIBOG512, GCRY_MD_SHA512_256, GCRY_MD_SHA3_256, GCRY_MD_SHA3_512, }; #endif void init_hashsum_lib(void) { #ifdef WITH_GCRYPT if(!gcry_check_version(NEED_LIBGCRYPT_VERSION)) { log_msg(LOG_LEVEL_ERROR, "libgcrypt is too old (need %s, have %s)", NEED_LIBGCRYPT_VERSION, gcry_check_version (NULL)); exit(VERSION_MISMATCH_ERROR); } gcry_control(GCRYCTL_DISABLE_SECMEM, 0); gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); if (gcry_fips_mode_active()) { char* str; log_msg(LOG_LEVEL_NOTICE, "libgcrypt is running in FIPS mode, the following hash(es) are not available: %s", str = diff_attributes(0, ATTR(attr_md5))); free(str); } #endif } DB_ATTR_TYPE get_hashes(bool include_unsupported) { DB_ATTR_TYPE attr = 0LLU; for (int i = 0; i < num_hashes; ++i) { if (include_unsupported || (algorithms[i] >= 0 #ifdef WITH_GCRYPT && (algorithms[i] != GCRY_MD_MD5 || ! gcry_fips_mode_active()) #endif )) { attr |= ATTR(hashsums[i].attribute); } } return attr; } DB_ATTR_TYPE validate_hashes(DB_ATTR_TYPE attrs, int linenumber, char *filename, char* linebuf) { char *attr_str; DB_ATTR_TYPE requested_hashes = attrs&get_hashes(true); DB_ATTR_TYPE requested_deprecated = requested_hashes&DEPRECATED_HASHES; if (requested_deprecated) { attr_str = diff_attributes(0, requested_deprecated); LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_NOTICE, "hashsum(s) '%s' are DEPRECATED and will be removed in the release after next, please update your config", attr_str) free(attr_str); } DB_ATTR_TYPE requested_unsupported = requested_hashes&REMOVED_HASHES; if (requested_unsupported) { DB_ATTR_TYPE remaining_hashes = requested_hashes & ~requested_unsupported; if (remaining_hashes) { attr_str = diff_attributes(0, requested_unsupported); char *remaining_str = diff_attributes(0, remaining_hashes); LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_WARNING, "ignore unsupported hashsum(s): %s (remaining hashsum(s): %s), please update your config", attr_str, remaining_str); attrs &= ~requested_unsupported; free(remaining_str); free(attr_str); } else { attr_str = diff_attributes(0, requested_unsupported); LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "no hashsum(s) left after ignoring unsupported hashsum(s): %s", attr_str); free(attr_str); exit(INVALID_CONFIGURELINE_ERROR); } } return attrs; } DB_ATTR_TYPE get_transition_hashsums(char *old_filename, DB_ATTR_TYPE old_attr, char *new_filename, DB_ATTR_TYPE new_attr) { DB_ATTR_TYPE transition_hashsums = 0LL; DB_ATTR_TYPE all_hashsums = get_hashes(true); DB_ATTR_TYPE available_hashsums = get_hashes(false); DB_ATTR_TYPE added_hashsums = (~old_attr)&new_attr&all_hashsums; DB_ATTR_TYPE removed_hashsums = old_attr&~(new_attr)&all_hashsums; if (added_hashsums && removed_hashsums) { char *diff_str = diff_attributes(old_attr&all_hashsums, new_attr&all_hashsums); DB_ATTR_TYPE common_hashsums = old_attr&new_attr&available_hashsums; if (common_hashsums == 0) { transition_hashsums = removed_hashsums&available_hashsums; if (transition_hashsums) { char *trans_str = diff_attributes(0, transition_hashsums); log_msg(LOG_LEVEL_COMPARE, "hashsum transition (%s) for old:'%s' and new:'%s': transition hashsum(s): %s", diff_str, old_filename, new_filename, trans_str); free(trans_str); } else { log_msg(LOG_LEVEL_WARNING, "hashsum transition (%s) for old:'%s' and new:'%s': no common or transition hashsum(s) available", diff_str, old_filename, new_filename); } } else { transition_hashsums = common_hashsums; char *common_str = diff_attributes(0, common_hashsums); log_msg(LOG_LEVEL_COMPARE, "hashsum transition (%s) for old:'%s' and new:'%s': common hashsum(s): %s", diff_str, old_filename, new_filename, common_str); free(common_str); } free(diff_str); } return transition_hashsums; } DB_ATTR_TYPE get_hashsums_to_ignore(char *old_filename, DB_ATTR_TYPE old_attr, char *new_filename, DB_ATTR_TYPE new_attr) { DB_ATTR_TYPE hashsums_to_ignore = 0LL; DB_ATTR_TYPE all_hashsums = get_hashes(true); DB_ATTR_TYPE available_hashsums = get_hashes(false); DB_ATTR_TYPE added_hashsums = (~old_attr)&new_attr&all_hashsums; DB_ATTR_TYPE removed_hashsums = old_attr&~(new_attr)&all_hashsums; if (added_hashsums && removed_hashsums) { char *diff_str = diff_attributes(old_attr&all_hashsums, new_attr&all_hashsums); DB_ATTR_TYPE common_hashsums = old_attr&new_attr&available_hashsums; if (common_hashsums) { hashsums_to_ignore = added_hashsums^removed_hashsums; char *common_str = diff_attributes(0, common_hashsums); log_msg(LOG_LEVEL_COMPARE, "│ hashsum transition (%s) for old:'%s' and new:'%s', common hashsum(s): %s", diff_str, old_filename, new_filename, common_str); free(common_str); } else { log_msg(LOG_LEVEL_DEBUG, "│ hashsum transition (%s) for old:'%s' and new:'%s', no common hashsum available", diff_str, old_filename, new_filename); } free(diff_str); } return hashsums_to_ignore; } aide-0.19/src/conf_yacc.h0000644000175000017500000001173014774244734010734 /* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, especially those whose name start with YY_ or yy_. They are private implementation details that can be changed or removed. */ #ifndef YY_CONF_SRC_CONF_YACC_H_INCLUDED # define YY_CONF_SRC_CONF_YACC_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int confdebug; #endif /* "%code requires" blocks. */ #line 1 "src/conf_yacc.y" #include "conf_ast.h" #line 53 "src/conf_yacc.h" /* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { YYEMPTY = -2, YYEOF = 0, /* "end of file" */ YYerror = 256, /* error */ YYUNDEF = 257, /* "invalid token" */ TDEFINE = 258, /* "@@define" */ TUNDEFINE = 259, /* "@@undef" */ TIFDEF = 260, /* "@@ifdef" */ TIFNDEF = 261, /* "@@ifndef" */ TIFNHOST = 262, /* "@@ifnhost" */ TIFHOST = 263, /* "@@ifhost" */ TIF = 264, /* "@@if" */ TBOOLNOT = 265, /* "not" */ TBOOLFUNC = 266, /* "boolean function" */ TBOOLOP = 267, /* "boolean operator" */ TELSE = 268, /* "@@else" */ TENDIF = 269, /* "@@endif" */ TINCLUDE = 270, /* "@@include" */ TXINCLUDE = 271, /* "@@x_include" */ TSETENV = 272, /* "@@x_include_setenv" */ TGROUP = 273, /* "group name" */ TSTRING = 274, /* "string" */ TEXPR = 275, /* "group" */ TVARIABLE = 276, /* "variable name" */ TSPACE = 277, /* "whitespace" */ TNEWLINE = 278, /* "new line" */ TSELRXRULE = 279, /* "regular rule" */ TEQURXRULE = 280, /* "equals rule" */ TRECNEGRXRULE = 281, /* "recursive negative rule" */ TNONRECNEGRXRULE = 282, /* "non-recursive negative rule" */ CONFIGOPTION = 283 /* "configuration option" */ }; typedef enum yytokentype yytoken_kind_t; #endif /* Token kinds. */ #define YYEMPTY -2 #define YYEOF 0 #define YYerror 256 #define YYUNDEF 257 #define TDEFINE 258 #define TUNDEFINE 259 #define TIFDEF 260 #define TIFNDEF 261 #define TIFNHOST 262 #define TIFHOST 263 #define TIF 264 #define TBOOLNOT 265 #define TBOOLFUNC 266 #define TBOOLOP 267 #define TELSE 268 #define TENDIF 269 #define TINCLUDE 270 #define TXINCLUDE 271 #define TSETENV 272 #define TGROUP 273 #define TSTRING 274 #define TEXPR 275 #define TVARIABLE 276 #define TSPACE 277 #define TNEWLINE 278 #define TSELRXRULE 279 #define TEQURXRULE 280 #define TRECNEGRXRULE 281 #define TNONRECNEGRXRULE 282 #define CONFIGOPTION 283 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 42 "src/conf_yacc.y" char* s; config_option option; bool_operator operator; ast* ast; if_condition* if_cond; bool_expression* bool_expr; attribute_expression* attr_expr; restriction_expression* rs_expr; ft_restriction_expression* ft_rs_expr; string_expression* string_expr; #line 146 "src/conf_yacc.h" }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE conflval; int confparse (ast** config_ast); #endif /* !YY_CONF_SRC_CONF_YACC_H_INCLUDED */ aide-0.19/src/e2fsattrs.c0000644000175000017500000000556114613411450010704 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 2010, 2012, 2015-2016, 2020-2022 Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include "e2fsattrs.h" #include "util.h" typedef struct { unsigned long f; char c; } e2fsattrs_t; /* flag->character mappings taken from lib/e2p/pf.c (git commit 32fda1e) * date: 2021-04-24 * sources: git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git */ static e2fsattrs_t e2fsattrs_flags[] = { { EXT2_SECRM_FL, 's' }, { EXT2_UNRM_FL, 'u' }, { EXT2_SYNC_FL, 'S' }, { EXT2_DIRSYNC_FL, 'D' }, { EXT2_IMMUTABLE_FL, 'i' }, { EXT2_APPEND_FL, 'a' }, { EXT2_NODUMP_FL, 'd' }, { EXT2_NOATIME_FL, 'A' }, { EXT2_COMPR_FL, 'c' }, { EXT4_ENCRYPT_FL, 'E' }, { EXT3_JOURNAL_DATA_FL, 'j' }, { EXT2_INDEX_FL, 'I' }, { EXT2_NOTAIL_FL, 't' }, { EXT2_TOPDIR_FL, 'T' }, #ifdef EXT4_EXTENTS_FL { EXT4_EXTENTS_FL, 'e' }, #endif #ifdef FS_NOCOW_FL { FS_NOCOW_FL, 'C' }, #endif #ifdef FS_DAX_FL { FS_DAX_FL, 'x' }, #endif #ifdef EXT4_CASEFOLD_FL { EXT4_CASEFOLD_FL, 'F' }, #endif #ifdef EXT4_INLINE_DATA_FL { EXT4_INLINE_DATA_FL, 'N' }, #endif #ifdef EXT4_PROJINHERIT_FL { EXT4_PROJINHERIT_FL, 'P' }, #endif #ifdef EXT4_VERITY_FL { EXT4_VERITY_FL, 'V' }, #endif #ifdef EXT2_NOCOMPR_FL { EXT2_NOCOMPR_FL, 'm' }, #endif }; unsigned long num_flags = sizeof(e2fsattrs_flags)/sizeof(e2fsattrs_t); unsigned long e2fsattrs_get_flag(char c) { for (unsigned long i = 0 ; i < num_flags ; ++i) { if (e2fsattrs_flags[i].c == c ) { return e2fsattrs_flags[i].f; } } return 0; } char* get_e2fsattrs_string(unsigned long flags, bool flags_only, unsigned long ignore_e2fsattrs) { char* string = checked_malloc ((num_flags+1) * sizeof (char)); int j = 0; for (unsigned long i = 0 ; i < num_flags ; i++) { if (!flags_only && e2fsattrs_flags[i].f&ignore_e2fsattrs) { string[j++]=':'; } else if (e2fsattrs_flags[i].f & flags) { string[j++]=e2fsattrs_flags[i].c; } else if (!flags_only) { string[j++]='-'; } } string[j] = '\0'; return string; } aide-0.19/src/report_plain.c0000644000175000017500000002245014756605761011503 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2006, 2010, 2011, 2013, 2015-2016, 2018-2025 Rami Lehti, * Pablo Virolainen, Mike Markley, Richard van den Berg, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include "config.h" #include "aide.h" #include "attributes.h" #include "conf_ast.h" #include "db.h" #include "db_config.h" #include "db_line.h" #include "report.h" #include "seltree.h" #include "stdbool.h" #include "url.h" #include "locale-aide.h" #define PLAIN_REPORT_HEADLINE_FMT "\n\n---------------------------------------------------\n%s:\n---------------------------------------------------\n" bool first = true; static void print_report_dbline_attributes_plain(report_t *, db_line*, db_line*, DB_ATTR_TYPE); static char* _get_not_grouped_list_string(report_t *report) { if (report->nadd && report->nrem && report->nchg) { return _("Added, removed and changed entries"); } else if (report->nadd && report->nrem) { return _("Added and removed entries"); } else if (report->nadd && report->nchg) { return _("Added and changed entries"); } else if (report->nrem && report->nchg) { return _("Removed and changed entries"); } else if (report->nadd) { return _("Added entries"); } else if (report->nrem) { return _("Removed entries"); } else { return _("Changed entries"); } } static void _print_config_option(report_t *report, config_option option, const char* value) { if (first) { first=false; } else { report_printf(report," | "); } report_printf(report, "%s: %s", config_options[option].report_string, value); } static void _print_report_option(report_t *report, config_option option, const char* value) { report_printf(report, "%s: %s\n", config_options[option].report_string, value); } static void _print_attribute(report_t *report, db_line* oline, db_line* nline, ATTRIBUTE attribute) { char **ovalue = NULL; char **nvalue = NULL; int onumber, nnumber, i, c; int p = (conf->print_details_width-(4 + MAX_WIDTH_DETAILS_STRING))/2; DB_ATTR_TYPE attr = ATTR(attribute); const char* name = attributes[attribute].details_string; onumber=get_attribute_values(attr, oline, &ovalue, report); nnumber=get_attribute_values(attr, nline, &nvalue, report); i = 0; while (i= 0 || nlen-p*k >= 0) { c = k*(p-1); if (!onumber) { report_printf(report," %-*s%c %-*c %.*s\n", MAX_WIDTH_DETAILS_STRING, (i+k)?"":name, (i+k)?' ':':', p, ' ', p-1, nlen-c>0?&nvalue[i][c]:""); } else if (!nnumber) { report_printf(report," %-*s%c %.*s\n", MAX_WIDTH_DETAILS_STRING, (i+k)?"":name, (i+k)?' ':':', p-1, olen-c>0?&ovalue[i][c]:""); } else { report_printf(report," %-*s%c %-*.*s| %.*s\n", MAX_WIDTH_DETAILS_STRING, (i+k)?"":name, (i+k)?' ':':', p, p-1, olen-c>0?&ovalue[i][c]:"", p-1, nlen-c>0?&nvalue[i][c]:""); } k++; } ++i; } for(i=0; i < onumber; ++i) { free(ovalue[i]); ovalue[i]=NULL; } free(ovalue); ovalue=NULL; for(i=0; i < nnumber; ++i) { free(nvalue[i]); nvalue[i]=NULL; } free(nvalue); nvalue=NULL; } static void _print_database_attributes(report_t *report, db_line* db) { print_report_dbline_attributes_plain(report, db, NULL, db->attr); } static void print_report_outline_plain(report_t *report) { report_printf(report, "%s\n", get_summary_string(report)); } static void print_report_new_database_written_plain(report_t *report) { report_printf(report,_("New AIDE database written to %s\n"),conf->database_out.url->value); } static void print_report_config_options_plain(report_t *report) { first = true; print_report_config_options(report, _print_config_option); if (!first) { report_printf(report, "\n"); } } static void print_report_report_options_plain(report_t *report) { print_report_report_options(report, _print_report_option); } static void print_report_starttime_version_plain(report_t *report, const char* start_time, const char* aide_version) { report_printf(report, _("Start timestamp: %s (AIDE %s)\n"), start_time, aide_version); } static void print_report_endtime_runtime_plain(report_t* report, const char* end_time, long run_time) { report_printf(report, _("\n\nEnd timestamp: %s (run time: %ldm %lds)\n"), end_time, run_time/60, run_time%60); } static void print_report_summary_plain(report_t *report) { if(conf->action&(DO_COMPARE|DO_DIFF) && (report->nadd||report->nrem||report->nchg)) { report_printf(report,_("\nSummary:\n Total number of entries:\t%li\n Added entries:\t\t%li\n" " Removed entries:\t\t%li\n Changed entries:\t\t%li"), report->ntotal, report->nadd, report->nrem, report->nchg); } else { report_printf(report, _("\nNumber of entries:\t%li"), report->ntotal); } } static void print_line_plain(report_t* report, char* filename, int node_checked, seltree* node) { if(report->summarize_changes) { char* summary = get_summarize_changes_string(report, node); report_printf(report, "\n%s: %s", summary, filename); free(summary); summary=NULL; } else { if (node_checked&NODE_ADDED) { report_printf(report, _("\nadded: %s"), filename); } else if (node_checked&NODE_REMOVED) { report_printf(report, _("\nremoved: %s"), filename); } else if (node_checked&NODE_CHANGED) { report_printf(report, _("\nchanged: %s"), filename); } } } static void print_report_dbline_attributes_plain(report_t *report, db_line* oline, db_line* nline, DB_ATTR_TYPE report_attrs) { if (report_attrs) { db_line* line = nline==NULL?oline:nline; report_printf(report, "\n"); if (line->perm) { report_printf(report, "%s: ", get_file_type_string(line->perm)); } report_printf(report, "%s\n", line->filename); print_dbline_attrs(report, oline, nline, report_attrs, _print_attribute); } } static void print_report_databases_plain(report_t *report) { report_printf(report, PLAIN_REPORT_HEADLINE_FMT,_("The attributes of the (uncompressed) database(s)")); print_databases_attrs(report, _print_database_attributes); } static void print_report_entries_plain(report_t *report, seltree* node, const int filter) { switch (filter) { case NODE_ADDED: report_printf(report, PLAIN_REPORT_HEADLINE_FMT,_("Added entries")); break; case NODE_REMOVED: report_printf(report, PLAIN_REPORT_HEADLINE_FMT,_("Removed entries")); break; case NODE_CHANGED: report_printf(report, PLAIN_REPORT_HEADLINE_FMT,_("Changed entries")); break; default: report_printf(report, PLAIN_REPORT_HEADLINE_FMT, _get_not_grouped_list_string(report)); break; } print_report_entries(report, node, filter, print_line_plain); } static void print_report_details_plain(report_t *report, seltree* node) { report_printf(report, PLAIN_REPORT_HEADLINE_FMT,_("Detailed information about changes")); print_report_details(report, node, print_report_dbline_attributes_plain); } static void print_report_diff_attrs_entries_plain(report_t *report) { for(int i = 0; i < report->num_diff_attrs_entries; ++i) { char *str = NULL; report_printf(report, "Entry %s in databases has different attributes: %s\n", report->diff_attrs_entries[i].entry, str= diff_attributes(report->diff_attrs_entries[i].old_attrs, report->diff_attrs_entries[i].new_attrs)); free(str); } report->num_diff_attrs_entries = 0; free(report->diff_attrs_entries); } report_format_module report_module_plain = { .print_report_config_options = print_report_config_options_plain, .print_report_databases = print_report_databases_plain, .print_report_details = print_report_details_plain, .print_report_diff_attrs_entries = print_report_diff_attrs_entries_plain, .print_report_endtime_runtime = print_report_endtime_runtime_plain, .print_report_entries = print_report_entries_plain, .print_report_footer = NULL, .print_report_header = NULL, .print_report_new_database_written = print_report_new_database_written_plain, .print_report_outline = print_report_outline_plain, .print_report_report_options = print_report_report_options_plain, .print_report_starttime_version = print_report_starttime_version_plain, .print_report_summary = print_report_summary_plain, }; aide-0.19/src/do_md.c0000644000175000017500000005520214774237261010064 /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2002, 2004-2006, 2009-2011, 2013, 2018-2025 Rami Lehti, * Pablo Virolainen, Mike Markley, Richard van den Berg, * Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" #include "db_disk.h" #include #include #include #include #include #include #include #include #include #include #include #ifdef WITH_ZLIB #include #endif #ifdef WITH_XATTR #include #include #endif #ifdef WITH_SELINUX #include #endif #ifdef WITH_POSIX_ACL #include #endif #ifdef WITH_E2FSATTRS #include #endif #ifdef HAVE_SYS_PRCTL_H #include #endif #ifdef WITH_CAPABILITIES #include #endif #include "md.h" #include "do_md.h" #include "hashsum.h" #include "db_line.h" #include "db_config.h" #include "util.h" #include "log.h" #include "attributes.h" /* This define should be somewhere else */ #define READ_BLOCK_SIZE 16777216 typedef union fd { int plain; #ifdef WITH_ZLIB gzFile gzip; #endif } _fd; typedef enum compression { COMPRESSION_PLAIN, #ifdef WITH_ZLIB COMPRESSION_GZIP, #endif COMPRESSION_ERROR } compression; typedef struct hashsums_file { _fd fd; compression compression; } hashsums_file; int stat_cmp(struct stat* f1,struct stat* f2, bool growing) { if (f1==NULL || f2==NULL) { return RETFAIL; } #define stat_cmp_helper(n,attribute) ((f1->n!=f2->n)*ATTR(attribute)) #define stat_growing_cmp_helper(n,attribute) ((growing?f1->nn:f1->n!=f2->n)*ATTR(attribute)) return (stat_cmp_helper(st_ino,attr_inode)| stat_cmp_helper(st_mode,attr_perm)| stat_cmp_helper(st_nlink,attr_linkcount)| stat_growing_cmp_helper(st_size,attr_size)| stat_growing_cmp_helper(st_mtime,attr_mtime)| stat_growing_cmp_helper(st_ctime,attr_ctime)| stat_growing_cmp_helper(st_blocks,attr_bcount)| stat_cmp_helper(st_blksize,attr_bsize)| stat_cmp_helper(st_rdev,attr_rdev)| stat_cmp_helper(st_gid,attr_gid)| stat_cmp_helper(st_uid,attr_uid)| stat_cmp_helper(st_dev,attr_dev)); } static hashsums_file hashsum_open(int filedes, char* fullpath, bool uncompress, const char *whoami) { hashsums_file file; if (uncompress) { char head[2]; char *magic_gzip = "\037\213"; ssize_t magic_length = strlen(magic_gzip); ssize_t bytes = read(filedes, head, magic_length); if (bytes == magic_length && strncmp(head, magic_gzip, magic_length) == 0) { LOG_WHOAMI(LOG_LEVEL_COMPARE, "│ '%s' is gzip compressed", fullpath); lseek(filedes, 0, SEEK_SET); #ifdef WITH_ZLIB int dupfd = dup(filedes); if (dupfd == -1) { log_msg(LOG_LEVEL_NOTICE, "'%s': failed to duplicate file descriptor: %s", fullpath, strerror(errno)); file.compression = COMPRESSION_ERROR; return file; } file.fd.gzip = gzdopen(dupfd, "rb"); if (file.fd.gzip == NULL){ log_msg(LOG_LEVEL_WARNING, "hash calculation: gzdopen() failed for %s (uncompressed hashsums could not be calculated)", fullpath); close(dupfd); file.compression = COMPRESSION_ERROR; return file; } file.compression = COMPRESSION_GZIP; return file; #else log_msg(LOG_LEVEL_WARNING, "'%s': gzip support not compiled in, recompile AIDE with '--with-zlib' (uncompressed hashsums could not be calculated)", fullpath); file.compression = COMPRESSION_ERROR; return file; #endif } else { log_msg(LOG_LEVEL_NOTICE, "'%s': no supported compression algorithm found (uncompressed hashsums could not be calculated)", fullpath); file.compression = COMPRESSION_ERROR; return file; } } else { file.fd.plain = filedes; file.compression = COMPRESSION_PLAIN; return file; } } static off_t hashsum_read(hashsums_file file, void *buf, size_t count) { off_t size = -1; do { switch (file.compression) { case COMPRESSION_PLAIN: size = read(file.fd.plain, buf, count); break; #ifdef WITH_ZLIB case COMPRESSION_GZIP: size = gzread(file.fd.gzip, buf, count); break; #endif case COMPRESSION_ERROR: size = -2; break; } } while (size == -1 && errno == EINTR); /* retry on EINTR */ return size; } static int hashsum_close(hashsums_file file) { switch (file.compression) { case COMPRESSION_PLAIN: return 0; #ifdef WITH_ZLIB case COMPRESSION_GZIP: return gzclose(file.fd.gzip); #endif case COMPRESSION_ERROR: return -1; } return -1; } md_hashsums calc_hashsums(disk_entry *entry, DB_ATTR_TYPE attr, ssize_t limit_size, bool uncompress, const char *whoami) { md_hashsums md_hash; md_hash.attrs = 0LU; if (lseek(entry->fd, 0, SEEK_SET) == -1) { log_msg(LOG_LEVEL_WARNING, "hash calculation: lseek() failed to failed for '%s': %s (hashsum could not be calculated)", entry->filename, strerror(errno)); return md_hash; } #ifdef HAVE_POSIX_FADVISE if (posix_fadvise(entry->fd,0,entry->fs.st_size,POSIX_FADV_SEQUENTIAL)!=0) { LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> calc_hashsums: posix_fadvise error: %s", entry->filename, strerror(errno)); } #endif hashsums_file file = hashsum_open(entry->fd, entry->filename, uncompress, whoami); if (file.compression == COMPRESSION_ERROR) { return md_hash; } off_t r_size=0; off_t size=0; char* buf; struct md_container mdc; mdc.todo_attr = attr; if (init_md(&mdc, entry->filename, whoami)==RETOK) { LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> calculate hashes", entry->filename); buf=checked_malloc(READ_BLOCK_SIZE); #if READ_BLOCK_SIZE>SSIZE_MAX #error "READ_BLOCK_SIZE" is too large. Max value is SSIZE_MAX, and current is READ_BLOCK_SIZE #endif while ((size = hashsum_read(file,buf,READ_BLOCK_SIZE)) > 0) { off_t update_md_size; if (limit_size > 0 && r_size+size > limit_size) { /* the last read exceeded limited size */ update_md_size = limit_size-r_size; } else if(attr&ATTR(attr_growing) && r_size+size > entry->fs.st_size) { update_md_size = entry->fs.st_size-r_size; } else { update_md_size = size; } if (update_md(&mdc,buf,update_md_size)!=RETOK) { log_msg(LOG_LEVEL_WARNING, "hash calculation: update_md() failed for '%s' (hashsums could not be calculated)", entry->filename); free(buf); hashsum_close(file); close_md(&mdc, NULL, entry->filename, whoami); return md_hash; } r_size+=update_md_size; if (limit_size > 0 && r_size == limit_size) { LOG_WHOAMI(LOG_LEVEL_DEBUG, "hash calculation: limited size (%zi) reached for '%s'", limit_size, entry->filename); break; } else if (attr&ATTR(attr_growing) && r_size == entry->fs.st_size) { LOG_WHOAMI(LOG_LEVEL_DEBUG, "hash calculation: stat size (%zi) reached for growing file '%s'", entry->fs.st_size, entry->filename); break; } } free(buf); hashsum_close(file); if (size == -1) { log_msg(LOG_LEVEL_WARNING, "hash calculation: failed to read file content of '%s': %s (hashsums could not be calculated)", entry->filename, strerror(errno)); close_md(&mdc, NULL, entry->filename, whoami); return md_hash; } struct stat new_fs; if (fstat(entry->fd,&new_fs) != 0) { log_msg(LOG_LEVEL_WARNING, "hash calculation: fstat() failed for '%s': %s (hashsums could not be calculated)", entry->filename, strerror(errno)); close_md(&mdc, NULL, entry->filename, whoami); return md_hash; } if(!(attr&ATTR(attr_rdev))) { new_fs.st_rdev=0; } int stat_diff; if ((stat_diff = stat_cmp(&new_fs, &entry->fs, attr&ATTR(attr_growing))) != RETOK) { DB_ATTR_TYPE changed_attribures = 0ULL; for(ATTRIBUTE i=0;ifs.st_size) { log_msg(LOG_LEVEL_WARNING, WARN_COMMON_FORMAT ", was file truncated while AIDE was running? (discarding calculated hashsums)", entry->filename, attrs_str,", decreased size"); } else if (new_fs.st_size > entry->fs.st_size) { log_msg(LOG_LEVEL_WARNING, WARN_COMMON_FORMAT ", was file growing while AIDE was running? (consider adding 'growing' attribute) (discarding calculated hashsums)", entry->filename, attrs_str, ", increased size"); } else { log_msg(LOG_LEVEL_WARNING, WARN_COMMON_FORMAT " (discarding calculated hashsums)", entry->filename, attrs_str, ""); } free(attrs_str); close_md(&mdc, NULL, entry->filename, whoami); return md_hash; } if (uncompress == false) { long long target_size = limit_size > 0?limit_size: entry->fs.st_size; if (r_size != target_size) { log_msg(LOG_LEVEL_WARNING, "number of bytes read for hash calculation (%lld) mismatches expected %s size (%lld) for '%s' (discarding calculated hashsums)", (long long) r_size, limit_size > 0?"limited":"stat", target_size, entry->filename ); close_md(&mdc, NULL, entry->filename, whoami); return md_hash; } } close_md(&mdc, &md_hash, entry->filename, whoami); return md_hash; } else { log_msg(LOG_LEVEL_WARNING, "hash calculation: init_md() failed for '%s' (hashsums could not be calculated)", entry->filename); hashsum_close(file); return md_hash; } } void fs2db_line(struct stat* fs,db_line* line) { /* inode is always needed for ignoring changed filename */ line->inode=fs->st_ino; if(ATTR(attr_uid)&line->attr) { line->uid=fs->st_uid; }else { line->uid=0; } if(ATTR(attr_gid)&line->attr){ line->gid=fs->st_gid; }else{ line->gid=0; } /* permissions are always needed for file type detection */ line->perm=fs->st_mode; if(ATTR(attr_size)&line->attr || ATTR(attr_sizeg)&line->attr || (ATTR(attr_growing)&line->attr && line->attr&get_hashes(true)) ){ line->size=fs->st_size; }else{ line->size=0; } if(ATTR(attr_linkcount)&line->attr){ line->nlink=fs->st_nlink; }else { line->nlink=0; } if(ATTR(attr_mtime)&line->attr){ line->mtime=fs->st_mtime; }else{ line->mtime=0; } if(ATTR(attr_ctime)&line->attr){ line->ctime=fs->st_ctime; }else{ line->ctime=0; } if(ATTR(attr_atime)&line->attr){ line->atime=fs->st_atime; }else{ line->atime=0; } if(ATTR(attr_bcount)&line->attr){ line->bcount=fs->st_blocks; } else { line->bcount=0; } } #ifdef WITH_ACL void acl2line(db_line* line, int fd, const char *whoami) { acl_type *ret = NULL; #ifdef WITH_POSIX_ACL if(ATTR(attr_acl)&line->attr) { acl_t acl_a = NULL; acl_t acl_d = NULL; char *tmp = NULL; #ifdef O_PATH char proc_self_path[256]; #endif acl_a = acl_get_fd(fd); #ifdef O_PATH int fd_flags = fcntl(fd, F_GETFL); if (acl_a == NULL && errno == EBADF && fd_flags != -1 && fd_flags&O_PATH) { snprintf(proc_self_path, sizeof(proc_self_path), "/proc/self/fd/%d", fd); LOG_WHOAMI(LOG_LEVEL_DEBUG,"%s> acl_get_fd() failed: Bad file descriptor (emulating O_PATH support via '%s')", line->fullpath, proc_self_path); acl_a = acl_get_file(proc_self_path, ACL_TYPE_ACCESS); } #endif if (acl_a == NULL) { switch (errno) { case ENOSYS: case ENOTSUP: LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> acl_get_fd() failed to get ACL: %s (disabling acl attribute)", line->fullpath, strerror(errno)); break; default: log_msg(LOG_LEVEL_WARNING, "acl_get_fd() failed to get ACL for '%s': %s (disabling acl attribute)", line->fullpath, strerror(errno)); } line->attr&=(~ATTR(attr_acl)); return; } #ifdef O_PATH if (S_ISDIR(line->perm)) { snprintf(proc_self_path, sizeof(proc_self_path), "/proc/self/fd/%d", fd); acl_d = acl_get_file(proc_self_path, ACL_TYPE_DEFAULT); if (acl_d == NULL) { log_msg(LOG_LEVEL_WARNING, "failed to get default ACL for directory '%s': %s (disabling acl attribute)", line->fullpath, strerror(errno)); acl_free(acl_a); line->attr&=(~ATTR(attr_acl)); return; } } #endif ret = checked_malloc(sizeof(acl_type)); /* use tmp, so free() can be called instead of acl_free() */ tmp = acl_to_text(acl_a, NULL); if (!tmp || !*tmp) ret->acl_a = NULL; else ret->acl_a = checked_strdup(tmp); acl_free(tmp); if (!acl_d) ret->acl_d = NULL; else { tmp = acl_to_text(acl_d, NULL); if (!tmp || !*tmp) ret->acl_d = NULL; else ret->acl_d = checked_strdup(tmp); acl_free(tmp); } acl_free(acl_a); acl_free(acl_d); } line->acl = ret; #endif } #endif #ifdef WITH_XATTR static xattrs_type *xattr_new(void) { xattrs_type *ret = NULL; ret = checked_malloc(sizeof(xattrs_type)); ret->num = 0; ret->sz = 2; ret->ents = checked_malloc(sizeof(xattr_node) * ret->sz); return (ret); } static void *xzmemdup(const void *ptr, size_t len) { /* always keeps a 0 at the end... */ void *ret = NULL; ret = checked_malloc(len+1); memcpy(ret, ptr, len); ((char*)ret)[len] = 0; return (ret); } static void xattr_add(xattrs_type *xattrs, const char *key, const char *val, size_t vsz) { if (xattrs->num >= xattrs->sz) { xattrs->sz <<= 1; xattrs->ents = checked_realloc(xattrs->ents, sizeof(xattr_node) * xattrs->sz); } xattrs->ents[xattrs->num].key = checked_strdup(key); xattrs->ents[xattrs->num].val = xzmemdup(val, vsz); xattrs->ents[xattrs->num].vsz = vsz; xattrs->num += 1; } void xattrs2line(db_line *line, int fd, const char *whoami) { xattrs_type *xattrs = NULL; ssize_t xret = -1; if ((ATTR(attr_xattrs)&line->attr)) { ssize_t xsz = 1024; char *xatrs = checked_malloc(xsz); #ifdef O_PATH char proc_self_path[256]; #endif while (((xret = flistxattr(fd, xatrs, xsz)) == -1) && (errno == ERANGE)) { xsz <<= 1; xatrs = checked_realloc(xatrs, xsz); } #ifdef O_PATH int fd_flags = fcntl(fd, F_GETFL); if (xret == -1 && errno == EBADF && fd_flags != -1 && fd_flags&O_PATH) { snprintf(proc_self_path, sizeof(proc_self_path), "/proc/self/fd/%d", fd); LOG_WHOAMI(LOG_LEVEL_DEBUG,"%s> flistxattr() failed: Bad file descriptor (emulating O_PATH support via '%s')", line->fullpath, proc_self_path); while (((xret = listxattr(proc_self_path, xatrs, xsz)) == -1) && (errno == ERANGE)) { xsz <<= 1; xatrs = checked_realloc(xatrs, xsz); } } #endif if (xret == -1) { switch (errno) { case ENOSYS: case ENOTSUP: LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> listxattr() failed to get list of extended attribute names: %s (disabling xattr attribute)", line->fullpath, strerror(errno)); break; default: log_msg(LOG_LEVEL_WARNING, "listxattr() failed to get list of extended attribute names for '%s': %s (disabling xattr attribute)", line->fullpath, strerror(errno)); } line->attr&=(~ATTR(attr_xattrs)); } else if (xret > 0) { const char *attr = xatrs; ssize_t asz = 1024; char *val = checked_malloc(asz); xattrs = xattr_new(); while (xret > 0) { size_t len = strlen(attr); ssize_t aret = 0; if (strncmp(attr, "user.", strlen("user.")) == 0 || strncmp(attr, "security.", strlen("security.")) == 0 || strncmp(attr, "trusted.", strlen("trusted.")) == 0 ) { #ifdef O_PATH if (fd_flags&O_PATH) { while (((aret = getxattr(proc_self_path, attr, val, asz)) == -1) && (errno == ERANGE)) { asz <<= 1; val = checked_realloc (val, asz); } } else { #endif while (((aret = fgetxattr(fd, attr, val, asz)) == -1) && (errno == ERANGE)) { asz <<= 1; val = checked_realloc (val, asz); } #ifdef O_PATH } #endif if (aret != -1) { xattr_add(xattrs, attr, val, aret); } else { log_msg(LOG_LEVEL_WARNING, "lgetxattr() failed to get value of extended attribute '%s' for '%s': %s (discarding extended attribute)", attr, line->fullpath, strerror(errno)); } } attr += len + 1; xret -= len + 1; } free(val); } else { LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> llistxattr() returned empty list of extended attribute names", line->fullpath); } free(xatrs); } line->xattrs = xattrs; } #endif #ifdef WITH_SELINUX void selinux2line(db_line *line, int fd, const char *whoami) { char *cntx = NULL; if ((ATTR(attr_selinux)&line->attr)) { if (fgetfilecon_raw(fd, &cntx) == -1) { /* files opened via O_PATH are supported since libselinux 3.4. */ switch (errno) { case ENODATA: case ENOTSUP: LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> fgetfilecon_raw() failed to get SELinux security context: %s (disabling selinux attribute)", line->fullpath, strerror(errno)); break; default: log_msg(LOG_LEVEL_WARNING, "fgetfilecon_raw() failed to get SELinux security context for '%s': %s (disabling selinux attribute)", line->fullpath, strerror(errno)); } line->attr&=(~ATTR(attr_selinux)); line->cntx = NULL; return; } else { line->cntx = checked_strdup(cntx); freecon(cntx); } } else { line->cntx = NULL; } } #endif #ifdef WITH_E2FSATTRS void e2fsattrs2line(db_line* line, int fd, const char *whoami) { unsigned long flags; if (ATTR(attr_e2fsattrs)&line->attr) { if (getflags(fd, &flags) == 0) { line->e2fsattrs=flags; } else { switch (errno) { case ENOTTY: case ENOTSUP: LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> fgetflags() failed to get file attributes: %s (disabling e2fsattrs attribute)", line->fullpath, strerror(errno)); break; default: log_msg(LOG_LEVEL_WARNING, "fgetflags() failed to get file attributes for '%s': %s (disabling e2fsattrs attribute)", line->fullpath, strerror(errno)); } line->attr&=(~ATTR(attr_e2fsattrs)); line->e2fsattrs=0; } } else { line->e2fsattrs=0; } } #endif #ifdef WITH_CAPABILITIES void capabilities2line(db_line* line, int fd, const char *whoami) { cap_t caps; char *txt_caps; if ((ATTR(attr_capabilities)&line->attr)) { caps = cap_get_fd(fd); #ifdef O_PATH int fd_flags = fcntl(fd, F_GETFL); if (caps == NULL && errno == EBADF && fd_flags != -1 && fd_flags&O_PATH) { char proc_self_path[256]; snprintf(proc_self_path, sizeof(proc_self_path), "/proc/self/fd/%d", fd); LOG_WHOAMI(LOG_LEVEL_DEBUG,"%s> cap_get_fd() failed: Bad file descriptor (emulating O_PATH support via '%s')", line->fullpath, proc_self_path); caps = cap_get_file(proc_self_path); } #endif if (caps != NULL) { txt_caps = cap_to_text(caps, NULL); if (txt_caps == NULL) { log_msg(LOG_LEVEL_WARNING, "cap_to_text() failed to get textual representation for capability state of '%s': %s (disabling caps attribute)", line->fullpath, strerror(errno)); line->attr&=(~ATTR(attr_capabilities)); line->capabilities=NULL; } else { line->capabilities = checked_strdup(txt_caps); cap_free(txt_caps); } cap_free(caps); } else { switch (errno) { case ENOSYS: case ENODATA: case ENOTSUP: LOG_WHOAMI(LOG_LEVEL_DEBUG, "%s> cap_get_fd() failed to get capability state: %s (disabling e2fsattrs attribute)", line->fullpath, strerror(errno)); break; default: log_msg(LOG_LEVEL_WARNING, "cap_get_fd() failed to get capability state for '%s': %s (disabling caps attribute)", line->fullpath, strerror(errno)); } line->attr&=(~ATTR(attr_capabilities)); line->capabilities=NULL; } } else { line->capabilities=NULL; } } #endif aide-0.19/src/conf_yacc.y0000644000175000017500000002147014774237261010754 %code requires { #include "conf_ast.h" } %{ /* * AIDE (Advanced Intrusion Detection Environment) * * Copyright (C) 1999-2006, 2010-2013, 2015-2016, 2019-2025 Rami Lehti, * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include "attributes.h" #include #include #include "log.h" #include "rx_rule.h" #include "conf_lex.h" DB_ATTR_TYPE retval=0; #include "conf_ast.h" extern int conflex(void); void conferror(ast**, const char *); %} %union { char* s; config_option option; bool_operator operator; ast* ast; if_condition* if_cond; bool_expression* bool_expr; attribute_expression* attr_expr; restriction_expression* rs_expr; ft_restriction_expression* ft_rs_expr; string_expression* string_expr; } %token TDEFINE "@@define" %token TUNDEFINE "@@undef" %token TIFDEF "@@ifdef" %token TIFNDEF "@@ifndef" %token TIFNHOST "@@ifnhost" %token TIFHOST "@@ifhost" %token TIF "@@if" %token TBOOLNOT "not" %token TBOOLFUNC "boolean function" %token TBOOLOP "boolean operator" %token TELSE "@@else" %token TENDIF "@@endif" %token TINCLUDE "@@include" %token TXINCLUDE "@@x_include" %token TSETENV "@@x_include_setenv" %token TGROUP "group name" %token TSTRING "string" %token TEXPR "group" %token TVARIABLE "variable name" %token TSPACE "whitespace" %token TNEWLINE "new line" /* File rule */ %token TSELRXRULE "regular rule" %token TEQURXRULE "equals rule" %token TRECNEGRXRULE "recursive negative rule" %token TNONRECNEGRXRULE "non-recursive negative rule" %token