X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ensc_wrappers%2Fwrappers-unistd.hc;h=63bfb653ca5bdc55e0ceae546ea50c2e3738d9d3;hb=c0ea11d48d9bf2c27ab89c41012a00b206b6bbf0;hp=6b21fc3040585f176498b08b9a4fcfaaa9c2702e;hpb=9c78378bebc1a9f3d400f422df8ede9efea57dea;p=util-vserver.git diff --git a/ensc_wrappers/wrappers-unistd.hc b/ensc_wrappers/wrappers-unistd.hc index 6b21fc3..63bfb65 100644 --- a/ensc_wrappers/wrappers-unistd.hc +++ b/ensc_wrappers/wrappers-unistd.hc @@ -138,6 +138,12 @@ Eunlink(char const *pathname) FatalErrnoError(unlink(pathname)==-1, "unlink()"); } +inline static WRAPPER_DECL void +Elink(char const *oldpath, char const *newpath) +{ + FatalErrnoError(link(oldpath, newpath)==-1, "link()"); +} + inline static void Esetuid(uid_t uid) { @@ -156,6 +162,12 @@ Esetgroups(size_t size, const gid_t *list) { FatalErrnoError(setgroups(size, list)==-1, "setgroups()"); } + +inline static void +Einitgroups(const char *user, gid_t group) +{ + FatalErrnoError(initgroups(user, group)==-1, "initgroups()"); +} #endif inline static WRAPPER_DECL int