From 566d2cada7e05d1327c537c9bcdb228a6fa64481 Mon Sep 17 00:00:00 2001 From: benno Date: Mon, 29 May 2017 12:56:26 +0000 Subject: [PATCH] sync proc.c changes from relayd/httpd --- usr.sbin/snmpd/proc.c | 10 +++++----- usr.sbin/switchd/proc.c | 10 +++++----- usr.sbin/vmd/proc.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/usr.sbin/snmpd/proc.c b/usr.sbin/snmpd/proc.c index 78dcba92615..40c19f6f5e8 100644 --- a/usr.sbin/snmpd/proc.c +++ b/usr.sbin/snmpd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.23 2017/01/17 22:10:56 krw Exp $ */ +/* $OpenBSD: proc.c,v 1.24 2017/05/29 12:56:26 benno Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter @@ -505,7 +505,7 @@ proc_sig_handler(int sig, short event, void *arg) /* ignore */ break; default: - fatalx("proc_sig_handler: unexpected signal"); + fatalx("%s: unexpected signal", __func__); /* NOTREACHED */ } } @@ -545,9 +545,9 @@ proc_run(struct privsep *ps, struct privsep_proc *p, root = pw->pw_dir; if (chroot(root) == -1) - fatal("proc_run: chroot"); + fatal("%s: chroot", __func__); if (chdir("/") == -1) - fatal("proc_run: chdir(\"/\")"); + fatal("%s: chdir(\"/\")", __func__); privsep_process = p->p_id; @@ -556,7 +556,7 @@ proc_run(struct privsep *ps, struct privsep_proc *p, if (setgroups(1, &pw->pw_gid) || setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) - fatal("proc_run: cannot drop privileges"); + fatal("%s: cannot drop privileges", __func__); event_init(); diff --git a/usr.sbin/switchd/proc.c b/usr.sbin/switchd/proc.c index 55ed09e4275..94ee34bfe9f 100644 --- a/usr.sbin/switchd/proc.c +++ b/usr.sbin/switchd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.11 2017/01/17 22:10:56 krw Exp $ */ +/* $OpenBSD: proc.c,v 1.12 2017/05/29 12:56:26 benno Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter @@ -505,7 +505,7 @@ proc_sig_handler(int sig, short event, void *arg) /* ignore */ break; default: - fatalx("proc_sig_handler: unexpected signal"); + fatalx("%s: unexpected signal", __func__); /* NOTREACHED */ } } @@ -545,9 +545,9 @@ proc_run(struct privsep *ps, struct privsep_proc *p, root = pw->pw_dir; if (chroot(root) == -1) - fatal("proc_run: chroot"); + fatal("%s: chroot", __func__); if (chdir("/") == -1) - fatal("proc_run: chdir(\"/\")"); + fatal("%s: chdir(\"/\")", __func__); privsep_process = p->p_id; @@ -556,7 +556,7 @@ proc_run(struct privsep *ps, struct privsep_proc *p, if (setgroups(1, &pw->pw_gid) || setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) - fatal("proc_run: cannot drop privileges"); + fatal("%s: cannot drop privileges", __func__); event_init(); diff --git a/usr.sbin/vmd/proc.c b/usr.sbin/vmd/proc.c index 1c2a044ade6..183db93a678 100644 --- a/usr.sbin/vmd/proc.c +++ b/usr.sbin/vmd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.13 2017/01/17 21:51:01 krw Exp $ */ +/* $OpenBSD: proc.c,v 1.14 2017/05/29 12:56:26 benno Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter @@ -505,7 +505,7 @@ proc_sig_handler(int sig, short event, void *arg) /* ignore */ break; default: - fatalx("proc_sig_handler: unexpected signal"); + fatalx("%s: unexpected signal", __func__); /* NOTREACHED */ } } @@ -545,9 +545,9 @@ proc_run(struct privsep *ps, struct privsep_proc *p, root = pw->pw_dir; if (chroot(root) == -1) - fatal("proc_run: chroot"); + fatal("%s: chroot", __func__); if (chdir("/") == -1) - fatal("proc_run: chdir(\"/\")"); + fatal("%s: chdir(\"/\")", __func__); privsep_process = p->p_id; @@ -556,7 +556,7 @@ proc_run(struct privsep *ps, struct privsep_proc *p, if (setgroups(1, &pw->pw_gid) || setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) - fatal("proc_run: cannot drop privileges"); + fatal("%s: cannot drop privileges", __func__); event_init(); -- 2.20.1