From a5981b39a46415726d46b58d3a1d670fb3aefe17 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 18 Jan 2024 20:01:48 +0000 Subject: [PATCH] Fix deleting temporary directories --- annocheck/annocheck.c | 4 ++++ annocheck/annocheck.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/annocheck/annocheck.c b/annocheck/annocheck.c index 119a28f..874d197 100644 --- a/annocheck/annocheck.c +++ b/annocheck/annocheck.c @@ -545,6 +545,10 @@ process_rpm_file (const char * filename) free (fname); free (pname); + /* Make sre that we have write permission on all of the files and directories. */ + command = concat ("chmod -R u+w ", dirname, NULL); + if (system (command)) + einfo (WARN, "Failed to give write permission to %s and its contents", dirname); /* Delete the temporary directory. */ command = concat ("rm -fr ", dirname, NULL); if (system (command)) diff --git a/annocheck/annocheck.h b/annocheck/annocheck.h index 521f4d0..f0b6153 100644 --- a/annocheck/annocheck.h +++ b/annocheck/annocheck.h @@ -177,7 +177,8 @@ typedef struct checker void (* end_scan) (uint LEVEL, const char * DATAFILE); /* Pointer to internal data used by the annocheck framework. - This field should not be used by the checker. */ + This field should not be used by the checker. + Can be NULL. */ void * internal; } checker; -- 2.43.5