[haiku-bugs] Re: [Haiku] #12373: Can't "su" to non-superuser : Permission denied

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Sun, 13 Sep 2015 08:21:53 -0000

#12373: Can't "su" to non-superuser : Permission denied
-------------------------+----------------------------
Reporter: ttcoder | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: R1/beta1
Component: - General | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
-------------------------+----------------------------

Comment (by ttcoder):

And same if configuring the user directly on "bash" (instead of the "sh"
symbolic link):

{{{
[ 1401] _kern_open(0xffffffff, "/bin/bash", 0x0, 0x0) = 0x80000002 (16
us)
}}}

Oddly, the strace output differs quite much when invoking `su user` (i.e.
when you hop into yourself), `su` seems the ignore the contents of
/etc/passwd:


{{{
[ 3124] _kern_read_stat(0xffffffff, "./bash", true, 0x7187f160, 0x58) =
0x80006003 No such file or directory (13 us)
[ 3124] _kern_read_stat(0xffffffff, "/boot/home/config/non-
packaged/bin/bash", true, 0x7187f160, 0x58) = 0x80006003 No such file or
directory (17 us)
[ 3124] _kern_read_stat(0xffffffff, "/boot/home/config/bin/bash", true,
0x7187f160, 0x58) = 0x80006003 No such file or directory (7 us)
[ 3124] _kern_read_stat(0xffffffff, "/boot/system/non-packaged/bin/bash",
true, 0x7187f160, 0x58) = 0x80006003 No such file or directory (12 us)
[ 3124] _kern_read_stat(0xffffffff, "/bin/bash", true, 0x7187f160, 0x58)
= 0x00000000 No error (11 us)
[ 3124] _kern_read_stat(0xffffffff, "/bin/bash", true, 0x7187f190, 0x58)
= 0x00000000 No error (6 us)

}}}

I tried to look at lib dependancies (`strings < /bin/bash | grep lib`) a
bit but they seem to have their world-readable bit set.. (and if access to
a library was the culprit, the strace output would hint at a library and
not bash.. Or is that dependant on `runtime_loader` 's behavior ?)

--
Ticket URL: <https://dev.haiku-os.org/ticket/12373#comment:2>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: