|
|
|
@ -101,12 +101,14 @@ int treewalk(const char *dirname, struct cl_node *root, const struct passwd *use |
|
|
|
|
|
|
|
|
|
|
|
/* stat the file */ |
|
|
|
/* stat the file */ |
|
|
|
if(lstat(fname, &statbuf) != -1) { |
|
|
|
if(lstat(fname, &statbuf) != -1) { |
|
|
|
if(S_ISDIR(statbuf.st_mode) && !S_ISLNK(statbuf.st_mode) && recursion) |
|
|
|
if(S_ISDIR(statbuf.st_mode) && !S_ISLNK(statbuf.st_mode) && recursion) { |
|
|
|
treewalk(fname, root, user, opt, limits, options); |
|
|
|
if(treewalk(fname, root, user, opt, limits, options) == 1) |
|
|
|
else |
|
|
|
scanret++; |
|
|
|
|
|
|
|
} else { |
|
|
|
if(S_ISREG(statbuf.st_mode)) |
|
|
|
if(S_ISREG(statbuf.st_mode)) |
|
|
|
scanret += scanfile(fname, root, user, opt, limits, options); |
|
|
|
scanret += scanfile(fname, root, user, opt, limits, options); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
free(fname); |
|
|
|
free(fname); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|