mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #1253 from holta/lightdm-login-fix
Fix #1252 lightdm looping logins due to strict bash syntax checking
This commit is contained in:
commit
bade31532a
3 changed files with 7 additions and 5 deletions
|
@ -74,7 +74,7 @@ fi
|
||||||
# Subroutine compares software version numbers. Generates rare false positives
|
# Subroutine compares software version numbers. Generates rare false positives
|
||||||
# like "1.0 > 1" and "2.4.0 > 2.4". Avoid risks by structuring conditionals w/
|
# like "1.0 > 1" and "2.4.0 > 2.4". Avoid risks by structuring conditionals w/
|
||||||
# a consistent # of decimal points e.g. "if version_gt w.x.y.z a.b.c.d; then"
|
# a consistent # of decimal points e.g. "if version_gt w.x.y.z a.b.c.d; then"
|
||||||
function version_gt() { [ "$(printf '%s\n' "$@" | sort -V | head -1)" != "$1" ]; }
|
version_gt() { [ "$(printf '%s\n' "$@" | sort -V | head -1)" != "$1" ]; }
|
||||||
|
|
||||||
# Verify that Raspbian is running a recent enough kernel. As Raspbian
|
# Verify that Raspbian is running a recent enough kernel. As Raspbian
|
||||||
# updates on 4.9.41-v7+ broke bridging, WiFi AP & OpenVPN in Oct/Nov 2017.
|
# updates on 4.9.41-v7+ broke bridging, WiFi AP & OpenVPN in Oct/Nov 2017.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function check_user_pwd() {
|
check_user_pwd() {
|
||||||
# $meth (hashing method) is typically '6' which implies 5000 rounds
|
# $meth (hashing method) is typically '6' which implies 5000 rounds
|
||||||
# of SHA-512 per /etc/login.defs -> /etc/pam.d/common-password
|
# of SHA-512 per /etc/login.defs -> /etc/pam.d/common-password
|
||||||
meth=$(sudo grep "^$1:" /etc/shadow | cut -d: -f2 | cut -d$ -f2)
|
meth=$(sudo grep "^$1:" /etc/shadow | cut -d: -f2 | cut -d$ -f2)
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function check_user_pwd() {
|
# bash syntax "function check_user_pwd() {" was removed, as it prevented all
|
||||||
|
# lightdm/graphical logins (incl autologin) on Raspbian: #1252 -> PR #1253
|
||||||
|
check_user_pwd() {
|
||||||
# $meth (hashing method) is typically '6' which implies 5000 rounds
|
# $meth (hashing method) is typically '6' which implies 5000 rounds
|
||||||
# of SHA-512 per /etc/login.defs -> /etc/pam.d/common-password
|
# of SHA-512 per /etc/login.defs -> /etc/pam.d/common-password
|
||||||
meth=$(sudo grep "^$1:" /etc/shadow | cut -d: -f2 | cut -d$ -f2)
|
meth=$(sudo grep "^$1:" /etc/shadow | cut -d: -f2 | cut -d$ -f2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue