svn commit: r251167 - head/usr.bin/kdump

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu May 30 21:59:30 UTC 2013


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);


More information about the svn-src-all mailing list