Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 May 2013 21:59:30 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251167 - head/usr.bin/kdump
Message-ID:  <201305302159.r4ULxUx3075097@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Thu May 30 21:59:29 2013
New Revision: 251167
URL: http://svnweb.freebsd.org/changeset/base/251167

Log:
  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.

Modified:
  head/usr.bin/kdump/kdump.c

Modified: head/usr.bin/kdump/kdump.c
==============================================================================
--- head/usr.bin/kdump/kdump.c	Thu May 30 21:57:40 2013	(r251166)
+++ head/usr.bin/kdump/kdump.c	Thu May 30 21:59:29 2013	(r251167)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305302159.r4ULxUx3075097>