LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-10-2005, 11:15 PM   #1
fpfernando
LQ Newbie
 
Registered: Oct 2005
Distribution: RH 9
Posts: 24

Rep: Reputation: 15
Can We Run Raw Sockets With User Permissions


hi all,



can we run raw sockets with user permissions.....................
 
Old 10-11-2005, 12:45 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Not directly. Use setuid/seteuid to change the user temporaryly. Example
 
Old 10-27-2005, 06:03 AM   #3
fpfernando
LQ Newbie
 
Registered: Oct 2005
Distribution: RH 9
Posts: 24

Original Poster
Rep: Reputation: 15
ok lets say i go by ur method...



and when i open the socket it will be in root


and after that can i set back to non-root cause i need a file to be opened and the data from the socket must be written to the file..............



like


Setting To Root

Opening the Socket

Setting Back To Non -Root

Opening the file and storing the data..........


( IS THIS POSSIBLE)
 
  


Reply

Tags
programming, setuid



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Raw Ethernet Sockets alanwolfen Programming 2 01-06-2005 06:51 PM
raw sockets and C wrongman Programming 3 05-04-2004 02:17 PM
can I use mmap with raw sockets? kanth Programming 2 02-28-2004 12:42 PM
Raw sockets root user work around P_Shep Programming 2 11-18-2003 11:35 AM
raw sockets BashTin Programming 1 06-07-2003 06:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration