qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Setting new user:group with -daemonize?
@ 2008-07-15 23:09 David Barrett
  2008-07-16  1:39 ` Anthony Liguori
  0 siblings, 1 reply; 4+ messages in thread
From: David Barrett @ 2008-07-15 23:09 UTC (permalink / raw)
  To: qemu-devel

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-18 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 23:09 [Qemu-devel] Setting new user:group with -daemonize? David Barrett
2008-07-16  1:39 ` Anthony Liguori
2008-07-16  2:14   ` David Barrett
2008-07-18 17:00     ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).