Merge pull request #349 from pi-hole/audit_error_fix

Audit error fix
This commit is contained in:
Adam Hill 2018-10-21 15:14:57 -05:00 committed by GitHub
commit e995ed2f45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View File

@ -49,7 +49,7 @@ docker run -d \
pihole/pihole:latest
echo -n "Your password for https://${IP}/admin/ is "
docker logs pihole 2> /dev/null | grep 'password:'
docker logs pihole 2> /dev/null | grep 'password'
```
**This is just an example and might need changing.** Volumes are stored in the directory `$DOCKER_CONFIGS` and are recommended for persisting data across docker re-creations for updating images. As mentioned on line 2, the auto `IP_LOOKUP` variable may not work for VPN tunnel interfaces.

View File

@ -242,16 +242,21 @@ generate_password() {
setup_web_password() {
PASS="$1"
# Turn bash debug on while setting up password (to print it)
set -x
if [[ "$PASS" == "" ]] ; then
echo "" | pihole -a -p
else
echo "Setting password: ${PASS}"
set -x
pihole -a -p "$PASS" "$PASS"
fi
# Turn bash debug back off after print password setup
# (subshell to null hides printing output)
{ set +x; } 2>/dev/null
# To avoid printing this if conditional in bash debug, turn off debug above..
# then re-enable debug if necessary (more code but cleaner printed output)
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
# Turn bash debug back off after print password setup
# (subshell to null hides printing output)
{ set +x; } 2>/dev/null
set -x
fi
}

View File

@ -42,6 +42,11 @@ distro_check
# fix permission denied to resolvconf post-inst /etc/resolv.conf moby/moby issue #1297
apt-get -y install debconf-utils && echo resolvconf resolvconf/linkify-resolvconf boolean false | debconf-set-selections
# fix error AUDIT: Allow login in non-init namespaces
# Credit to https://github.com/sequenceiq/docker-pam/blob/master/ubuntu-14.04/Dockerfile
apt-get -y build-dep pam &&
export CONFIGURE_OPTS=--disable-audit && cd /tmp && apt-get -b source pam && dpkg -i libpam-doc*.deb libpam-modules*.deb libpam-runtime*.deb libpam0g*.deb
# Tried this - unattended causes starting services during a build, should probably PR a flag to shut that off and switch to that
#bash -ex "./${PIHOLE_INSTALL}" --unattended
install_dependent_packages INSTALLER_DEPS[@]