From: "Bill O'Donnell" <billodo@sgi.com>
To: KaiGai Kohei <kaigai@ak.jp.nec.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
Chris Friedhoff <chris@friedhoff.org>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
Stephen Smalley <sds@tycho.nsa.gov>,
James Morris <jmorris@namei.org>,
Chris Wright <chrisw@sous-sol.org>, Andrew Morton <akpm@osdl.org>,
KaiGai Kohei <kaigai@kaigai.gr.jp>,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [PATCH 1/1] security: introduce fs caps
Date: Wed, 15 Nov 2006 11:06:34 -0600 [thread overview]
Message-ID: <20061115170633.GA21345@sgi.com> (raw)
In-Reply-To: <455B0357.2050400@ak.jp.nec.com>
On Wed, Nov 15, 2006 at 09:08:55PM +0900, KaiGai Kohei wrote:
| Serge E. Hallyn wrote:
| >Quoting Bill O'Donnell (billodo@sgi.com):
| >>8102 execve("/sbin/setfcaps", ["setfcaps", "cap_net_raw=ep",
| >>"/bin/ping"], [/* 67 vars */]) = 0
| - snip -
| >>8102 capget(0x19980330, 0, {0, 0, 0}) = -1 EINVAL (Invalid argument)
| >
| >I don't see why this capget is returning -EINVAL. In fact I don't see
| >why it happens at all - cap_inode_setxattr would check
| >capable(CAP_SYS_ADMIN), but setxattr hasn't been called yet. Looking at
| >both libcap and setfcaps.c, I don't see where the capget comes from.
| >
| >As for the -EINVAL, kernel/capability.c:sys_capget() returns -EINVAL if
| >the _LINUX_CAPABILITY_VERSION is wrong - you have 0x19980330 which is
| >correct - if pid < 0 - but you send in 0 - or if security_capget
| >returns -EINVAL, which cap_capget (and dummy_capget) don't do.
| >
| >Kaigai, do you have any ideas?
|
| Bill said that he uses SLES10/ia64, so the version of libcap is different
| from Fedora Core's one. 'libcap-1.92-499.4.src.rpm' is bandled.
|
| Then, I found a strange code in libcap-1.92-499.4.src.rpm.
|
| The setfcaps calls cap_from_text() which is defined in libcap to parse
| the command line argument. It has the following function call chains:
|
| cap_from_text()
| -> cap_init()
| -> _libcap_establish_api()
- snip -
| capget() is called from _libcap_establish_api() with full-zeroed
| __user_cap_header_struct object at first time.
| The result of this, sys_capget() in kernel will return -EINVAL.
| (Why did strace say the first argument is 0x19980330?)
|
| Probably, Bill didn't update libcap.so.
No, I didn't...
certify:~/libcap-1.10/progs # ls -altr /lib/libcap*
-rwxr-xr-x 1 root root 22672 2006-06-16 09:56 /lib/libcap.so.1.92
-rw-r--r-- 1 root root 53363 2006-11-13 16:04 /lib/libcap.so.1.10
lrwxrwxrwx 1 root root 14 2006-11-13 16:04 /lib/libcap.so.1 ->libcap.so.1.92
lrwxrwxrwx 1 root root 11 2006-11-13 16:04 /lib/libcap.so -> libcap.so.1
|
| But I can't recommend Bill to update libcap immediately.
| As Hawk Xu said, it may cause a serious problem on the distro
| except Fedora Core 6. :(
What version of libcap is on FC6?
|
| I have to recommend to use 'fscaps-1.0-kg.i386.rpm' now.
| It includes the implementation of interaction between application and xattr.
| (Of couse, it's one of the features which should be provided by libcap.)
But that won't work on ia64 will it?
Thanks,
Bill
--
Bill O'Donnell
SGI
651.683.3079
billodo@sgi.com
next prev parent reply other threads:[~2006-11-15 17:04 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-08 22:24 Serge E. Hallyn
2006-11-08 22:48 ` Alexey Dobriyan
2006-11-08 23:52 ` Serge E. Hallyn
2006-11-09 5:27 ` Alexey Dobriyan
2006-11-09 6:17 ` Serge E. Hallyn
2006-11-13 16:43 ` Serge E. Hallyn
2006-11-13 21:04 ` Alexey Dobriyan
2006-11-14 3:01 ` Serge E. Hallyn
2006-11-09 6:10 ` Serge E. Hallyn
2006-11-09 9:33 ` Chris Friedhoff
2006-11-09 14:50 ` Bill O'Donnell
2006-11-13 21:57 ` Bill O'Donnell
2006-11-14 5:25 ` Serge E. Hallyn
2006-11-14 13:55 ` Bill O'Donnell
2006-11-14 15:23 ` Serge E. Hallyn
2006-11-14 17:28 ` Chris Friedhoff
2006-11-14 17:40 ` Bill O'Donnell
2006-11-15 12:08 ` KaiGai Kohei
2006-11-15 17:06 ` Bill O'Donnell [this message]
2006-11-15 21:49 ` Chris Friedhoff
2006-11-16 14:47 ` Bill O'Donnell
2006-11-17 18:37 ` Chris Friedhoff
2006-11-17 19:12 ` Chris Friedhoff
-- strict thread matches above, loose matches on Subject: below --
2006-11-03 16:57 chris friedhoff
2006-11-03 20:00 ` Serge E. Hallyn
2006-11-03 20:29 ` Stephen Smalley
2006-11-03 20:47 ` Serge E. Hallyn
2006-11-04 2:08 ` Kyle Moffett
2006-11-04 4:12 ` James Morris
2006-11-06 13:31 ` Stephen Smalley
2006-09-06 18:27 Serge E. Hallyn
2006-09-06 20:51 ` Paul Jackson
2006-09-07 1:25 ` Serge E. Hallyn
2006-09-07 6:40 ` Paul Jackson
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=20061115170633.GA21345@sgi.com \
--to=billodo@sgi.com \
--cc=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=chris@friedhoff.org \
--cc=chrisw@sous-sol.org \
--cc=jmorris@namei.org \
--cc=kaigai@ak.jp.nec.com \
--cc=kaigai@kaigai.gr.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=serue@us.ibm.com \
/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
Powered by JetHome