[lkml]   [2009]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 055/100] cap_prctl: dont set error to 0 at no_change
    -stable review patch.  If anyone has any objections, please let us know.

    From: Serge E. Hallyn <>

    upstream commit: 5bf37ec3e0f5eb79f23e024a7fbc8f3557c087f0

    One-liner: capsh --print is broken without this patch.

    In certain cases, cap_prctl returns error > 0 for success. However,
    the 'no_change' label was always setting error to 0. As a result,
    for example, 'prctl(CAP_BSET_READ, N)' would always return 0.
    It should return 1 if a process has N in its bounding set (as
    by default it does).

    I'm keeping the no_change label even though it's now functionally
    the same as 'error'.

    Signed-off-by: Serge Hallyn <>
    Acked-by: David Howells <>
    Signed-off-by: James Morris <>
    Signed-off-by: Chris Wright <>
    security/commoncap.c | 1 -
    1 file changed, 1 deletion(-)

    --- a/security/commoncap.c
    +++ b/security/commoncap.c
    @@ -916,7 +916,6 @@ changed:
    return commit_creds(new);

    - error = 0;
    return error;

     \ /
      Last update: 2009-04-23 09:47    [W:0.020 / U:16.520 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site