From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: er_tou <er_tou@163.com>
Cc: linux-integrity <linux-integrity@vger.kernel.org>
Subject: Re: [Linux-ima-devel] Centos7 execute 'su -c "keyctl pipe 820080884"' show keyctl_read_alloc: Permission denied
Date: Tue, 17 Oct 2017 18:26:19 -0400 [thread overview]
Message-ID: <1508279179.4513.67.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <639bd982.139dd.15f0072080e.Coremail.er_tou@163.com>
On Mon, 2017-10-09 at 17:23 +0800, er_tou wrote:
>
> hello,
> I encountered a problem, execute the following command to show the error.
> $ su -c 'mkdir -p /etc/keys'
> # To create and save the kernel master key (user type):
> $ su -c 'modprobe trusted encrypted'
> $ su -c 'keyctl add user kmk-user "`dd if=/dev/urandom bs=1 count=32 2>/dev/null`" @u'
> $ su -c 'keyctl pipe `keyctl search @u user kmk-user` > /etc/keys/kmk-user.blob'
> show "keyctl_read_alloc: Permission denied".
>
>
> Problem location is 'keyctl pipe'.
> [root@localhost ima_key_sign]# cat /proc/keys
> 029fddf9 I------ 1 perm 1f030000 0 0 asymmetri CentOS Linux kernel signing key: d48863a7c16fcc274123e6298f74f057af19fc54: X509.RSA af19fc54 []
> 034d0e68 I--Q--- 1 perm 1f3f0000 1000 65534 keyring _uid.1000: empty
> 0a1ab8e3 I--Q--- 1 perm 3f010000 0 0 user kmk-user: 10
>
>
> This keyring "kmk-user" don't have read permission.
> Anyone have the question ?
> I hope get help? Thank, Thank, Thank
Sorry, I'm not seeing this problem. Have you tried running the
commands as real root (eg. "su -"), not "su -c"?
Mimi
>
> ----------------------------------------------------------------------------------------
> but, below command can execute.
> $ mkdir -p /etc/keys
> # To create and save the kernel master key (user type):
> $ modprobe trusted encrypted
> $ keyctl add user kmk-user "`dd if=/dev/urandom bs=1 count=32 2>/dev/null`" @u
> $ keyctl pipe `keyctl search @u user kmk-user` > /etc/keys/kmk-user.blob
>
>
> Thanks,Looking forward to your reply!
>
parent reply other threads:[~2017-10-17 22:26 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <639bd982.139dd.15f0072080e.Coremail.er_tou@163.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508279179.4513.67.camel@linux.vnet.ibm.com \
--to=zohar@linux.vnet.ibm.com \
--cc=er_tou@163.com \
--cc=linux-integrity@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).