aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2015-01-14 17:30:03 -0600
committerPeter Seebach <peter.seebach@windriver.com>2015-01-14 17:34:41 -0600
commit09238273dacb81bbc92c7d42986ef4e5fadf4a86 (patch)
tree3baeaeb38ccda8fdefc9fe1e37d1750b4659bff0 /configure
parent364c4a055477705a5370f59b9260226bb262a6db (diff)
downloadpseudo-09238273dacb81bbc92c7d42986ef4e5fadf4a86.tar.gz
pseudo-09238273dacb81bbc92c7d42986ef4e5fadf4a86.tar.bz2
pseudo-09238273dacb81bbc92c7d42986ef4e5fadf4a86.zip
Make --without-passwd-fallback work
This is derived in significant part from contributions to oe-core by Peter A. Bigot. I reworked the path routine a bit to use an already duplicated string instead of allocating copies of parts of it. The first issue was just that there was a missing antimagic() around some of the path operations. The second is that we wanted to have a way to provide a fallback password file which isn't the host's, but which can be used in the case where the target filesystem hasn't got a password yet, for bootstrapping purposes. (So there's a minimal password file that just has root, basically.) Also, I noticed a design flaw, which is that if you ended up calling pseudo_pwd_lck_open() twice in a row, the second time through, pseudo would first check whether it had a path name for the file (it does), and thus not allocate one, then call the close routine (which frees it and nulls the pointer), then open a new one... and not have a file name, so the next attempt to close it wouldn't unlink the file. This shouldn't ever come up in real code, but it was bugging me. Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure b/configure
index 345c44b..11bbee1 100755
--- a/configure
+++ b/configure
@@ -2,7 +2,7 @@
#
# configure, simulation of autoconf script, much simplified
#
-# Copyright (c) 2008-2013 Wind River Systems, Inc.
+# Copyright (c) 2008-2014 Wind River Systems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the Lesser GNU General Public License version 2.1 as
@@ -69,6 +69,10 @@ do
--) shift; break ;;
--prefix=*)
opt_prefix=${arg#--prefix=}
+ if [ "$(cd "$opt_prefix"; pwd)" == "$(pwd)" ]; then
+ echo >&2 "ERROR: Prefix is current directory. That doesn't work."
+ exit 1
+ fi
;;
--libdir=*)
opt_libdir=${arg#--libdir=}