[debian-edu-commits] debian-edu/pkg-team/ 03/09: debian/patches: Add 1003_check-autologin-settings-before-login.patch. Give the user/admin some chance to stop LightDM service from console on failures.
Mike Gabriel
sunweaver at debian.org
Mon Aug 7 03:36:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository lightdm-autologin-greeter.
commit f77da1120de9af66c15981980ae560d0e0ec289b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Sun Aug 6 23:00:13 2017 -0400
debian/patches: Add 1003_check-autologin-settings-before-login.patch. Give the user/admin some chance to stop LightDM service from console on failures.
---
...003_check-autologin-settings-before-login.patch | 39 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 40 insertions(+)
diff --git a/debian/patches/1003_check-autologin-settings-before-login.patch b/debian/patches/1003_check-autologin-settings-before-login.patch
new file mode 100644
index 0000000..c1ff358
--- /dev/null
+++ b/debian/patches/1003_check-autologin-settings-before-login.patch
@@ -0,0 +1,39 @@
+Description: On failures, give the user/admin a chance to stop LightDM from console.
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+--- a/bin/lightdm-autologin-greeter
++++ b/bin/lightdm-autologin-greeter
+@@ -13,18 +13,33 @@
+ from gi.repository import LightDM
+
+ import sys
++import time
+
+ greeter = None
+
++failure = False
++
+ # Callback for after we send LightDM the password, this method
+ # has to handle a successful login, in which case we start the session
+ # or a failed login, in which case we tell the user
+ def authentication_complete_cb(greeter):
++
++ global failure
++
+ if greeter.get_is_authenticated():
+ if not greeter.start_session_sync(None):
+ print("Failed to start session", file=sys.stderr)
++ failure = True
++
+ else:
+ print("Login failed", file=sys.stderr)
++ failure = True
++
++ if failure:
++ # allow the admin/user to intercept and disable LightDM from console
++ time.sleep(10)
++ print("Re-trying now after 10s pause...", file=sys.stderr)
++ exit(-1)
+
+ if __name__ == '__main__':
+ main_loop = GObject.MainLoop ()
diff --git a/debian/patches/series b/debian/patches/series
index 847c514..cacc1f4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
1001_use-python3.patch
1002_set-gi-LightDM-version.patch
+1003_check-autologin-settings-before-login.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/lightdm-autologin-greeter.git
More information about the debian-edu-commits
mailing list