[libvirt] [PATCH] libvirtd: create run dir when running at non-root user
Eric Blake
eblake at redhat.com
Fri Aug 26 14:31:30 UTC 2011
On 08/26/2011 03:51 AM, xuhj at linux.vnet.ibm.com wrote:
> From: soulxu<soulxu at soulxu-ThinkPad-T410.(none)>
>
>
> Signed-off-by: Xu He Jie<xuhj at linux.vnet.ibm.com>
>
> When libvirtd is running at non-root user, it won't create ${HOME}/.libvirt.
>
> It will show error message:
> 17:44:16.838: 7035: error : virPidFileAcquirePath:322 : Failed to open pid file
Thanks for the report and potential patch.
>
> + old_umask = umask(022);
> + if (mkdir (run_dir, 0755)) {
However, this part is wrong; use virFileMakePath() from util.h to create
an arbitrary directory.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list