"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "chkdirs.c" between
chkrootkit-0.53.tar.gz and chkrootkit-0.54.tar.gz

About: chkrootkit is a shell script that checks system binaries for rootkit modification.

chkdirs.c  (chkrootkit-0.53):chkdirs.c  (chkrootkit-0.54)
skipping to change at line 26 skipping to change at line 26
Changelog : Changelog :
2002/12/19 - Little port for *BSB and Solaris - Nelson Murilo 2002/12/19 - Little port for *BSB and Solaris - Nelson Murilo
2003/01/09 - More fix for Solaris - Nelson Murilo 2003/01/09 - More fix for Solaris - Nelson Murilo
2003/01/14 - HP-UX patch - Gerard Breiner 2003/01/14 - HP-UX patch - Gerard Breiner
2003/01/20 - NAME_MAX Fix by Hal Pomeranz 2003/01/20 - NAME_MAX Fix by Hal Pomeranz
2003/09/01 - BSDI port by Nelson Murilo and Thomas Davidson 2003/09/01 - BSDI port by Nelson Murilo and Thomas Davidson
2005/22/05 - APPLE test for limits.h included by Aaron Harwood 2005/22/05 - APPLE test for limits.h included by Aaron Harwood
2007/08/10 - strncpy used instead of strcpy - nm 2007/08/10 - strncpy used instead of strcpy - nm
2007/12/24 - change `c' variable type - NIDE, Naoyuki 2007/12/24 - change `c' variable type - NIDE, Naoyuki
2020/12/24 - Add a warning for btrfs (no inode usage)
*/ */
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defin ed(__sun) || defined (hpux) || defined (__bsdi__) || defined (bsdi) || defined ( __APPLE__) #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defin ed(__sun) || defined (hpux) || defined (__bsdi__) || defined (bsdi) || defined ( __APPLE__)
#include <limits.h> #include <limits.h>
#elif defined(__APPLE__) && defined(__MACH__) #elif defined(__APPLE__) && defined(__MACH__)
#include <sys/syslimits.h> #include <sys/syslimits.h>
#endif #endif
#include <stdio.h> #include <stdio.h>
skipping to change at line 164 skipping to change at line 165
/* Again, "linkcount" (the link count of the current directory) is set /* Again, "linkcount" (the link count of the current directory) is set
only if check_dir() is called recursively. Otherwise, we need to only if check_dir() is called recursively. Otherwise, we need to
stat the directory ourselves. stat the directory ourselves.
*/ */
if (!linkcount) { if (!linkcount) {
if (lstat(".", &statinfo)) { if (lstat(".", &statinfo)) {
fprintf(stderr, "lstat(%s): %s\n", fullpath, strerror(errno)); fprintf(stderr, "lstat(%s): %s\n", fullpath, strerror(errno));
goto abort; goto abort;
} }
linkcount = statinfo.st_nlink; linkcount = statinfo.st_nlink;
if (linkcount == 1)
{
fprintf(stderr, "WARNIING: It seems you are using BTRFS, if this is true
chkdirs can't help you to find hidden files/dirs\n");
goto abort;
}
} }
if (!(dirhandle = opendir("."))) { if (!(dirhandle = opendir("."))) {
fprintf(stderr, "opendir(%s): %s\n", fullpath, strerror(errno)); fprintf(stderr, "opendir(%s): %s\n", fullpath, strerror(errno));
goto abort; goto abort;
} }
numdirs = 0; numdirs = 0;
dl = (struct dirinfolist *)NULL; dl = (struct dirinfolist *)NULL;
while ((finfo = readdir(dirhandle))) { while ((finfo = readdir(dirhandle))) {
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)