[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Setting new user:group with -daemonize?
From: |
David Barrett |
Subject: |
[Qemu-devel] Setting new user:group with -daemonize? |
Date: |
Tue, 15 Jul 2008 16:09:27 -0700 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080505) |
Is there any way to make the qemu process change users after daemonizing?
Basically, I want to start it as root so I can have it "-redir" with a
low port (80), and then change to a non-root user after daemonizing. Is
there any way to do this currently?
Thankfully it opens the -redir port before forking, so it looks like a
straightforward change to vc.c: basically adding a call to "setuid()"
and "setgid()" after the call to "chdir()" on line 8711.
I'd update the -daemonize syntax as follows:
-daemonize [user[:group]]
Is there any interest in such a patch?
-david
PS: Why does it fork twice?
- [Qemu-devel] Setting new user:group with -daemonize?,
David Barrett <=