R
ruby
Hi,
trying to implement something like:
cd ~
using
Dir.chdir( Etc.getpwnam( Etc.getlogin ).dir )
(I thought this should be quite safe path) I faced this behaviour:
root@machine:~# su - everyuser
everyuser@machine:~$ irb
irb(main):001:0> require 'etc'
=> true
irb(main):002:0> Etc.getlogin
=> "root"
irb(main):003:0>
Is this expected behaviour? Seems like a bug to me. Am I missing something?
Regards,
r.
trying to implement something like:
cd ~
using
Dir.chdir( Etc.getpwnam( Etc.getlogin ).dir )
(I thought this should be quite safe path) I faced this behaviour:
root@machine:~# su - everyuser
everyuser@machine:~$ irb
irb(main):001:0> require 'etc'
=> true
irb(main):002:0> Etc.getlogin
=> "root"
irb(main):003:0>
Is this expected behaviour? Seems like a bug to me. Am I missing something?
Regards,
r.