Bug 21648 - msec still refers to kdm in checks which doesn't exist anymore thus aborting
Summary: msec still refers to kdm in checks which doesn't exist anymore thus aborting
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-31 20:10 CEST by Bruno Cornec
Modified: 2020-01-20 23:43 CET (History)
1 user (show)

See Also:
Source RPM: msec-2.4-1.mga6
CVE:
Status comment:


Attachments

Description Bruno Cornec 2017-08-31 20:10:47 CEST
Description of problem:

After I updated to mga6, I have the following issue with msec:

the cron job launch by msec gives this result:
/etc/cron.hourly/msec:
Traceback (most recent call last):
  File "/usr/share/msec/msec.py", line 188, in <module>
    msec.commit(commit)
  File "/usr/share/msec/libmsec.py", line 726, in commit
    self.configfiles.write_files(really_commit)
  File "/usr/share/msec/libmsec.py", line 252, in write_files
    f.write()
  File "/usr/share/msec/libmsec.py", line 424, in write
    file = open(self.path, 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/config/kdm/kdmrc'
run-parts: /etc/cron.hourly/msec exited with return code 1




How reproducible:
Each time



Steps to Reproduce:
1.Launch /etc/cron.hourly/msec


FTR:

grep -i kdm /usr/share/msec/plugins/msec.py
KDMRC = '/usr/share/config/kdm/kdmrc'
KDMRC_REGEXP = re.compile('(.*?)-nolisten tcp(.*)$')
        kdmrc = self.configfiles.get_config_file(KDMRC)
        str = kdmrc.get_shell_variable('ServerArgsLocal', 'X-\*-Core', '^\s*$')
            val_kdmrc = KDMRC_REGEXP.search(str)
            val_kdmrc = None
            if val_startx or val_xservers or val_kdmrc or val_gdmconf != 'false':
                if kdmrc.exists():
                    kdmrc.replace_line_matching('^(ServerArgsLocal=.*?)-nolisten tcp(.*)$', '@1@2', 0, 0, 'X-\*-Core', '^\s*$')
            if not val_startx or not val_xservers or not val_kdmrc or val_gdmconf != 'true' or not val_sddmconf:
                if not val_kdmrc:
                    kdmrc.exists() and kdmrc.replace_line_matching('^(ServerArgsLocal=.*)$', '@1 -nolisten tcp', 'ServerArgsLocal=-nolisten tcp', 0, 'X-\*-Core', '^\s*$')
        kdmrc = self.configfiles.get_config_file(KDMRC)
        oldval_kdmrc = kdmrc.get_shell_variable('AllowShutdown', 'X-:\*-Core', '^\s*$')
            if kdmrc.exists():
                if oldval_kdmrc != 'All':
                    self.log.info(_('Allowing Shutdown/Reboot in KDM'))
                    kdmrc.set_shell_variable('AllowShutdown', 'All', 'X-:\*-Core', '^\s*$')
            if kdmrc.exists():
                if oldval_kdmrc != 'None':
                    self.log.info(_('Forbidding Shutdown/Reboot in KDM'))
                    kdmrc.set_shell_variable('AllowShutdown', 'None', 'X-:\*-Core', '^\s*$')
        '''  Allow display managers (kdm and gdm) to display list of local users.'''
        kdmrc = self.configfiles.get_config_file(KDMRC)
        oldval_kdmrc = kdmrc.get_shell_variable('ShowUsers', 'X-\*-Greeter', '^\s*$')
            if kdmrc.exists():
                if oldval_kdmrc != 'NotHidden':
                    self.log.info(_("Allowing list of users in {}").format('KDM'))
                    kdmrc.set_shell_variable('ShowUsers', 'NotHidden', 'X-\*-Greeter', '^\s*$')
            if kdmrc.exists():
                if oldval_kdmrc != 'Selected':
                    self.log.info(_("Forbidding list of users in {}").format('KDM'))
                    kdmrc.set_shell_variable('ShowUsers', 'Selected', 'X-\*-Greeter', '^\s*$')
David Walser 2017-09-01 03:57:53 CEST

Assignee: bugsquad => mageiatools

Comment 1 papoteur 2017-09-03 08:17:58 CEST
I have started to clean the code.

CC: (none) => yves.brungard_mageia

Comment 2 Mageia Robot 2017-09-05 09:43:55 CEST
commit 290d4d1cf9413ce91e44000d7ccc858eab409da2
Author: Papoteur <papoteur@...>
Date:   Sat Sep 2 21:41:30 2017 +0200

    Suppress managing kdm (mga#21648)
---
 Commit Link:
   http://gitweb.mageia.org/software/msec/commit/?id=290d4d1cf9413ce91e44000d7ccc858eab409da2
Comment 3 papoteur 2020-01-20 22:00:29 CET
No more complaint, thus closing.

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 4 Bruno Cornec 2020-01-20 23:43:56 CET
$ grep -i kdm /usr/share/msec/plugins/msec.py
$

so indeed not an issue anymore

Note You need to log in before you can comment on or make changes to this bug.