Messages in this thread Patch in this message | | | Date | Sun, 29 Jun 2008 22:41:16 -0700 | From | "Andrew G. Morgan" <> | Subject | Re: [PATCH 2/4] security: filesystem capabilities bugfix2 |
| |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
David Howells wrote: | Andrew G. Morgan <morgan@kernel.org> wrote: | |> +static inline int cap_limit_straced_target(void) { return 1; } | | Calling it cap_limit_ptraced_target() would probably be better.
You are right. Fix-up patch attached.
Cheers
Andrew -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFIaHH8+bHCR3gb8jsRAgKHAJ4uu7Xd6PZObvIwzvJPSA6lGBpY1QCfUb20 bw1vY5cX8qW7UBMel6qgi5I= =iacs -----END PGP SIGNATURE----- From 0b3f48f509bf934f9fdc83a6e851bfd69c779952 Mon Sep 17 00:00:00 2001 From: Andrew G. Morgan <morgan@kernel.org> Date: Sun, 29 Jun 2008 22:37:40 -0700 Subject: [PATCH] ptraced -> straced
Within the kernel, ptraced is a more appropriate name.
Reported-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew G. Morgan <morgan@kernel.org> --- security/commoncap.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/security/commoncap.c b/security/commoncap.c index a9ea921..33d3433 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -103,13 +103,13 @@ static inline int cap_inh_is_capped(void) return (cap_capable(current, CAP_SETPCAP) != 0); } -static inline int cap_limit_straced_target(void) { return 1; } +static inline int cap_limit_ptraced_target(void) { return 1; } #else /* ie., ndef CONFIG_SECURITY_FILE_CAPABILITIES */ static inline int cap_block_setpcap(struct task_struct *t) { return 0; } static inline int cap_inh_is_capped(void) { return 1; } -static inline int cap_limit_straced_target(void) +static inline int cap_limit_ptraced_target(void) { return !capable(CAP_SETPCAP); } @@ -348,7 +348,7 @@ void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe) bprm->e_uid = current->uid; bprm->e_gid = current->gid; } - if (cap_limit_straced_target()) { + if (cap_limit_ptraced_target()) { new_permitted = cap_intersect(new_permitted, current->cap_permitted); -- 1.5.6.1
| |