[dpkg] 190/200: s-s-d: Use correct struct kinfo_proc ruid submember on NetBSD
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:17:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository dpkg.
commit 12af640e1bcfa7dd1327ccd0e5d775d7ba1571d2
Author: Guillem Jover <guillem at debian.org>
Date: Sat Feb 11 22:39:56 2017 +0100
s-s-d: Use correct struct kinfo_proc ruid submember on NetBSD
---
debian/changelog | 2 ++
utils/start-stop-daemon.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 50fe9b8..05f96af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ dpkg (1.18.23) UNRELEASED; urgency=medium
- Rename err variable to ret in start-stop-daemon as the former is a
function on BSDs.
- Use 5-argument kvm_getprocs() call form on OpenBSD in start-stop-daemon.
+ - Use correct struct kinfo_proc ruid submember name on NetBSD in
+ start-stop-daemon.
* Perl modules:
- Do not special case EM_SPARC32PLUS for NetBSD in Dpkg::Shlibs::Objdump,
the code has been fixed in NetBSD as that situation could not happen.
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 6e6693a..ca18421 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -1765,6 +1765,8 @@ pid_is_user(pid_t pid, uid_t uid)
proc_uid = kp->p_ruid;
#elif defined(OS_DragonFlyBSD)
proc_uid = kp->kp_ruid;
+#elif defined(OS_NetBSD)
+ proc_uid = kp->kp_eproc.e_pcred.p_ruid;
#else
if (kp->kp_proc.p_cred)
kvm_read(kd, (u_long)&(kp->kp_proc.p_cred->p_ruid),
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list