Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-28-2005, 08:29 AM   #1
LQ Newbie
Registered: Sep 2005
Posts: 1

Rep: Reputation: 0
Unhappy Capability

Hi, I would like to use capability but my test failed. Help me please
Here is my problem : (I want to launch a shell and try capability with chmod)
capheader_t header;
capdata_t data;
header.version = _LINUX_CAPABILITY_VERSION; = 0;

//data.effective = data.permitted = data.inheritable = 0;
data.effective = data.permitted = data.inheritable = CAP_SETUID;
capset(&header, &data);
perror("capset"); // Operation not permited

printf("launching shell...\n");
execl("/bin/sh", "/bin/sh", NULL);
Questions :
What is pid in header?
What I must do for this code work?
Must I recompile the kernel with some change like said in :


Last edited by g26108; 09-28-2005 at 09:50 AM.
Old 09-30-2005, 04:47 PM   #2
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 230

Rep: Reputation: 31
This post would probably be better served in the programming forum.
You should probably email the author of the FAQ and see if he has updated info on if.
also, search the linux-kernel archives for recent info on it.
if all that fails, try asking about it on the kernel list.

good luck


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why no MP3 capability? rusty_slacker Fedora 3 10-31-2005 02:45 PM
Terminal Services Capability lxuzer Linux - Networking 7 07-26-2005 06:27 AM
I can do it with less capability! Anniebaby Linux - Security 3 10-30-2003 08:51 PM
syslogd capability in cygwin? Jay_hizownsef Linux - General 0 06-11-2003 11:28 AM
Linux Capability nitr0gen Programming 0 02-15-2002 07:31 AM

All times are GMT -5. The time now is 03:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration