Proot and NOFILE RLIMIT

11 views
Skip to first unread message

Paul Davies C

unread,
Jan 20, 2014, 11:31:14 AM1/20/14
to proo...@googlegroups.com
Hi,
On my system I have number of open files rlimit capped to 40.
However from the audit logs , I have been able to figure out that proot
is trying to set the limit to a higher value of open files using
setrlimit and it fails. So my question is whether is there a minimum
number of open files limit that must be set for proot to work ?

--
Paul Davies C,
Final year B.Tech student,
Govt. Engineering College, Thrissur.

Cédric VINCENT

unread,
Jan 22, 2014, 3:26:51 AM1/22/14
to proo...@googlegroups.com
Hello Paul,

> On my system I have number of open files rlimit capped to
> 40. However from the audit logs , I have been able to figure out
> that proot is trying to set the limit to a higher value of open
> files using setrlimit and it fails.

As far as I know, PRoot doesn't try to change this limit by itself.
It used to modify the stack limit but this has been removed since
v3.2.*:

[proot-master]$ git grep setrlimit src/
src/syscall/sysnums-arm.h: [ 75 ] = PR_setrlimit,
src/syscall/sysnums-arm64.h: [ 164 ] = PR_setrlimit,
src/syscall/sysnums-i386.h: [ 75 ] = PR_setrlimit,
src/syscall/sysnums-sh4.h: [ 75 ] = PR_setrlimit,
src/syscall/sysnums-x32.h: [ 160 ] = PR_setrlimit,
src/syscall/sysnums-x86_64.h: [ 160 ] = PR_setrlimit,
src/syscall/sysnums.list:SYSNUM(setrlimit)

[proot-master]$ git log -Ssetrlimit
commit 2e580ecdbdbf23dd6acc601e061ad2f5208ff76b
Author: Cédric VINCENT <cedric....@st.com>
Date: Wed Aug 14 15:15:08 2013 +0200

Remove the stack limit constraint, its side effect is not
needed anymore.

The heap emulation fixes this problem definitively.

[proot-master]$ git describe 2e580ecdbdbf23dd6acc601e061ad2f5208ff76b
v3.1-4-g2e580ec


Please, could you send me more details (log)?


> So my question is whether is there a minimum number of open files
> limit that must be set for proot to work ?

I think PRoot can have up to 5 files open at the same time (including
stdout, stderr, stdin).


Regards,
Cédric.
Reply all
Reply to author
Forward
0 new messages