summaryrefslogtreecommitdiffstats
path: root/usr.bin/kdump
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2013-05-30 21:59:29 +0000
committerpjd <pjd@FreeBSD.org>2013-05-30 21:59:29 +0000
commit921b222c4dc2f554a67a1a7f4c4bf5d604e520b2 (patch)
tree26cd13bf14b863b8ebf07e4eca285965103added /usr.bin/kdump
parentd759b47c51688fe20c72b753a9a40676d93ba45b (diff)
downloadFreeBSD-src-921b222c4dc2f554a67a1a7f4c4bf5d604e520b2.zip
FreeBSD-src-921b222c4dc2f554a67a1a7f4c4bf5d604e520b2.tar.gz
If the -r option is given we cannot enter capability mode.
The option tells kdump to convert numeric UIDs and GIDs into user and group names plus to convert times and dates into locallized versions. This all needs opening various files at various occasions.
Diffstat (limited to 'usr.bin/kdump')
-rw-r--r--usr.bin/kdump/kdump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index 0343a8c..7694cfe 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -240,8 +240,10 @@ main(int argc, char *argv[])
* XXXPJD: There should be strerror_init() and strsignal_init() in libc.
*/
(void)catopen("libc", NL_CAT_LOCALE);
- if (cap_enter() < 0 && errno != ENOSYS)
- err(1, "unable to enter capability mode");
+ if (resolv == 0) {
+ if (cap_enter() < 0 && errno != ENOSYS)
+ err(1, "unable to enter capability mode");
+ }
limitfd(STDIN_FILENO);
limitfd(STDOUT_FILENO);
limitfd(STDERR_FILENO);
OpenPOWER on IntegriCloud