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

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Sun, 13 Sep 2015 09:56:37 -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):

Might be something different between our systems, korli:

{{{
~/> chmod 666 /etc/profile # also tried 777 (incl. x bit)
~/> ll /etc/profile
-rw-rw-rw- 1 user root 2243 Jul 30 02:40 /etc/profile
~/> su tts_guest
su: /bin/bash: Permission denied
}}}

Looking again at /system/lib I see that the `x86/` subfolder indeed has
faulty rights (500 instead of 555), but bash-4.3.42-1-x86_gcc2.hpkg
theoritically would not access x86 libs anyway IIUC

Another odd test idea I've had: making a bfs copy of the packagefs bash
(only bash itself, not its libs) into /tmp, and using that -- turns out it
yields a different error, "killed by death":
{{{
~/> useradd -s /tmp/New\ folder/bash tts_guest
~/> su tts_guest
Killed (by death)
}}}

strace:

{{{
[ 20211] _kern_setreuid(0x3e8, 0xffffffff, true) = 0x00000000 No error (0
us)
[ 20211] _kern_open(0xffffffff, "/tmp/New folder/bash", 0x0, 0x0) =
0x00000003 (40 us)
[ 20211] _kern_access(0xffffffff, "/tmp/New folder/bash", 0x1, true) =
0x00000000 No error (10 us)
[ 20211] _kern_read(0x3, 0x0, 0x71cfc548, 0x100) = 0x00000100 (6 us)
[ 20211] _kern_close(0x3) = 0x00000000 No error (4 us)
[ 20211] _kern_open(0xffffffff, "/tmp/New folder/bash", 0x0, 0x0) =
0x00000003 (10 us)
[ 20211] _kern_stat_attr(0x3, "SYS:ENV", 0x71cfc9e8) = 0x80006003 No such
file or directory (11 us)
[ 20211] _kern_close(0x3) = 0x00000000 No error (2 us)

}}}

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

Other related posts: