1

I have configured my limits.conf file to allocate a huge stack size

*               soft    stack     65535
*               hard    stack     65535

ulimit -s shows the correct value for both root user and myuser

With this configuration in place, if I run an executable(owned by root:root) from myuser, the process is owned by myuser and /proc/<id>/limits has the right stack size, (as expected)

however, as root if I set the setuid on the executable and execute it from myuser, the process is owned by root(as expected), but the stack size in /proc/<id>/limits is 8 MB (I guess this is default size)

In rhel6/rhel7, The stack sizes are allocated as per limits.conf with or without setuid.

Is this a new behaviour in RHEL8? How can I get the size from limits in this case?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.