Bug 28364 - midnight commander root save to user config
Summary: midnight commander root save to user config
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal minor
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-16 00:13 CET by Mészáros Csaba
Modified: 2021-02-16 19:34 CET (History)
2 users (show)

See Also:
Source RPM: mc-4.8.26-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Mészáros Csaba 2021-02-16 00:13:12 CET
Description of problem:
I upgraded from Mageia 7 to Mageia 8 RC1. I use an XFCE desktop. I ran into an annoying problem.

How reproducible:
1. open terminal as user
2. open mc 
3. settings color modarcon16
4. save settings 
5. exit mc
6. open again mc
7. color good
8. exit mc

8. change user root. su
9. open mc - oops visible user color modarcon16
10. change color modarcon16root (red)
11. save mc settings
12. exit mc
13. open again mc
14. color good
15. exit mc

16. exit su
17. open mc as user
18. wrong color - modarcon16root (root)
19. change color
20. save settings. - Error unable save (course the root owerwrite user config)
Comment 1 Aurelien Oudelet 2021-02-16 00:23:38 CET
Hi, sorry to read this.

This is a missuse of the su command.
You should run su with a dash like this:
$ su -

The dash is mandatory. This resets properly the user environment within the current shell. root user should not have the same variable environment than the real user.

So, the described above steps are wrong way.


This is not a bug.
Closing.

Status: NEW => RESOLVED
CC: (none) => ouaurelien
Resolution: (none) => INVALID

Comment 2 Dave Hodgins 2021-02-16 01:00:02 CET
See https://wiki.mageia.org/en/Never_use_just_su for details.

CC: (none) => davidwhodgins

Comment 3 Mészáros Csaba 2021-02-16 08:31:39 CET
Hello Aurelien.
Ever since I know my mind, I’ve always used it this way, and even in Mageia 7 on the first partition, if I use it now without a -, there’s no problem, just in Mageia 8. That's why I didn't understand. Maybe you should put it in /etc/profile.d/60alias.sh at system level?
Comment 4 Dave Hodgins 2021-02-16 19:34:13 CET
(In reply to Mészáros Csaba from comment #3)
> Hello Aurelien.
> Ever since I know my mind, I’ve always used it this way, and even in Mageia
> 7 on the first partition, if I use it now without a -, there’s no problem,
> just in Mageia 8. That's why I didn't understand. Maybe you should put it in
> /etc/profile.d/60alias.sh at system level?

It only causes problems if the commands run while running as root creates or
updates files in ~.

$ tree -ufaug ~|grep root
will show if there are now any root owned files in the home directory that
need to be fixed.

The way the su command works has not changed since well before Mandrake days.

While people unfamiliar with how the su command works may benefit from Mageia
choosing to add an alias, it would also cause changes when used with the -c
option, as is sometimes done in scripts.

Changing the way a basic command works in Mageia would probably also annoy
people used to the way it works in other distribution and historically in
Mandrake/Mandriva/Mageia.

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