Re: [Integrit-users] Exit code bug
Brought to you by:
ecashin
From: Thorsten K. <tho...@th...> - 2007-05-20 01:27:30
|
* Yuri D'Elia (Sun, 20 May 2007 01:50:38 +0200) > In article <f2le4r$6pa$1...@se...>, > Thorsten Kampe <tho...@th...> wrote: > > > Hi, > > > > Integrit 4 returns the wrong exit code (0) when a file is missing. > > > > Integrit returns 0 when the file is missing or when not missing > > > > Integrit returns 1 when the file has changed. > > > > Obviously it doesn't (or shouldn't matter) whether a file has changed > > or has completely vanished. From a "file integrity checker" point of > > view both cases should be "file has changed" scenarios and should > > return "1". > > Can you provide a sample configuration an the steps needed to reproduce > the problem? [integrit version 4.0] % /usr/local/sbin/integrit -qucC ~/.integrit/integrit-g.conf; echo $? changed: /cygdrive/g/autorun.inf p(0644:0600) integrit: current-state db RMD160 -------------- integrit: 15b2288b4681af00603cedade583890685e41bf0 /home/thorsten/.integrit/current.cdb 1 ## autorun.inf has changed and integrit exits correctly with "1" % rm /cygdrive/g/autorun.inf rm: remove regular file `/cygdrive/g/autorun.inf'? y removed `/cygdrive/g/autorun.inf' % /usr/local/sbin/integrit -qucC ~/.integrit/integrit-g.conf; echo $? missing: /cygdrive/g/autorun.inf p(644) u(1038) g(513) z(344) m (20070519-154738) missing: /cygdrive/g/autorun.inf s (cc03ded778aa949f68885344316af6cd7b8bc7d3) integrit: current-state db RMD160 -------------- integrit: 294d1c460dcda98d9c6f73c3ad582b4ac7a8694c /home/thorsten/.integrit/current.cdb 0 ## After removing autorun.inf (which is the only file monitored) ## intergrit exits with "0" ## my ~/.integrit/integrit-g.conf root=/cygdrive/g known=/home/thorsten/.integrit/known-g.cdb current=/home/thorsten/.integrit/current.cdb !/cygdrive/g/cygwin !/cygdrive/g/data !/cygdrive/g/documents !/cygdrive/g/program\ files !/cygdrive/g/recycled !/cygdrive/g/system !/cygdrive/g/tmp !/cygdrive/g/cv-thorsten_kampe.doc !/cygdrive/g/launchu3.exe !/cygdrive/g/polish_conversation.abw !/cygdrive/g/pstart.exe !/cygdrive/g/pstart.xml !/cygdrive/g/thorsten.tc !/cygdrive/g/thorsten.vol !/cygdrive/g/tree.far =/cygdrive/g/autorun.inf |