Re: 2.1.92: raising capabilities on `dmesg'(pid=633) [0803]:2099

Alexander Kjeldaas (astor@guardian.no)
Thu, 2 Apr 1998 22:37:36 +0200


--JpNTDwzlM2Ie8A6+
Content-Type: text/plain; charset=us-ascii

On Thu, Apr 02, 1998 at 02:05:41PM +0200, Christoph Lorenz wrote:
>
> Hi,
>
> what's the reason for getting tons of the following messages in 2.1.92:
>
> raising capabilities on `mrtg`(pid=605) [0803]:1234
>
> It's whenever a job runs under the "root" account.
> I haven't figured out in the sources (fs/exec.c), how to stop
> these messages or how to solve this problem (some jobs *have* to
> run unter UID=0).
>

It's a debug message that should be removed. Try the following patch.

astor

-- 
 Alexander Kjeldaas, Guardian Networks AS, Trondheim, Norway
 http://www.guardian.no/

--JpNTDwzlM2Ie8A6+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=cap_linus_4

diff -urN linux92/fs/exec.c lp92/fs/exec.c --- linux92/fs/exec.c Thu Apr 2 15:19:59 1998 +++ lp92/fs/exec.c Thu Apr 2 15:21:52 1998 @@ -684,15 +684,8 @@ current->cap_permitted.cap = new_permitted; current->cap_effective.cap = new_permitted & bprm->cap_effective.cap; - /* XXX - Audit candidate */ - if (!cap_isclear(current->cap_effective)) { - printk(KERN_NOTICE - "raising capabilities on `%s'(pid=%d) [%04x]:%lu\n", - current->comm, current->pid, - kdev_t_to_nr(bprm->dentry->d_inode->i_dev), - bprm->dentry->d_inode->i_ino); - } - + /* AUD: Audit candidate if current->cap_effective is set */ + current->suid = current->euid = current->fsuid = bprm->e_uid; current->sgid = current->egid = current->fsgid = bprm->e_gid; if (current->euid != current->uid || current->egid != current->gid || diff -urN linux92/kernel/ksyms.c lp92/kernel/ksyms.c --- linux92/kernel/ksyms.c Thu Apr 2 15:20:00 1998 +++ lp92/kernel/ksyms.c Thu Apr 2 15:28:22 1998 @@ -265,6 +265,7 @@ EXPORT_SYMBOL(unregister_binfmt); EXPORT_SYMBOL(search_binary_handler); EXPORT_SYMBOL(prepare_binprm); +EXPORT_SYMBOL(compute_creds); EXPORT_SYMBOL(remove_arg_zero); /* execution environment registration */ @@ -354,6 +355,7 @@ EXPORT_SYMBOL(_ctype); EXPORT_SYMBOL(secure_tcp_sequence_number); EXPORT_SYMBOL(get_random_bytes); +EXPORT_SYMBOL(securebits); /* Program loader interfaces */ EXPORT_SYMBOL(setup_arg_pages);

--JpNTDwzlM2Ie8A6+--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu