return 1;
}
+static int pr_sd_ouid(char *restrict const outbuf, const proc_t *restrict const pp){
+ int r;
+ size_t len;
+ uid_t ouid;
+
+ r = sd_pid_get_owner_uid(pp->tgid, &ouid);
+ if(r<0) goto fail;
+ return snprintf(outbuf, COLWID, "%d", ouid);
+
+fail:
+ outbuf[0] = '-';
+ outbuf[1] = '\0';
+ return 1;
+}
+
#endif
/****************** FLASK & seLinux security stuff **********************/
{"scnt", "SCNT", pr_nop, sr_nop, 4, 0, DEC, AN|RIGHT}, /* man page misspelling of scount? */
{"scount", "SC", pr_nop, sr_nop, 4, 0, AIX, AN|RIGHT}, /* scnt==scount, DEC claims both */
#ifdef WITH_SYSTEMD
+{"sd_ouid", "OWNER", pr_sd_ouid, sr_nop, 5, 0, LNX, ET|LEFT},
{"sd_session","SESSION", pr_sd_session, sr_nop, 11, 0, LNX, ET|LEFT},
{"sd_unit", "UNIT", pr_sd_unit, sr_nop, 31, 0, LNX, ET|LEFT},
#endif
displayed as 0, 1, 2, 3, 4, and 5.
T}
+sd_ouid OWNER T{
+displays the Unix user identifier of the owner of the session of a process.
+T}
+
sd_session SESSION T{
displays login session identifier of a process.
T}