Also log when set[ug]id program is owned by us
Log as info instead of warning, but still log.
@@ -417,14 +417,23 @@ static int record_shebangs(struct Process *process, const char *exec_target)
}
else
{
- if( (statbuf.st_mode & 04000 == 04000)
- && (statbuf.st_uid != getuid()) )
+ if(statbuf.st_mode & 04000 == 04000)
+ {
+ if(statbuf.st_uid != getuid())
{
log_warn(process->tid,
- "executing set-uid binary! For security, Linux "
- "will not give the process any\nprivileges from "
- "set-uid while it is being traced. This will "
- "probably break\nwhatever you are tracing.");
+ "executing set-uid binary! For security, "
+ "Linux will not give the process any\n"
+ "privileges from set-uid while it is being "
+ "traced. This will probably break\n"
+ "whatever you are tracing.");
+ }
+ else
+ {
+ log_info(process->tid,
+ "binary has set-uid bit set, not a problem "
+ "because it is owned by our user");
+ }
}
if(statbuf.st_mode & 02000 == 02000)
{
@@ -467,6 +476,12 @@ static int record_shebangs(struct Process *process, const char *exec_target)
"traced. This will probably break\n"
"whatever you are tracing.");
}
+ else
+ {
+ log_info(process->tid,
+ "binary has set-gid bit set, not a problem "
+ "because it is in one of our groups");
+ }
}
}
return 0;
