--- procps-3.2.5/ps/parser.c.orig 2005-01-14 20:10:21.000000000 +0100 +++ procps-3.2.5/ps/parser.c 2005-02-06 03:29:19.477738552 +0100 @@ -336,12 +336,19 @@ exclusive("-V"); display_version(); exit(0); +#ifdef __linux__ + case 'Z': /* full Mandatory Access Control level info */ + trace("-Z shows full MAC info\n"); + format_modifiers |= FF_Fc; + break; +#else // This must be verified against SVR4-MP. (UnixWare or Powermax) // Leave it undocumented until that problem is solved. case 'Z': /* full Mandatory Access Control level info */ trace("-Z shows full MAC info\n"); format_modifiers |= FM_M; break; +#endif case 'a': trace("-a select all with a tty, but omit session leaders.\n"); simple_select |= SS_U_a; @@ -472,12 +479,12 @@ trace("-y Print lnone info in UID/USER column or do Sun -l hack.\n"); format_modifiers |= FM_y; break; -#if 0 // This must be verified against SVR4-MP (UnixWare or Powermax) case 'z': /* alias of Mandatory Access Control level info */ trace("-z shows aliased MAC info\n"); format_modifiers |= FM_M; break; +#if 0 // Solaris 10 does this case 'z': /* select by zone */ trace("-z secects by zone\n"); @@ -605,10 +612,17 @@ trace("X Old Linux i386 register format\n"); format_flags |= FF_LX; break; +#ifdef __linux__ + case 'Z': + trace("Z SElinux Security Context format\n"); + format_flags |= FF_Fc; + break; +#else case 'Z': /* FreeBSD does MAC like SGI's Irix does it */ trace("Z Print security label for Mandatory Access Control.\n"); format_modifiers |= FM_M; break; +#endif case 'a': trace("a Select all w/tty, including other users\n"); simple_select |= SS_B_a; --- procps-3.2.5/ps/ps.1.orig 2004-12-02 18:39:04.000000000 +0100 +++ procps-3.2.5/ps/ps.1 2005-02-06 03:30:51.666723696 +0100 @@ -446,6 +446,9 @@ Do not show flags; show rss in place of addr. This option can only be used with \fB\-l\fR. +.opt \-Z +display security context format (NSA SELinux, etc.) + .opt \-\-format \ format user\-defined format. Identical to \fB\-o\fR and \fBo\fR.