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

Re: [PATCH v2] libs/light: make it build without setresuid()


  • To: Manuel Bouyer <bouyer@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 29 Jan 2021 22:51:14 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pXJmn53IVoFVFKKvay8IFSw/isERsH1yW8ETsr5xRog=; b=koLNnAvBYsFezz2xxGSRFP0e3c9j31UQsfTDDGzmWEzFqk1pjs/0UHLqIrBOxyVkuYNH1GORSaAiVa7eN9HqWRiYffW3tD5QDwDw70IT47SnIe2TFLsHPQ9r0cvr2ZM9oGTxjJJlmzuFL4Yc7BtWxLbGSOLHJQRXhOQ4M76wsbFIfs9RH678a5PrB4JQ0gytf9pjptu9c40QlU+2BlSPvSwEAeP2u/cIAG4rQ/zXfw+z0GwdDqPSzIIASzxBT+SUa00wkXiOuRc4/jha1khYi7QFN+tUsVylj3P6MKE/r+DtMHLnknk6uUO3F/aMVzrgcny3DOaXpb5NcYgRkcOxaQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YzHeCSVK/7f2ZxOBjQcEBBT/0Enz385OPFRgXrRIhFY8gTfdYnZI0ni28B9RCp12360e7j98HezHWBX9uBJuHz6I9CByU+Ew4x4FgyHBAgKjtcrh7aOqjLXF/wTm80PCpgoTGTkJln1D0rCdpAbnE1GHLCvpAj6FS6yazmWhXC+ARmWZGCw5ONA4AHG/NMVFz3q4VRHCp2j4WSppjEyLd4EkQbXDk8Hd9rbYLD/VGFyO8+jXHNyiKas4T2XSGoXEXET24NwY36rDPX7fj6J2DtxzW/ndjkTFFdjKCem/gHUTyVgwHhDhNL5NIb9DQUzY37ixwMW5vOmZpCW0rlVqjA==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Fri, 29 Jan 2021 22:51:40 +0000
  • Ironport-sdr: vWacEq2tfcCd9CxNfTMfURnDuJCjvvktWOYss5SepHnf6s/KeLESrf5+lOxgSP5JPvYT3wtXcO adR9hOmxeLMc27PAIZGMhPMPvZ36Sc68L4BPqS6eN3OzgHFDs9q3hil/p+I/2L21bJrH2zbdk6 YSELUDh/NXa3bCn4/IkWvYeWczQ2E/1kf7sIC18GHd8gkurCAVYn+tjmJ+MqU1rFHvw9wcGiYn /4XvafqcroigZndxqM3vR+j0kkfMfxeJp9qvquAK3MSMW5mKp5Zdo2aSf1LmsrnUxX3QBJ4j2Z Ryg=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26/01/2021 22:47, Manuel Bouyer wrote:
> diff --git a/tools/libs/light/libxl_setresuid.c 
> b/tools/libs/light/libxl_setresuid.c
> new file mode 100644
> index 0000000000..ac5cb5db53
> --- /dev/null
> +++ b/tools/libs/light/libxl_setresuid.c
> @@ -0,0 +1,23 @@
> +/*
> + * Copyright (C) 2021
> + * Author Manuel Bouyer <bouyer@xxxxxxxxxx>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU Lesser General Public License as published
> + * by the Free Software Foundation; version 2.1 only. with the special
> + * exception on linking described in file LICENSE.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU Lesser General Public License for more details.
> + */
> + 
> +#include "libxl_osdeps.h" /* must come before any other headers */
> +
> +#include "libxl_internal.h"
> +
> +int libxl__setresuid(uid_t ruid, uid_t euid, uid_t suid)
> +{
> +    setresuid(ruid, euid, suid);
> +}

Given the freeze, and discussions on IRC, I have committed most of this
series.

This particular patch doesn't compile, but I fixed it up.

Still outstanding are "NetBSD: use system-provided headers", the
followon patches requested in "libs/light: pass some infos to qemu", and
"xenpmd.c: use dynamic allocation" which failed like this:

https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/996140268

This latter one I didn't feel confident fixing in a way which didn't
break NetBSD, particularly at this point when I'm also racing to get
other content ready as well.

~Andrew



 


Rackspace

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