]>
Commit | Line | Data |
---|---|---|
7e28c94b JB |
1 | --- procps-3.1.15/ps/ps.1.selinux 2003-12-23 20:59:47.000000000 -0500 |
2 | +++ procps-3.1.15/ps/ps.1 2004-01-21 13:12:33.000000000 -0500 | |
3 | @@ -96,6 +96,7 @@ | |
4 | s display signal format | |
5 | u display user-oriented format | |
6 | v display virtual memory format | |
7 | +-Z display security context format (NSA SELinux, etc.) | |
8 | --format user-defined format | |
9 | --context display security context format (NSA SELinux, etc.) | |
649623d2 | 10 | |
e8d255b8 JB |
11 | --- procps-3.2.1/ps/parser.c.orig 2004-03-27 04:52:01.000000000 +0100 |
12 | +++ procps-3.2.1/ps/parser.c 2004-03-28 22:01:05.542682592 +0200 | |
7e28c94b JB |
13 | @@ -224,7 +224,7 @@ |
14 | flagptr = ps_argv[thisarg]; | |
15 | while(*++flagptr){ | |
16 | /* Find any excuse to ignore stupid Unix98 misfeatures. */ | |
17 | - if(!strchr("aAdefgGlnoptuU", *flagptr)) not_pure_unix = 1; | |
18 | + if(!strchr("aAdefgGlnoptuUzZ", *flagptr)) not_pure_unix = 1; | |
19 | switch(*flagptr){ | |
20 | case 'A': | |
21 | trace("-A selects all processes.\n"); | |
e8d255b8 | 22 | @@ -314,12 +314,10 @@ |
7e28c94b JB |
23 | exclusive("-V"); |
24 | display_version(); | |
25 | exit(0); | |
26 | -#if 0 | |
27 | case 'Z': /* full Mandatory Access Control level info */ | |
28 | trace("-Z shows full MAC info\n"); | |
29 | - return "Don't understand MAC on Linux."; | |
30 | + format_flags |= FF_Fc; | |
31 | break; | |
32 | -#endif | |
33 | case 'a': | |
34 | trace("-a select all with a tty, but omit session leaders.\n"); | |
35 | simple_select |= SS_U_a; | |
e8d255b8 | 36 | @@ -442,12 +440,10 @@ |
7e28c94b JB |
37 | trace("-y Print lnone info in UID/USER column or do Sun -l hack.\n"); |
38 | format_modifiers |= FM_y; | |
39 | break; | |
40 | -#if 0 | |
41 | case 'z': /* alias of Mandatory Access Control level info */ | |
42 | - trace("-z shows aliased MAC info\n"); | |
43 | - return "Don't understand MAC on Linux."; | |
44 | + trace("-Z shows full MAC info\n"); | |
45 | + format_flags |= FF_Fc; | |
46 | break; | |
47 | -#endif | |
48 | case '-': | |
49 | return "Embedded '-' among SysV options makes no sense."; | |
50 | break; | |
e8d255b8 | 51 | @@ -567,10 +563,17 @@ |
7e28c94b JB |
52 | trace("X Old Linux i386 register format\n"); |
53 | format_flags |= FF_LX; | |
54 | break; | |
e8d255b8 | 55 | +#ifdef __linux__ |
7e28c94b JB |
56 | + case 'Z': |
57 | + trace("SElinux Security Context format\n"); | |
58 | + format_flags |= FF_Fc; | |
59 | + break; | |
e8d255b8 JB |
60 | +#else |
61 | case 'Z': /* FreeBSD does MAC like SGI's Irix does it */ | |
62 | trace("Z Print security label for Mandatory Access Control.\n"); | |
63 | format_modifiers |= FM_M; | |
64 | break; | |
65 | +#endif | |
7e28c94b JB |
66 | case 'a': |
67 | trace("a Select all w/tty, including other users\n"); | |
68 | simple_select |= SS_B_a; |