[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTEST PATCH 1/3] ts-depriv-audit-qemu: Create complete /run/user in appropriate root



On Mon, Nov 19, 2018 at 04:27:39PM +0000, Ian Jackson wrote:
> * Use mkdir -p, rather than trying to only create /run/user/$uid.
>   That helps if /run and/or /run/user do not exist, as they do in
>   libxl-made chroots with recent libxl (which gets qemu to chroot).
> 
> * Do all of this in the root directory of the qemu process, not our
>   own root directory.  So it works if qemu is chrooted.
> 
> CC: George Dunlap <george.dunlap@xxxxxxxxxx>
> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> ---
>  ts-depriv-audit-qemu | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/ts-depriv-audit-qemu b/ts-depriv-audit-qemu
> index 5d09350..4e07d76 100755
> --- a/ts-depriv-audit-qemu
> +++ b/ts-depriv-audit-qemu
> @@ -48,9 +48,10 @@ END
>          qpid=$(xenstore-read /local/domain/$domid/image/device-model-pid)
>          uid=$(id -u xen-qemuuser-range-base)
>          uid=$(( $uid + $domid ))
> -        test -d /run/user || mkdir -m 2755 /run/user
> -        if mkdir -m 2700 /run/user/$uid; then
> -            chown $uid:root /run/user/$uid
> +        qroot=$(readlink /proc/8123/root)

8123? I think you mean $uid or something.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.