summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:30:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:30:09 +0000
commit3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c (patch)
tree9532e637f47d6ff7246ccbabb62d4e2b4b5908df /src/common
parentAdding debian version 1.22.6. (diff)
downloaddpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.tar.xz
dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.zip
Merging upstream version 1.22.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/force.c1
-rw-r--r--src/common/force.h2
-rw-r--r--src/common/selinux.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/common/force.c b/src/common/force.c
index c4401f0..992dc93 100644
--- a/src/common/force.c
+++ b/src/common/force.c
@@ -254,7 +254,6 @@ get_force_string(void)
varbuf_add_char(&vb, ',');
varbuf_add_str(&vb, fip->name);
}
- varbuf_end_str(&vb);
return varbuf_detach(&vb);
}
diff --git a/src/common/force.h b/src/common/force.h
index c232c7f..c85544b 100644
--- a/src/common/force.h
+++ b/src/common/force.h
@@ -22,6 +22,8 @@
#ifndef DPKG_FORCE_H
#define DPKG_FORCE_H
+#include <stdbool.h>
+
#include <dpkg/dpkg.h>
#include <dpkg/options.h>
diff --git a/src/common/selinux.c b/src/common/selinux.c
index b5d29d8..2b0a8bc 100644
--- a/src/common/selinux.c
+++ b/src/common/selinux.c
@@ -130,7 +130,7 @@ dpkg_selabel_set_context(const char *matchpath, const char *path, mode_t mode)
/* Do nothing if we can't figure out what the context is, or if it has
* no context; in which case the default context shall be applied. */
ret = selabel_lookup_raw(sehandle, &scontext, matchpath, mode & S_IFMT);
- if (ret == -1 || (ret == 0 && scontext == NULL))
+ if (ret < 0 || (ret == 0 && scontext == NULL))
return;
ret = lsetfilecon_raw(path, scontext);