pid_t pid;
uid_t boot_uid;
gid_t boot_gid;
+ uid_t run_uid;
+ gid_t run_gid;
#if defined(USE_LINUX_CAP)
struct {
// initial process capabilities
for (i = 0; i < post_mortem.process.argc; i++)
chunk_appendf(&trash, "%s ", post_mortem.process.argv[i]);
chunk_appendf(&trash, "\n");
+
chunk_appendf(&trash, " boot uid: %d\n", post_mortem.process.boot_uid);
- chunk_appendf(&trash, " runtime uid: %d\n", geteuid());
+ chunk_appendf(&trash, " runtime uid: %d\n", post_mortem.process.run_uid);
chunk_appendf(&trash, " boot gid: %d\n", post_mortem.process.boot_gid);
- chunk_appendf(&trash, " runtime gid: %d\n", getegid());
+ chunk_appendf(&trash, " runtime gid: %d\n", post_mortem.process.run_gid);
#if defined(USE_LINUX_CAP)
/* let's dump saved in feed_post_mortem() initial capabilities sets */
post_mortem.process.thread_info[i].stack_top = ha_thread_info[i].stack_top;
}
+ /* also set runtime process settings. At this stage we are sure, that all
+ * config options and limits adjustements are successfully applied.
+ */
+ post_mortem.process.run_uid = geteuid();
+ post_mortem.process.run_gid = getegid();
+
return 1;
}