From beef8683638cdd0d333c97e4f51c5749af195b30 Mon Sep 17 00:00:00 2001 From: Raphael Date: Sun, 2 Sep 2018 21:16:16 +0200 Subject: Exclude temp dirs from reporting (directories with sticky bit +t) --- src/msec_find/find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/msec_find/find.c') diff --git a/src/msec_find/find.c b/src/msec_find/find.c index a4ecff7..a2c90ef 100644 --- a/src/msec_find/find.c +++ b/src/msec_find/find.c @@ -117,7 +117,7 @@ static int traverse(const char *file, const struct stat *sb, int flag, struct FT * Is world writable check. */ if ((sb->st_mode & 0002) && !(S_ISSOCK(sb->st_mode)) && !(S_ISFIFO(sb->st_mode)) - && !(S_ISCHR(sb->st_mode)) && !(S_ISBLK(sb->st_mode))) + && !(S_ISCHR(sb->st_mode)) && !(S_ISBLK(sb->st_mode)) && !((sb->st_mode & S_ISVTX) == S_ISVTX)) fprintf(writable_fd, "%s\n", file); /* -- cgit v1.2.1