A short intro into ulimit: RESOURCE LIMITS ON UNIX SYSTEMS (ULIMIT). The command this init script is trying to issue is supposed to set the max locked memory limit to, well, unlimited. Should succeed for root. Does whoami print root?
UPD: further research led me to this Google Groups discussion. Hopefully it will clarify things a bit.