ChangeSet 1.786.71.1, 2002/10/25 14:52:30-07:00, greg@kroah.com Merge kroah.com:/home/greg/linux/BK/bleeding_edge-2.5 into kroah.com:/home/greg/linux/BK/lsm-2.5 diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c --- a/arch/ppc64/kernel/sys_ppc32.c Tue Nov 26 14:02:47 2002 +++ b/arch/ppc64/kernel/sys_ppc32.c Tue Nov 26 14:02:47 2002 @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -3520,8 +3521,7 @@ if ((retval = bprm.envc) < 0) goto out_mm; - retval = security_ops->bprm_alloc_security(&bprm); - if (retval) + if ((retval = security_bprm_alloc(&bprm))) goto out; retval = prepare_binprm(&bprm); @@ -3544,7 +3544,7 @@ retval = search_binary_handler(&bprm,regs); if (retval >= 0) { /* execve success */ - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); return retval; } @@ -3557,7 +3557,7 @@ } if (bprm.security) - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); out_mm: mmdrop(bprm.mm); diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c --- a/arch/sparc64/kernel/sys_sparc32.c Tue Nov 26 14:02:47 2002 +++ b/arch/sparc64/kernel/sys_sparc32.c Tue Nov 26 14:02:47 2002 @@ -2967,8 +2967,7 @@ if ((retval = bprm.envc) < 0) goto out_mm; - retval = security_ops->bprm_alloc_security(&bprm); - if (retval) + if ((retval = security_bprm_alloc(&bprm))) goto out; retval = prepare_binprm(&bprm); @@ -2991,7 +2990,7 @@ retval = search_binary_handler(&bprm, regs); if (retval >= 0) { /* execve success */ - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); return retval; } @@ -3004,7 +3003,7 @@ } if (bprm.security) - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); out_mm: mmdrop(bprm.mm); diff -Nru a/include/linux/sched.h b/include/linux/sched.h --- a/include/linux/sched.h Tue Nov 26 14:02:47 2002 +++ b/include/linux/sched.h Tue Nov 26 14:02:47 2002 @@ -586,9 +586,9 @@ unsigned long, const char *, void *); extern void free_irq(unsigned int, void *); -/* capable prototype and code moved to security.[hc] */ -#include -#if 0 + +#ifndef CONFIG_SECURITY +/* capable prototype and code are in security.[hc] if CONFIG_SECURITY */ static inline int capable(int cap) { if (cap_raised(current->cap_effective, cap)) { @@ -597,7 +597,7 @@ } return 0; } -#endif /* if 0 */ +#endif /* * Routines for handling mm_structs diff -Nru a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c --- a/net/decnet/af_decnet.c Tue Nov 26 14:02:47 2002 +++ b/net/decnet/af_decnet.c Tue Nov 26 14:02:47 2002 @@ -797,7 +797,7 @@ * dn_prot_sock ? Would be nice if the capable call would go there * too. */ - if (security_ops->dn_prot_sock(saddr) && + if (security_dn_prot_sock(saddr) && !capable(CAP_NET_BIND_SERVICE) || saddr->sdn_objnum || (saddr->sdn_flags & SDF_WILD)) return -EACCES;