2 * support for directory recursion if a filename is a directory and ends
3 with a '/' (request from doood@bigpond.com)
8 * new parseargv() function
9 * contrib/bgm.sh can append the ouput of a command to the message body
10 * a small automake fix
13 * manual page cleanups
14 * install binary to bindir and not sbindir and manual page to section 1
17 * fix for stupid use of sprintf() causing segfault on some systems
20 * use sprintf(NULL, ...) to get buffer size of log file (fixes MacOS X)
21 * the time difference format has changed to type:days:hours:mins:secs
22 where type is the latest change being one of M, A or C for atime, mtime
25 * contrib/bgm.sh exits with the return value from `mail'
26 * contrib/bgm.sh uses $LOGNAME@localhost as the default address
28 * added pid options -p and -q
29 * can specify log and pid files with BUBBLEGUM_LOG and BUBBLEGUM_PID
31 * if no logging or command is specified then show usage
32 * use err[x]() and warn[cx]() instead of ERROR macro
33 * added option -M to check md5 checksums for systems with libmd
34 * initialize change type enumeration to zero rather than one
35 * freopen() std[in/out/err] to /dev/null
41 * update the daemon pid for logging after the initial fork()
42 * if LINE_MAX isn't defined use _POSIX2_LINEMAX
44 * when logging to syslogd log the invoking username on startup
45 * ignore signals when others are busy (SIG_IGN)
46 * fork command twice to avoid zombies
47 * restore signal default actions in the child process
50 * fix for contrib/bgm.sh (better, see bgm.sh -h)
51 * only call getpid() once
52 * move file stuff to file.c
53 * can escape double quotes and backslash in a command line (\" and \\)
54 * use SA_NOCLDWAIT only on systems that support it
55 * fix for linux zombie processes
56 * fix for linux segfault when specifying -e
60 * S_ISWHT() isn't #defined in Linux
63 * added command expansions %F and %m to show filetype and permissions
64 * dont try to chdir() before running command (no need)
65 * logging errors is now optional via the -E command line option
66 * added command line option -A which is a shortcut -amcE
67 * bugfix for options -m and -c
68 * dont show to exit status of fork()ed commands anymore (not reliable) and
69 sa_flags = SA_NOCLDWAIT
70 * a better manual page
73 * SIGHUP will only reload a file list without resetting changed bits on
74 old files or resetting command runs
75 * only fork once and use execvp() rather than system() to run a command
76 (your old command using stdin/out/pipe wont work anymore. use a shell
78 * unknowns are marked with "-" rather than " " (NONE_STR)
79 * check for duplicate files when [re]loading a file list
82 * SIGHUP reloads a filelist (resets changed bits and command runs, but not
83 total command runs), SIGUSR1 resets changed bits, SIGUSR2 resets changed
84 bits and resets both command runs and total runs
85 * better memory management (hopefully)
86 * portability fix for bitfield
87 * added command expansion '%r' to show run number and total (ie: 1/4)
88 * added command expansion '%i' to show time difference
89 * miscellaneous cleanups and bugfixes
90 * renamed contrib/bgmailer.sh to contrib/bgm.sh
93 * the log format has changed to log all changes on one line with the time
94 difference being the latest change if multiple changes are detected
95 * a log level of zero will disable regular file logging, log level one
96 will log only the first change of a file, and log level 2 will log all
97 changes (the new default; level 3 is gone)
98 * added logging the type of change if available (user, permissions, etc)
100 * added '%y' command expansion for type of change
101 * added '%s' command expansion to show daemon status
102 * added '%d' command expansion to show the time of when the change was
104 * updated contrib/bgmailer.sh
107 * chdir() before grandchild fork()
108 * dont exit if chdir() fails
109 * setpriority() before filling filelist structure
110 * cleaner changelog() function
111 * added 'dont follow links' option -k
112 * when an error dissappears reset filelist->staterrno
115 * Makefile fix for installing manual page
116 * manual page cleanups
117 * sending signal SIGALRM will expire a timer and force the next check
118 * dont block SIGBUS, SIGILL and SIGFPE
119 * chdir() to working directory before system() of command (-e)
120 * make sure logfile can be opened (-l)
123 * detach from terminal after forking (setsid())
124 * use select() instead of sleep()
125 * seconds must be greater than zero
126 * _exit() from command after fork() rather than exit()
129 * initialize struct sigaction (fixes signal handler)
130 * really fix zombie processes (-e)
131 * signal SIGUSR1 will reload the file specified with -f and reset command
132 runs and changed bits for each file
133 * signal SIGUSR2 will reset only the filelist->changed bits for all files
134 (useful for log levels 1 and 2)
135 * use is_file() to make sure filename (-f) is a file
136 * added option '-n' to set niceless level of daemon and command (-e)
137 * added a manual page
140 * fix for memory corruption when getting filelist
141 * dont assume change times are greater than the previous
142 * added total runs option '-t'
143 * logging displays difference of last change
144 * better mail wrapper in contrib/bgmailer.sh
147 * Makefile fix for Linux (-D_GNU_SOURCE)
148 * dropped time spec option '-t' (use find)
149 * flists->changes is now global (saves a little bit of memory with lots of
151 * dynamically allocate flists->filename to save memory
152 * when a stat() error occurs, log the error once unless errno differs from
154 * the changes expansion '%c' format for more than one change is comma
155 separated (fixes parsing for command '-e')
156 * added option '-s' to enable logging to syslogd(8) with facility DAEMON
157 and priority NOTICE (this disables logging to logfile)
161 * the default logfile is stored in users home directory
162 * added option -# (1-3) to define the level of logging
163 * files are checked based on the time of execution until a change is
164 detected, then the file is checked against the last change
165 * if an error occurs while stat()'ing, dont check the file anymore
166 * renamed REMOVED change to ERROR (will log the error)
167 * added expansion '%e' for error information
168 * added expansion '%b' for base time (time of comparison)
169 * cleanups and miscellaneous improvements
172 * fixed zombie processes (-e)
173 * the full path of filenames are used when logging and with %f
174 * added expansion %p for daemon PID
175 * better logit() function