From: Maynard J. <may...@us...> - 2014-04-07 17:35:15
|
Daniel (or anyone else), do you see any reason why we shouldn't allow root to delete old jitdump files? ---------------------------------------------------------------- Allow root to remove old jitdump files from /tmp/.oprofile/jitdump Currently, the opjitconv program reqiress that the owner of an old jitdump file and the user running operf must be the same in order to allow deletion of said jitdump file. The root user should be allowed to do this, too, which is what this patch does. Signed-off-by: Maynard Johnson<may...@us...> Signed-off-by: Maynard Johnson <may...@us...> --- opjitconv/opjitconv.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/opjitconv/opjitconv.c b/opjitconv/opjitconv.c index 07b793a..3314c5c 100644 --- a/opjitconv/opjitconv.c +++ b/opjitconv/opjitconv.c @@ -574,7 +574,7 @@ static void _add_jitdumps_to_deletion_list(void * all_jitdumps, char const * jit continue; } close(fd); - if (geteuid() == mystat.st_uid) { + if (!non_root || geteuid() == mystat.st_uid) { struct jitdump_deletion_candidate * jdc = xmalloc(sizeof(struct jitdump_deletion_candidate)); jdc->name = xstrdup(dmpfile->name); -- 1.7.1 |