Skip to content

Commit f52c72b

Browse files
committed
Added gpg scripts to contrib
1 parent b745e55 commit f52c72b

File tree

5 files changed

+81
-2
lines changed

5 files changed

+81
-2
lines changed

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
* Remove russian translations; they are out of date and there is no static version of gettext available
33
* Do not stop parsing directory at unescaped .
44
* Fix "make dist" and "make check"
5+
* Added gpg scripts to contrib
56
* Released version 0.11-rc2
7+
* Changed version to post-0.11-rc2
68

79
2005-10-30 Richard van den Berg <[email protected]>
810
* Warn if 'I' and 'c' are used together

Todo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ Rewrite for smaller memory footprint.
1111
Localization
1212
Relative paths in databases
1313
Checksum of the binary at the start of the report
14-
PGP support
1514
@@ifdef foo || ( bar && baz )

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
dnl Initialize autoconf/automake
33
AC_INIT(src/aide.c)
4-
AM_INIT_AUTOMAKE(aide, "0.11-rc2")
4+
AM_INIT_AUTOMAKE(aide, "post-0.11-rc2")
55

66
dnl The name of the configure h-file.
77
AM_CONFIG_HEADER(config.h)

contrib/gpg_check.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# $Id$
4+
5+
# aide check script
6+
# Written by: charlie heselton
7+
# Email: echo "hfouvyAdpy/ofu" | perl -pe 's/(.)/chr(ord($1)-1)/ge'
8+
# 09/23/2005
9+
10+
# Set up some variables
11+
DBDIR="/your/aide/db/directory"
12+
DBFILE="${DBDIR}/aide.db"
13+
ENC_DBFILE="${DBDIR}/aide.db.gpg"
14+
15+
# make the assumption that the database exists and is encrypted
16+
# but test for it ;-)
17+
[[ -f ${ENC_DBFILE} ]] && /usr/bin/gpg --batch -d ${ENC_DBFILE} > ${DBFILE}
18+
rm -f ${ENC_DBFILE}
19+
20+
# (for now, we'll assume that encrypting the file includes an integrity check )
21+
# Run the check.
22+
/usr/bin/aide -C > /tmp/aide_check.out 2>&1
23+
24+
# mail out the results
25+
/usr/bin/cat /tmp/aide_check.out | /usr/bin/mutt -s "AIDE Check for `date`" [email protected]
26+
27+
# cleanup
28+
# if the mail was successful, delete the output file
29+
if [ $? -eq 0 ]
30+
then
31+
rm -f /tmp/aide_check.out
32+
fi
33+
34+
# re-encrypt the database and delete the unencrypted version
35+
/usr/bin/gpg --batch -se -r gentoo_root ${DBFILE}
36+
rm -f ${DBFILE}

contrib/gpg_update.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
# $Id$
4+
5+
# aide update script
6+
# Written by: charlie heselton
7+
# Email: echo "hfouvyAdpy/ofu" | perl -pe 's/(.)/chr(ord($1)-1)/ge'
8+
# 09/23/2005
9+
10+
DBDIR="/etc/aide/db"
11+
DBFILE="${DBDIR}/aide.db"
12+
ENC_DBFILE="${DBDIR}/aide.db.gpg"
13+
14+
# make the assumption that the database exists and is encrypted
15+
# but test for it ;-)
16+
[[ -f ${ENC_DBFILE} ]] && /usr/bin/gpg --batch -d ${ENC_DBFILE} > ${DBFILE}
17+
rm -f ${ENC_DBFILE}
18+
19+
# (for now, we'll assume that encrypting the file includes an integrity check )
20+
# Run the update.
21+
/usr/bin/aide --update > /tmp/aide_update.out 2>&1
22+
23+
# mail out the results
24+
# set the "Reply-to" address
25+
26+
export REPLYTO
27+
# send the mail
28+
/usr/bin/cat /tmp/aide_update.out | /usr/bin/mutt -s "AIDE Update for `date`" [email protected]
29+
30+
# cleanup
31+
# if the mailing was successful then delete the output file
32+
if [ $? -eq 0 ]
33+
then
34+
rm -f /tmp/aide_update.out
35+
fi
36+
37+
# move the aide.db.new file to the aide.db
38+
mv ${DBDIR}/aide.db.new ${DBFILE}
39+
40+
# encrypt the new db file and remove the unencrypted version
41+
/usr/bin/gpg --batch -se -r gentoo_root ${DBFILE}
42+
rm -f ${DBFILE}

0 commit comments

Comments
 (0)