svn commit: trunk/uClibc/utils

vapier at uclibc.org vapier at uclibc.org
Tue Apr 17 23:08:21 UTC 2007


Author: vapier
Date: 2007-04-17 16:08:20 -0700 (Tue, 17 Apr 2007)
New Revision: 18484

Log:
if chroot() failed, then reset "chroot_dir" to "." so that after we do our fallback chdir(), we dont continue to prefix the chroot path ... fixes `ldconfig.host -r some/dir/`

Modified:
   trunk/uClibc/utils/ldconfig.c


Changeset:
Modified: trunk/uClibc/utils/ldconfig.c
===================================================================
--- trunk/uClibc/utils/ldconfig.c	2007-04-17 22:31:01 UTC (rev 18483)
+++ trunk/uClibc/utils/ldconfig.c	2007-04-17 23:08:20 UTC (rev 18484)
@@ -918,6 +918,7 @@
 		if (chroot(chroot_dir) < 0) {
 			if (chdir(chroot_dir) < 0)
 				err(EXIT_FATAL, "couldn't chroot to %s (%s)", chroot_dir, strerror(errno));
+			chroot_dir = ".";
 		} else {
 			if (chdir("/") < 0)
 				err(EXIT_FATAL, "couldn't chdir to / (%s)", strerror(errno));




More information about the uClibc-cvs mailing list