summaryrefslogtreecommitdiff
path: root/update-ca.c
diff options
context:
space:
mode:
Diffstat (limited to 'update-ca.c')
-rw-r--r--update-ca.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/update-ca.c b/update-ca.c
index 641fd64..0260f83 100644
--- a/update-ca.c
+++ b/update-ca.c
@@ -191,12 +191,13 @@ static void proc_localglobaldir(const char *fullpath, struct hash *h, int tmpfil
fprintf(stderr, "Warning! Cannot hash: %s\n", fullpath);
if (!copyfile(fullpath, tmpfile_fd))
fprintf(stderr, "Warning! Cannot copy to bundle: %s\n", fullpath);
+ write(tmpfile_fd, "\n", 1);
free(actual_file);
}
static void proc_etccertsdir(const char* fullpath, struct hash* h, int tmpfile_fd)
{
- char linktarget[SYMLINK_MAX];
+ char linktarget[PATH_MAX];
ssize_t linklen;
linklen = readlink(fullpath, linktarget, sizeof(linktarget)-1);
@@ -260,7 +261,7 @@ static bool dir_readfiles(struct hash* d, const char* path,
DIR *dp = opendir(path);
if (!dp)
return false;
-
+
struct dirent *dirp;
while ((dirp = readdir(dp)) != NULL) {
if (str_begins(dirp->d_name, "."))
@@ -330,7 +331,7 @@ int main(int a, char **v)
free(tmpfile);
/* Execute run-parts */
- static const char *run_parts_args[] = { "run-parts", RUNPARTSDIR, 0 };
+ static char *const run_parts_args[] = { "run-parts", RUNPARTSDIR, 0 };
execve("/usr/bin/run-parts", run_parts_args, NULL);
execve("/bin/run-parts", run_parts_args, NULL);
perror("run-parts");