githubhjs / neatx

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

SuAuth: bad su args on BSD #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
on BSD or Solaris: su command take different arguments
so the SuAuth simply doesn't work.

auth.py line 190:
return [constants.SU, username, "-c", cmd]

Original issue reported on code.google.com by mickael....@gmail.com on 22 Jul 2009 at 11:19

GoogleCodeExporter commented 8 years ago
Good to know. Not being able to specify what shell su runs may potentially cause
issues, as there's no way of knowing whether the user's shell will work 
correctly
etc. Here's the command that's currently run for me:

cd ~ && /usr/lib/neatx/nxserver --proto=3030000 -- diamond

Original comment by kormat on 22 Jul 2009 at 4:52

GoogleCodeExporter commented 8 years ago
The "~" might need a later shell, perhaps using $HOME or missing it out 
altogether as
it's the default anyway would be more portable.

Original comment by ralph.co...@gmail.com on 22 Jul 2009 at 5:00

GoogleCodeExporter commented 8 years ago
It's not the default though - that's why we had to add it in.

Original comment by kormat on 22 Jul 2009 at 5:19

GoogleCodeExporter commented 8 years ago
At least not everywhere, i mean. Ubuntu:

root@asher:~(1:0)# su diamond -c pwd
/root

Fedora:

[root@fedora10 etc]# su diamond -c pwd
/etc

Original comment by kormat on 22 Jul 2009 at 5:21

GoogleCodeExporter commented 8 years ago
No, I mean the shell's cd defaults to changing the current working directory to 
the
user's home directory if no directory is specified.  IOW, "cd &&
/usr/lib/neatx/nxserver --proto=3030000 -- diamond" would be OK and more 
portable.

Original comment by ralph.co...@gmail.com on 22 Jul 2009 at 6:02

GoogleCodeExporter commented 8 years ago
Ahh, right. Ok, after consulting the man pages for su on bsd and linux, i think 
this
can work portably. Sending out a patch for review.

Original comment by kormat on 22 Jul 2009 at 6:42

GoogleCodeExporter commented 8 years ago
Patch committed. Thanks for pointing this out & suggesting a fix.

Original comment by kormat on 23 Jul 2009 at 8:58