aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/msec/plugins/msec.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/msec/plugins/msec.py b/src/msec/plugins/msec.py
index d31debe..05ab4db 100755
--- a/src/msec/plugins/msec.py
+++ b/src/msec/plugins/msec.py
@@ -54,6 +54,7 @@ OPASSWD = '/etc/security/opasswd'
PASSWD = '/etc/pam.d/passwd'
POWEROFF = '/usr/bin/poweroff'
REBOOT = '/usr/bin/reboot'
+SDDMCONF = '/etc/sddm.conf'
SERVER = '/etc/security/msec/server'
SHADOW = '/etc/shadow'
SHUTDOWN = '/usr/bin/shutdown'
@@ -384,34 +385,44 @@ class msec:
kdmrc = self.configfiles.get_config_file(KDMRC)
gdmconf = self.configfiles.get_config_file(GDMCONF)
gdm230 = self.configfiles.get_config_file(GDM230)
+ sddmconf = self.configfiles.get_config_file(SDDMCONF)
oldval_gdmconf = gdmconf.get_shell_variable('Browser')
oldval_kdmrc = kdmrc.get_shell_variable('ShowUsers', 'X-\*-Greeter', '^\s*$')
-
+ oldval_sddmconf = sddmconf.get_shell_variable('RememberLastUser','X11', '^\s*$')
+
if arg == "yes":
if kdmrc.exists():
if oldval_kdmrc != 'NotHidden':
- self.log.info(_("Allowing list of users in KDM"))
+ self.log.info(_("Allowing list of users in {}").format('KDM'))
kdmrc.set_shell_variable('ShowUsers', 'NotHidden', 'X-\*-Greeter', '^\s*$')
if gdmconf.exists():
if gdm230.exists():
pass
else:
if oldval_gdmconf != 'true':
- self.log.info(_("Allowing list of users in GDM"))
+ self.log.info(_("Allowing list of users in {}").format('GDM'))
gdmconf.set_shell_variable('Browser', 'true')
+ if sddmconf.exists():
+ if oldval_sddmconf != 'true':
+ self.log.info(_("Allowing list of users in {}").format('SDDM'))
+ sddmconf.set_shell_variable('RememberLastUser', 'true','X11', '^\s*$')
else:
if kdmrc.exists():
if oldval_kdmrc != 'Selected':
- self.log.info(_("Forbidding list of users in KDM"))
+ self.log.info(_("Forbidding list of users in {}").format('KDM'))
kdmrc.set_shell_variable('ShowUsers', 'Selected', 'X-\*-Greeter', '^\s*$')
if gdmconf.exists():
if gdm230.exists():
pass
else:
if oldval_gdmconf != 'false':
- self.log.info(_("Forbidding list of users in GDM"))
+ self.log.info(_("Forbidding list of users in {}").format('GDM'))
gdmconf.set_shell_variable('Browser', 'false')
+ if sddmconf.exists():
+ if oldval_sddmconf != 'false':
+ self.log.info(_("Forbidding showing last user in {}").format('SDDM'))
+ sddmconf.set_shell_variable('RememberLastUser', 'false','X11', '^\s*$')
def allow_autologin(self, arg):
''' Allow autologin.'''