Re: [patch 0/15] lsm stacking v0.3: intro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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. 
<[email protected]>
http://NxNW.org/~steve/

Attachment: pgpL42UyymTs7.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux