Signed-off-by: Daniel Golle <daniel@makrotopia.org>
int gr_gid;
gid_t *additional_gids;
size_t num_additional_gids;
+ mode_t umask;
+ bool set_umask;
int require_jail;
struct {
struct hook_execvpe **createRuntime;
exit(EXIT_FAILURE);
}
+ if (opts.set_umask)
+ umask(opts.umask);
+
if (applyOCIcapabilities(opts.capset))
exit(EXIT_FAILURE);
DEBUG("read %lu additional groups\n", gidcnt);
}
- /* ToDo: umask */
+ if (tb[OCI_PROCESS_USER_UMASK]) {
+ opts.umask = blobmsg_get_u32(tb[OCI_PROCESS_USER_UMASK]);
+ opts.set_umask = true;
+ }
return 0;
}