Re: [PATCH] capabilities: Ambient capability set V2

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

 



On Sat, 28 Feb 2015, Serge E. Hallyn wrote:

> Your example program is not filling in pI though?

The setcap sets the inheritance bit. When the binary runs the i bits
should be set.

> Ah, i see why.  In get_file_caps() you are still assigning
>
> 	fP = pA
>
> if the file has no file capabilities.  so then you are actually
> doing
>
> 	 pP' = (X & (fP | pA)) | (pI & (fI | pA))
> rather than
> 	 pP' = (X & fP) | (pI & (fI | pA))


I thought that fP, fI and pI = {} since the file has no caps
so this comes  out as

pP' = pA

> Other than that, the patch is looking good to me.  We should
> consider emitting an audit record when a task fills in its

How do I do that?

> pA, and I do still wonder whether we should be requiring
> CAP_SETFCAP (unsure how best to think of it).  But assuming the
> fP = pA was not intended, I think this largely does the right
> thing.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux