<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>50748</bug_id>
          
          <creation_ts>2024-06-25 17:11:26 +0300</creation_ts>
          <short_desc>AIDE does not statring initialization via aide --init due errors in config file</short_desc>
          <delta_ts>2024-06-28 22:19:53 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>aide</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Constantin">constacalm</reporter>
          <assigned_to name="Vitaly Chikunov">vt</assigned_to>
          <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>248159</commentid>
    <comment_count>0</comment_count>
    <who name="Constantin">constacalm</who>
    <bug_when>2024-06-25 17:11:26 +0300</bug_when>
    <thetext>Consider to correct AIDE default config file (/etc/aide.conf), due some errors there.

Steps to reproduce:

1. Install aide (# apt-get install aide)
2. Run initialization of integrity database (# aide --init)

Get an error, i.e.:

ERROR: /etc/aide.conf:7: unexpected character: &apos; &apos; (line: &apos;database in = file:@@{DBDIR}/aide.db.gz&apos;) 

and so on.

Most likely, in this version of AIDE config file it does not recognize some spaces, i.e., for example all includes like:

database_in     = file:@@{DBDIR}/aide.db.gz

must be changed into:

database_in=file:@@{DBDIR}/aide.db.gz

And includes with comma:

BINLIB=p+i+n+u+g+s+b+m+c+acl+caps,sha512

must be changed into:

BINLIB=p+i+n+u+g+s+b+m+c+acl+caps+sha512

Example of a config file:

### AIDE Example Configuration

## Global settings

@@define DBDIR  /var/lib/aide
@@define LOGDIR /var/log/aide
database_in=file:@@{DBDIR}/aide.db.gz
database_out=file:@@{DBDIR}/aide.db.new.gz
gzip_dbout=yes
report_url=stdout

## Rules

# File attributes::
#   a:          atime
#   b:          block count
#   c:          ctime
#   ftype:      file type (regular, symlink, &amp;c.)
#   g:          group
#   i:          inode
#   l:          symlink name
#   m:          mtime
#   n:          number of hard links
#   p:          permissions
#   s:          size
#   u:          user
# Extended attributes::
#   acl:        POSIX Access Control Lists
#   caps:       Capabilities
#   e2fsattrs:  ext2 attributes
#   selinux:    SELinux security context
#   xattrs:     eXtended file attributes
# Special groups::
#   ANF:        allow new files
#   ARF:        allow removed files
#   I:          ignore changed filename: l+p+i+n+u+g+X
#   S:          check for growing size
# Compound groups::
#   (assuming &apos;common&apos; attrs are: p+ftype+i+n+u+g)
#   &gt;:          Growing files: L+S
#   E:          Empty group
#   H:          All hashsums: crc32+gost+sha256+sha512+stribog256+stribog512
#   L:          Links: I+ftype
#   R:          Files: L+s+m+c+md5
#   X:          Extra attributes: acl+selinux+xattrs+e2fsattrs+caps
# Hashsums::
#   crc32:      crc32 checksum
#   gost:       GOST R 34.11-94
#   sha256:     sha256
#   sha512:     sha512
#   stribog256: GOST R 34.11-2012, 256 bit
#   stribog512: GOST R 34.11-2012, 512 bit
# Restriction file types::
#   b:          restrict rule to block devices
#   c:          restrict rule to character devices
#   d:          restrict rule to directories
#   f:          restrict rule to regular files
#   l:          restrict rule to symbolic links
#   p:          restrict rule to FIFO files
#   s:          restrict rule to UNIX sockets

# Custom rules

BINLIB=p+i+n+u+g+s+b+m+c+acl+caps+sha512
CONFFILES= p+i+n+u+g+s+b+m+c+acl+sha512
LOGS=p+i+n+u+g+S
DEVICES=p+i+n+u+g+s+b+c+sha512
DATABASES=p+n+u+g
STATICDIR=p+i+n+u+g
MANPAGES=p+i+n+u+g+s+b+m+c+sha512

# Directories and files
# NB! Just am example not intended for serious security

/boot           BINLIB
/etc            CONFFILES
/bin            BINLIB
/sbin           BINLIB
/lib            BINLIB
/usr            BINLIB
/opt            BINLIB
/var/log        LOGS
/dev            DEVICES
/var/log/audit  LOGS
#=/dev/pts
=/var/run       STATICDIR
/var/lib        DATABASES
=/proc          STATICDIR
=/dev/shm       STATICDIR
=/run           STATICDIR
=/run/media     STATICDIR
=/var/media     STATICDIR
=/mnt           STATICDIR</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>248164</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Chikunov">vt</who>
    <bug_when>2024-06-25 19:28:56 +0300</bug_when>
    <thetext>Thank you. Even though default `aide.conf` is not intended for real use it&apos;s would be useful to fix the syntax errors so users don&apos;t waste their time on them.

New package is prepared in task 351558 but is not committed into Sisyphus yet.
If you with you can test it with

    # apt-repo test 351558

Thanks,</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>248242</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2024-06-27 11:58:49 +0300</bug_when>
    <thetext>aide-0.18.8-alt2 -&gt; sisyphus:

 Tue Jun 25 2024 Vitaly Chikunov &lt;vt@altlinux&gt; 0.18.8-alt2
 - Fix syntax errors in default aide.conf (ALT#50748).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>248318</commentid>
    <comment_count>3</comment_count>
    <who name="Constantin">constacalm</who>
    <bug_when>2024-06-28 22:19:53 +0300</bug_when>
    <thetext>Thank you.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>