Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bin/copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ static int copy(const char *src, const char *dst, const char *remote_user)
else {
snprintf(adjust, sizeof(adjust), "/tmp/%s.cfg", srcds->name);
fn = tmpfn = adjust;
remove(tmpfn);
(void)remove(tmpfn);
rc = systemf("sysrepocfg -d %s -X%s -f json", srcds->sysrepocfg, fn);
}

Expand Down Expand Up @@ -378,7 +378,7 @@ static int copy(const char *src, const char *dst, const char *remote_user)
}
snprintf(adjust, sizeof(adjust), "/tmp/%s", fn);
fn = tmpfn = adjust;
remove(tmpfn);
(void)remove(tmpfn);
} else {
fn = cfg_adjust(src, NULL, adjust, sizeof(adjust), sanitize);
if (!fn) {
Expand Down
2 changes: 1 addition & 1 deletion src/bin/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ char *cfg_adjust(const char *fn, const char *tmpl, char *buf, size_t len, int sa
}

/* If file exists, resolve symlinks and verify still in whitelist */
if (!access(fn, F_OK) && realpath(fn, resolved)) {
if (realpath(fn, resolved)) {
if (!path_allowed(resolved))
return NULL;
fn = resolved;
Expand Down