mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 09:13:01 +02:00
Merge pull request #1208 from kernelkit/coverity-fixes
This commit is contained in:
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user