lan17 / neatx

Automatically exported from code.google.com/p/neatx
0 stars 0 forks source link

Incorrect using of su #60

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run neatx on ALT Linux
2. Try to connect with KDE session on official nxclient

What is the expected output? What do you see instead?
- In the client you will see a box c message "Could not start kstartupconfig. 
Check your installation."

What version of the product are you using? On what operating system?
- neatx from svn on ALT Linux

Please provide any additional information below.
This is because when authenticating via "su" you use the command "su username-c 
cd". On some systems, such as ALT Linux, the default in the performance of "su" 
retains all the previous user environment variables and commands you use will 
not work because of the fact that the new user does not have access to the old 
home directory (privious user $HOME). To work correctly, use "su - username", 
while executed login and user correctly enters her home directory. This method 
is more universal and suitable for all systems, while used today relies on 
undefined behavior by default.

Default behavior of su:
http://unixhelp.ed.ac.uk/CGI/man-cgi?su

HINT: In auth.py (line 191), replace string from:
  return [self._cfg.su, username, "-c", cmd]
to:
  return [self._cfg.su, "-", username, "-c", cmd]

Original issue reported on code.google.com by mdevaev@gmail.com on 23 Aug 2010 at 6:08