LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 09-28-2005, 09:29 AM   #1
g26108
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)
main(){
capheader_t header;
capdata_t data;
header.version = _LINUX_CAPABILITY_VERSION;
header.pid = 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);
perror("chroot");
}
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 :
http://killa.net/infosec/caps/

Thanks
Kevin

Last edited by g26108; 09-28-2005 at 10:50 AM.
 
Old 09-30-2005, 05:47 PM   #2
youngstorm
Member
 
Registered: May 2003
Location: Valdosta, GA, USA
Distribution: Fedora 14, Windoze XP & 7
Posts: 225

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
Michael
 
  


Reply


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 03:45 PM
Terminal Services Capability lxuzer Linux - Networking 7 07-26-2005 07:27 AM
I can do it with less capability! Anniebaby Linux - Security 3 10-30-2003 09:51 PM
syslogd capability in cygwin? Jay_hizownsef Linux - General 0 06-11-2003 12:28 PM
Linux Capability nitr0gen Programming 0 02-15-2002 08:31 AM


All times are GMT -5. The time now is 02:43 AM.

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