lkml.org 
[lkml]   [2005]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 0/15] lsm stacking v0.3: intro
On Sat, Jul 30, 2005 at 01:18:52PM -0700, Tony Jones wrote:
> Of more concern is ps -Z (pstools).
>
> We had to have the pstools maintainer extend the set of characters that it
> considered valid from the getprocattr. I forget the details but IIRC he
> wanted to know (for ?documentation?) every character that could be returned
> by our getprocattr hook (which for us is pretty much any character thats
> valid in a pathname -- though IIRC we forgot one).
>
> Anyway, I'm guessing (at least with pstools 3.2.5) that '(' is not one of
> the valid characters. IIRC ps gives up when it sees a "non-valid" character.
>
> I wrote a trivial little lsm which just returns 'foobar' for any getprocattr.
>
> # cat /proc/2322/attr/current
> unconstrained (subdomain)
> foobar (foobar)
>
> # ps -Z -p 2322
> LABEL PID TTY TIME CMD
> unconstrained 2322 ttyS0 00:00:00 bash

Actually, no, it is the space preceding the open paren that is invalid;
see this patch for the expanded allowed character set in procps 3.2.5:

http://cvs.sourceforge.net/viewcvs.py/procps/procps/ps/output.c?r1=1.51&r2=1.52

When I discussed this with Albert Cahalan, he *strongly* objected to
allowing whitespace in security contexts, as he felt it would break
scripts that parsed 'ps -Z' output.

--
Steve Beattie
SUSE Labs, Novell Inc.
<sbeattie@suse.de>
http://NxNW.org/~steve/
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-07-31 05:29    [W:0.116 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site