General :: About Real UID And Forking?
Feb 13, 2010
I'm thinking of designing a software that may need to change the current user to a normal user if run as root. But from what i've read, you can still switch back to root if you were root in the first place (meaning, the real UID is 0). I'd like to make this impossible. I think the solution is forking but i'd like you to confirm this.
My question is, does the real UID of the children is the effective UID of the parent at the time the fork is done? My manual lists what's inherited from the parent but doesn't states this. I'd like an answer about Linux kernel and about Unices in general (i'd like to make it at least POSIX-portable)
View 2 Replies
ADVERTISEMENT
Mar 3, 2011
I am trying to create two processes , a parent process and a child process where each of them have their respective CLI. At any point, the user should be able to switch between the CLI of the parent and child processes. I could find three possible approaches to the problem
1) fork the child process into a new terminal
2) activate the CLI of only the process which is currently in the foreground.
3) Write a script (.bashrc triggers this script on login) to start the two processes separately in two different terminals, such that the second process is triggered once the first process reaches a certain stage in execution.
The first approach probably requires the controlling terminal of the child process to be changed. Can this be achieved ? The second approach will require for the process (parent/child) to itself to know everytime it is put in background / foreground so that its CLI operations can be suspended/resumed respectively. Is this possible? Can a script start programs in a new terminal other than the one it is running in?
View 2 Replies
View Related
Dec 27, 2010
I am building a queue system (in C on CentOS 5) where each directory queue has a number of process instances 'watching' it. I have a root-permission queue supervisor process which does all the forking, and the instance processes give up root as their first action. For max security each queue is accessible to a different set of users and groups.
I need to keep the RAM requirements as low as possible, so I am relying heavily on copy-on-write (since all memory writes are to shmget() shared memory)
Each process presently dlopen's the libraries it requires after fork, but I'm wondering if I would gain by performing the dlopen before forking a number of instances which all require the same libraries.
Any pointers to mid-level tutorials on dlopen and fork internals would be most appreciated: this is about my third post anywhere since I converted to Linux, but I just can't find the answer to this anywhere online.
View 3 Replies
View Related
Apr 10, 2011
about VIP (Virtual IP) and real IP address used for load balancing. How they work and how to configure real IP.
View 1 Replies
View Related
Jan 7, 2011
know of a way in Linux to have a virtual ethernet (e.g., eth0:1) appear as a "real" ethernet (eth1)? I ask because I have an old Shuttle box that only has one mobo ethernet and no way to add more. I'd like to use it in my Oracle RAC lab, but RAC requires two physical ethernets. You can't fool it with eth0 and eth0:1. RAC won't setup correctly if there's only one eth adapter, so I'm wondering if there is a way to fake two ethernets. I do not care about performance or reliability - it's my home lab. I fully realize that this violates every principle of HA, but I'm just using it to study. Worst case, I can get a USB dongle ethernet adapter, but I'd prefer to avoid the cost if possible.
View 3 Replies
View Related
Apr 1, 2010
I am using the standalone k10temp temperature sensor but it doesn't give the actual temperature of the cpu, just some "bogus" temp value that isn't very useful.Does anyone know how you can calculate the real temperature from this reading?
View 3 Replies
View Related
Dec 7, 2009
I've got the following problem:
1. I start two bash windows
2. In one of them I start a script test1:
Code:
This script puts a natural number 5 times a second.
3. Then in the second bash window I type (as root):
Code:
The script test2 looks as follows:
Code:
While true; do
true;
done
During the following 15 seconds test2 is the process with the highest real-time priority. As far as I know the script doesn't perform any system calls so it shouldn't be suspended even for a minimal timeslice. My question is: why the process test1 manages to put a few numbers on the screen before test2 stops. I thought that test2 would exclusivly own the processor for 15 seconds.
View 8 Replies
View Related
May 21, 2010
i am using ubuntu 9.10 on a x386 machine, have libasound 2 installed & updated, cannot install realplayer 11 because is says Error: Dependency is not satisfiable: libasound2 (>> 1.0.22). likei said, libasound is installed & updated according to synaptics.
View 6 Replies
View Related
Jan 17, 2011
I have to write one Shell script where i have to find one word in current generated log.Log name has specific format like 'NAME_DDMMYY_HHMMSS'.log.Each time i have to go and check the word in newly generated log.How can i pass the newly generated log name in my Script?
View 2 Replies
View Related
Mar 23, 2010
what the recommended way to set up real-time (or near real-time) folder synchronization among 2+ servers. I looked a rsync but that doesn't sound real-time and it looks like its something that you might put in a cron once an hour.
View 1 Replies
View Related
Aug 12, 2011
Debian 6 ("Squeeze") uses a rebranded version of Firefox called Iceweasel. It however lacks plugin support, most of my favorites don't work.So what is best way to install the "real" Firefox on Debian?
View 2 Replies
View Related
Jan 25, 2010
i m new in linux.today i tried to install real player on my system using the following command,
yum install "path of the software"
but unable to install.how can i install easily.i m using redhat linux.
View 2 Replies
View Related
Dec 1, 2010
How can I search "$" in vim, which is not the end of line but the real char '$'.
View 1 Replies
View Related
Nov 2, 2009
I have a problem i.e; how to install real player in fedora linux 5.
View 1 Replies
View Related
Jan 3, 2011
I have a log file that I would like to examine during some changes under process that writes to this log.
Is there some way to open this file and read in real time changes written to it ?
View 5 Replies
View Related
May 26, 2010
What is the best way to install a plugin capable of playing real videos for Debian Linux? In particular I want this web page to run correctly under Iceweasel and Chrome:
[URL]
View 1 Replies
View Related
Apr 20, 2011
The situation is; I am running a web server (Ubuntu 10.10 server) on virtualbox v.4 inside Ubuntu 10.10 Desktop and now I want to clone entire web server on my brand new PC.
I found a possible solution here: [URL]
View 2 Replies
View Related
Aug 16, 2011
I have an old hp that i installed ubuntu on and I was wondering how I can turn it into a real router. By real router I don't just mean broadcast the internet but use security software, configurations, and all the stuff normally found on a real router. What are the steps i need to take? I dont have 2 NIC's in it just one but I do have a wireless usb that I can just stick into it.
View 1 Replies
View Related
Jul 24, 2011
I am looking for web base real time iftop like tool for linux.I mean it shows current active connection on a NIC of any Client that connected to it .I do not want offline data I want realtime data for current connections on web.
View 2 Replies
View Related
Jul 13, 2011
I am running programs remotely but they are terribly slow. I'm on a windows machine which may be my first problem. I have killer ping and download speed so they should run fine. What can I do to resolve this.
View 2 Replies
View Related
Nov 13, 2010
Whenever I am uploading a *.php file to real server It don't transfer.
View 1 Replies
View Related
May 27, 2010
I know this command exists I just can't seem to find it. I want to see the last few lines of a file as more are added in real time. Can someone point me in the right direction?
View 2 Replies
View Related
Aug 2, 2010
I was wondering if there is a command to show a real-time creation of files. I basically executed a command that will created thousands of files and takes a long time. I want to check if it is still creating additional files or if ti got frozen.
View 3 Replies
View Related
Feb 18, 2011
kernel 2.6.21.5, Slackware 12.0 How can I obtain real time information about disk activity (processes transfering data to/from the hard disk)?
View 3 Replies
View Related
Jul 15, 2010
I have a few servers that are exposed to the internet. When someone tried to brute force hack in to the ssh, ossec adds their IP to the hosts.deny. Then the hacker (read: script kiddie) moves to the next IP up the line and hits my next server, etc, etc.
I end up getting 20 emails for all the servers that they hit.
My question, is there anyway to sync the hosts.deny file across multiple servers so that if they are locked out of one, they are locked out of all?
View 3 Replies
View Related
May 18, 2010
I'd like to have a copy of a web site on my local drive. Then when I make changes to that copy, have those changes automatically updated on the site's server. Ideally I'd like to tell it to only do this for certain file types. Does anybody know of a way to do this with Linux?
View 2 Replies
View Related
Sep 8, 2010
install Xenomai on real-time kernel (With PREEMPT_RT)?
View 1 Replies
View Related
Aug 9, 2011
i find no solution to play .rm file which open in real player.
real player does not support linux.
how can i play .rm file in linux or altrnatively how can i install ral player in ubuntu 11.04
View 5 Replies
View Related
Mar 21, 2010
I'm trying to check my server's bandwidth usage in real time, installed the following programs but none worked so far.
Iptraf - No results even when using iptraf -u
Tcptrack - Error : pcap_loop: cooked-mode frame doesn't have room for sll header
Iftop - No results, everything 0b
Are there any programs that displays bandwidth usage in real time and actually works on VPSes? Or getting real time bandwidth usage on a VPS is simply impossible?
View 5 Replies
View Related
Apr 3, 2011
Terminal with real time dmesg output I want to use tty12 for system messages. Is there a way to mirror all kernel messages to there?
View 2 Replies
View Related