lkml.org 
[lkml]   [2005]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 5/7] BSD Secure Levels: allow setuid/setgid on root user processes
    This is the fifth in a series of seven patches to the BSD Secure
    Levels LSM. It allows setuid and setgid on a process if the user is
    already root. This allows non-root users to log in. Thanks to Serge
    Hallyn for the suggestion.

    Signed off by: Michael Halcrow <mhalcrow@us.ibm.com>

    Index: linux-2.6.12-rc4-mm2-seclvl/security/seclvl.c
    ===================================================================
    --- linux-2.6.12-rc4-mm2-seclvl.orig/security/seclvl.c 2005-05-16 16:28:29.000000000 -0500
    +++ linux-2.6.12-rc4-mm2-seclvl/security/seclvl.c 2005-05-16 16:29:19.000000000 -0500
    @@ -442,12 +442,12 @@
    "in secure level [%d] denied\n",
    __FUNCTION__, seclvl);
    return -EPERM;
    - } else if (cap == CAP_SETUID) {
    + } else if (cap == CAP_SETUID && current->uid != 0) {
    seclvl_printk(1, KERN_WARNING "%s: Attempt to setuid "
    "while in secure level [%d] denied\n",
    __FUNCTION__, seclvl);
    return -EPERM;
    - } else if (cap == CAP_SETGID) {
    + } else if (cap == CAP_SETGID && current->uid != 0) {
    seclvl_printk(1, KERN_WARNING "%s: Attempt to setgid "
    "while in secure level [%d] denied\n",
    __FUNCTION__, seclvl);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-05-17 17:37    [W:0.022 / U:29.856 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site