saghul / sjs

Skookum JS: a JavaScript runtime
http://sjs.saghul.net
MIT License
98 stars 13 forks source link

Passwd module #42

Closed saghul closed 8 years ago

saghul commented 8 years ago

A wrapper around these:

int getpwnam_r(const char *name, struct passwd *pwd,
            char *buf, size_t buflen, struct passwd **result);

int getpwuid_r(uid_t uid, struct passwd *pwd,
            char *buf, size_t buflen, struct passwd **result);

Also:

os.getuid / geteuid: http://man7.org/linux/man-pages/man2/getuid.2.html os.setuid: http://man7.org/linux/man-pages/man2/setuid.2.html os.setgid http://man7.org/linux/man-pages/man2/setgid.2.html

Then use these to add support for uid / gid in process.spawn.