[PATCH 2/4] os-posix: refactor code handling the -runas argument