Public bug reported: Ubuntu version: 14.04 LTS (server) AIDE version: 0.16~a2.git20130520-2
EXPECTED RESULT =============== The daily cron job should excute properly, generating an email with the AIDE report for that day. ACTUALLY RESULT ============== The daily cron job fails with a bash "unbound variable" error. DESCRIPTION =============== I recently upgraded a machine from Ubuntu Server 12.04 LTS to Ubuntu Server 14.04 LTS. After the upgrade I noticed that the AIDE cronjob was failing with this error: ----- /etc/cron.daily/aide: /etc/cron.daily/aide: line 413: NF_ADD: unbound variable run-parts: /etc/cron.daily/aide exited with return code 1 ----- NF_ADD is explicity defined as an array, but on line 413 it would appear that a new element is trying to be added to the array based on the current count of the array: NF_ADD[${#NF_ADD[*]}]="$line" However, if the variable/array is empty, then referencing ${#NF_ADD[*]} produces an "unbound variable" error, and since line #3 of the script sets the -e option, bash will terminate executeion of the script upon encountering this error, meaning the AIDE cron.daily script fails to complete. The attached patch seems to have fixed the issue for me, though I really don't know if that is the correct fix, or if it might have other unintended consequences when run with different options or in a different environment. ** Affects: aide (Ubuntu) Importance: Undecided Status: New ** Tags: patch ** Patch added: "aide.patch" https://bugs.launchpad.net/bugs/1323827/+attachment/4120904/+files/aide.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1323827 Title: aide cronjob fails with bash unbound variable error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/aide/+bug/1323827/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs