aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2014-01-22 16:20:35 -0600
committerPeter Seebach <peter.seebach@windriver.com>2014-01-22 16:22:46 -0600
commit97705dccbf9ed86698729faa0c82cbf2d28d6949 (patch)
tree69501defbc2369ce6fe91b8cd6bc9fd18680ea9a /configure
parent4759b592c3dc9a3386192d7d1ae5c3857850247e (diff)
downloadpseudo-97705dccbf9ed86698729faa0c82cbf2d28d6949.tar.gz
pseudo-97705dccbf9ed86698729faa0c82cbf2d28d6949.tar.bz2
pseudo-97705dccbf9ed86698729faa0c82cbf2d28d6949.zip
Don't automatically fall back to /etc/passwd.
In some cases, we'd rather pseudo fail than fall back to using /etc/passwd or /etc/group. Make the determination of what to fall back to when neither PSEUDO_PASSWD nor a chroot directory contains passwd/group files controllable by a configure-time flag, controlled by --with-passwd-fallback= or --without-passwd-fallback.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure b/configure
index d88a930..80da1d1 100755
--- a/configure
+++ b/configure
@@ -27,6 +27,7 @@ opt_sqlite=/usr
opt_rpath=
opt_memory=
opt_async=
+opt_passwd_fallback='""'
compile_x86_32=-m32
compile_x86_64=-m64
@@ -44,6 +45,7 @@ usage()
echo >&2 " [--enable-static-sqlite]"
echo >&2 " [--with-static-sqlite=...]"
echo >&2 " [--with-rpath=...|--without-rpath]"
+ echo >&2 " [--with-passwd-fallback=...|--without-passwd-fallback]"
echo >&2 " [--cflags='']"
echo >&2 " [--bits=32|64]"
exit 1
@@ -69,6 +71,14 @@ do
sqlite_ldarg=$opt_sqlite_ldarg
use_maybe_rpath=false
;;
+ --without-passwd-fallback)
+ opt_passwd_fallback='NULL'
+ ;;
+ --with-passwd-fallback=*)
+ opt_passwd_fallback="${arg#--with-passwd-fallback=}"
+ # Trim a trailing /, remove quotes. So / => "".
+ opt_passwd_fallback="\"${opt_passwd_fallback%/}\""
+ ;;
--enable-static-sqlite)
sqlite_ldarg='$(SQLITE)/$(SQLITE_LIB)/libsqlite3.a'
use_maybe_rpath=false
@@ -230,6 +240,7 @@ sed -e '
s,@SQLITE_LIB@,'"$opt_sqlite_lib"',g
s,@SQLITE_MEMORY@,'"$SQLITE_MEMORY"',g
s,@FORCE_ASYNC@,'"$FORCE_ASYNC"',g
+ s,@PASSWD_FALLBACK@,'$opt_passwd_fallback',g
s!@RPATH@!'"$opt_rpath"'!g
s,@MARK64@,'"$opt_mark64"',g
s,@ARCH@,'"$opt_arch"',g