1. 20 11月, 2007 2 次提交
    • S
      [IPVS]: Fix sysctl warnings about missing strategy in schedulers · 9e103fa6
      Simon Horman 提交于
      sysctl table check failed: /net/ipv4/vs/lblc_expiration .3.5.21.19 Missing strategy
      [...]
      sysctl table check failed: /net/ipv4/vs/lblcr_expiration .3.5.21.20 Missing strategy
      
      Switch these entried over to use CTL_UNNUMBERED as clearly
      the sys_syscal portion wasn't working.
      
      This is along the same lines as Christian Borntraeger's patch that fixes
      up entries with no stratergy in net/ipv4/ipvs/ip_vs_ctl.c
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9e103fa6
    • C
      [IPVS]: Fix sysctl warnings about missing strategy · 611cd55b
      Christian Borntraeger 提交于
      Running the latest git code I get the following messages during boot:
      sysctl table check failed: /net/ipv4/vs/drop_entry .3.5.21.4 Missing strategy
      [...]		  
      sysctl table check failed: /net/ipv4/vs/drop_packet .3.5.21.5 Missing strategy
      [...]
      sysctl table check failed: /net/ipv4/vs/secure_tcp .3.5.21.6 Missing strategy
      [...]
      sysctl table check failed: /net/ipv4/vs/sync_threshold .3.5.21.24 Missing strategy
      
      I removed the binary sysctl handler for those messages and also removed
      the definitions in ip_vs.h. The alternative would be to implement a 
      proper strategy handler, but syscall sysctl is deprecated.
      
      There are other sysctl definitions that are commented out or work with 
      the default sysctl_data strategy. I did not touch these. 
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      611cd55b
  2. 14 11月, 2007 1 次提交
  3. 06 11月, 2007 1 次提交
  4. 23 10月, 2007 1 次提交
  5. 19 10月, 2007 4 次提交
    • A
      V3 file capabilities: alter behavior of cap_setpcap · 72c2d582
      Andrew Morgan 提交于
      The non-filesystem capability meaning of CAP_SETPCAP is that a process, p1,
      can change the capabilities of another process, p2.  This is not the
      meaning that was intended for this capability at all, and this
      implementation came about purely because, without filesystem capabilities,
      there was no way to use capabilities without one process bestowing them on
      another.
      
      Since we now have a filesystem support for capabilities we can fix the
      implementation of CAP_SETPCAP.
      
      The most significant thing about this change is that, with it in effect, no
      process can set the capabilities of another process.
      
      The capabilities of a program are set via the capability convolution
      rules:
      
         pI(post-exec) = pI(pre-exec)
         pP(post-exec) = (X(aka cap_bset) & fP) | (pI(post-exec) & fI)
         pE(post-exec) = fE ? pP(post-exec) : 0
      
      at exec() time.  As such, the only influence the pre-exec() program can
      have on the post-exec() program's capabilities are through the pI
      capability set.
      
      The correct implementation for CAP_SETPCAP (and that enabled by this patch)
      is that it can be used to add extra pI capabilities to the current process
      - to be picked up by subsequent exec()s when the above convolution rules
      are applied.
      
      Here is how it works:
      
      Let's say we have a process, p. It has capability sets, pE, pP and pI.
      Generally, p, can change the value of its own pI to pI' where
      
         (pI' & ~pI) & ~pP = 0.
      
      That is, the only new things in pI' that were not present in pI need to
      be present in pP.
      
      The role of CAP_SETPCAP is basically to permit changes to pI beyond
      the above:
      
         if (pE & CAP_SETPCAP) {
            pI' = anything; /* ie., even (pI' & ~pI) & ~pP != 0  */
         }
      
      This capability is useful for things like login, which (say, via
      pam_cap) might want to raise certain inheritable capabilities for use
      by the children of the logged-in user's shell, but those capabilities
      are not useful to or needed by the login program itself.
      
      One such use might be to limit who can run ping. You set the
      capabilities of the 'ping' program to be "= cap_net_raw+i", and then
      only shells that have (pI & CAP_NET_RAW) will be able to run
      it. Without CAP_SETPCAP implemented as described above, login(pam_cap)
      would have to also have (pP & CAP_NET_RAW) in order to raise this
      capability and pass it on through the inheritable set.
      Signed-off-by: NAndrew Morgan <morgan@kernel.org>
      Signed-off-by: NSerge E. Hallyn <serue@us.ibm.com>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: James Morris <jmorris@namei.org>
      Cc: Casey Schaufler <casey@schaufler-ca.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      72c2d582
    • E
      sysctl: for irda update sysctl_checks list of binary paths · 8ada720d
      Eric W. Biederman 提交于
      It turns out that the net/irda code didn't register any of it's binary paths
      in the global sysctl.h header file so I missed them completely when making an
      authoritative list of binary sysctl paths in the kernel.  So add them to the
      list of valid binary sysctl paths.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NSamuel Ortiz <samuel@sortiz.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8ada720d
    • E
      sysctl: update sysctl_check_table · 49ffcf8f
      Eric W. Biederman 提交于
      Well it turns out after I dug into the problems a little more I was returning
      a few false positives so this patch updates my logic to remove them.
      
      - Don't complain about 0 ctl_names in sysctl_check_binary_path
        It is valid for someone to remove the sysctl binary interface
        and still keep the same sysctl proc interface.
      
      - Count ctl_names and procnames as matching if they both don't
        exist.
      
      - Only warn about missing min&max when the generic functions care.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Cc: Alexey Dobriyan <adobriyan@sw.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      49ffcf8f
    • E
      sysctl: Error on bad sysctl tables · fc6cd25b
      Eric W. Biederman 提交于
      After going through the kernels sysctl tables several times it has become
      clear that code review and testing is just not effective in prevent
      problematic sysctl tables from being used in the stable kernel.  I certainly
      can't seem to fix the problems as fast as they are introduced.
      
      Therefore this patch adds sysctl_check_table which is called when a sysctl
      table is registered and checks to see if we have a problematic sysctl table.
      
      The biggest part of the code is the table of valid binary sysctl entries, but
      since we have frozen our set of binary sysctls this table should not need to
      change, and it makes it much easier to detect when someone unintentionally
      adds a new binary sysctl value.
      
      As best as I can determine all of the several hundred errors spewed on boot up
      now are legitimate.
      
      [bunk@kernel.org: kernel/sysctl_check.c must #include <linux/string.h>]
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Cc: Alexey Dobriyan <adobriyan@sw.ru>
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fc6cd25b