FS#28322 - [mc] wrong location for ini files

Attached to Project: Community Packages
Opened by Jan Hradek (jan.hradek) - Wednesday, 08 February 2012, 10:52 GMT
Last edited by Alexander F. Rødseth (xyproto) - Thursday, 09 February 2012, 15:20 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jakob Gruber (schuay)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
MidnightCommander uses the ini location of the logged-in user, instead of the user I "su"-ed into.

Additional info:
* package version(s): (i686) community/mc 4.8.1-1 - I also tried current mc-git from aur with the same result (propably broken upstream?)
* config and/or log files etc.: /etc/mc/ configuration files are untouched, mc's logging facilities are propably non-existent :(

Steps to reproduce:
* login as a regular user (let's use "foo" as our regular user)
* run mc and change configuration, I recommend to change something in the directory hotlist (Ctrl + \)
* save your configuration
* quit mc (F10)
* su (to root)
* now run mc in the su enviroment
* (now mc reads the configuration of the regular user "foo")
* NOTE: you can run 'mc -F' to actually see what data directories mc uses
* go to the directory hotlist (Ctrl + \), you should see the hotlist of the logged-in user "foo", not the one you "su"d into
* also if you try to save the configuration, mc clearly states where the config is written - to the user logged in "foo"
* this is reproducible the other way too: login as root and su to some regular user

NOTES:
* this bug has somewhat ugly side effect: if you save the configuration in the su environment then the ownership and the contents of "foo"'s ini files change (obviously)
* I think this is broken upstream, but I report it here first, to make sure that I didn't do something stupid "arch"wise.
* mc's internal cd command (just type in "cd" and enter) changes correctly to the home of the su'd user.
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Thursday, 09 February 2012, 15:20 GMT
Reason for closing:  Upstream
Additional comments about closing:  Upstream says it's not a bug.
Comment by Alexander F. Rødseth (xyproto) - Thursday, 09 February 2012, 11:10 GMT
What happens if you "su -" instead of "su"? If it works with "su -", is it an acceptable solution?
Comment by Jan Hradek (jan.hradek) - Thursday, 09 February 2012, 11:20 GMT
"su -" (login shell) works ok. It's acceptable enough for me, but now I don't know if it is a feature or a bug. Should I try to ask upstream?
Comment by Alexander F. Rødseth (xyproto) - Thursday, 09 February 2012, 11:23 GMT
Yes please.
Comment by Jan Hradek (jan.hradek) - Thursday, 09 February 2012, 11:54 GMT Comment by Jan Hradek (jan.hradek) - Thursday, 09 February 2012, 13:24 GMT
Reply from upstream:
> Any other program works exactly the same. Just try.
> So NOTABUG.

This behaviour is expected. Please, close this task.
Comment by Alexander F. Rødseth (xyproto) - Thursday, 09 February 2012, 15:18 GMT
Allright. Thanks for reporting it upstream. It's good to know for the future in any case, if someone else should experience this.

Loading...