From nobody Mon Jan 15 04:54:05 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TD0DW0nhkz57f04 for ; Mon, 15 Jan 2024 04:54:35 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TD0DV52nsz4N1K; Mon, 15 Jan 2024 04:54:34 +0000 (UTC) (envelope-from 6yearold@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ua1-f44.google.com with SMTP id a1e0cc1a2514c-7d1921f440bso45289241.0; Sun, 14 Jan 2024 20:54:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705294473; x=1705899273; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sYKMvdqVRB6LgwzUL4Y3YgvsWCUfUKU5YGizpXomnLo=; b=IeD57z0gEnc7dPSikWabHTVVmsJvC1QkXssT277GzUhiRxwyutlnt1n9j5M3CPYInM 3Bf2FtTktsSn26PrCabsc4YOYELXxokO5PFRAJMLNLy8Oz8pNBgDLhOakxeHcfpPQSB5 b3BqpljgObxDG8kMQfxPt08Cizd6HPHS+Kmq2OFDe/f03SzLxDZegoIemA5Q24XyP5gy bthWeQmkCpzaJHI5TevJuEd+Rp9tEf/cnooxwYsD2M7RPFwrb3p0SZOCfYnc4GG1Q9Zx LW8l9+kt1lXLasOMVCP8AKMSDcyTGPufziBdPwm50sfv/yRnD5x2GH80bdMT5dnoYwmG g32A== X-Gm-Message-State: AOJu0YxSw+/aRFKtzApDTUfgE2j/SxC6TFIyHDTZbiOmJi+eI0WIgywW W1WFvDE85/H2dhFqcC2qs8CMxZyGX78= X-Google-Smtp-Source: AGHT+IF3u+FI/TT6EOlg+oQ9azjJJlBnXIVRPlXIpy1RSzGCiUnW5qXsWqXmIHB/+fQCuj4y4wdM+g== X-Received: by 2002:a67:c40c:0:b0:467:c80e:49d1 with SMTP id c12-20020a67c40c000000b00467c80e49d1mr2870257vsk.66.1705294472897; Sun, 14 Jan 2024 20:54:32 -0800 (PST) Received: from mail-ua1-f49.google.com (mail-ua1-f49.google.com. [209.85.222.49]) by smtp.gmail.com with ESMTPSA id dd2-20020a056102568200b00468360ec31bsm362326vsb.22.2024.01.14.20.54.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Jan 2024 20:54:32 -0800 (PST) Received: by mail-ua1-f49.google.com with SMTP id a1e0cc1a2514c-7d1921f440bso45286241.0; Sun, 14 Jan 2024 20:54:32 -0800 (PST) X-Received: by 2002:a05:6102:a81:b0:469:4f36:ddd6 with SMTP id n1-20020a0561020a8100b004694f36ddd6mr687726vsg.26.1705294472469; Sun, 14 Jan 2024 20:54:32 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <0b1ea9f1-4ed6-42c9-af21-844da9fb5c63@freebsd.org> <20240115070717.90a337c666aaa86003e7c231@dec.sakura.ne.jp> <0fb25c17-c737-4bc6-966c-6a03d0a41669@freebsd.org> In-Reply-To: <0fb25c17-c737-4bc6-966c-6a03d0a41669@freebsd.org> From: Gleb Popov Date: Mon, 15 Jan 2024 07:54:05 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: poudriere 3.4.0 regression: -i runs as NON_ROOT user To: Craig Leres Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4TD0DV52nsz4N1K X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On Mon, Jan 15, 2024 at 5:10=E2=80=AFAM Craig Leres wro= te: > > On 1/14/24 14:07, Tomoaki AOKI wrote: > > IIRC, poudriere[-devel] ran as nobody (65534) initially, but it started > > running as root (0) when I started using ccache. > > Interesting. It's starting to sound to me as if there's just one bug; > poudriere is not passing the correct value for UID to make. > > I commented out CCACHE_DIR in my poudriere.conf and indeed things run as > user nobody. Yes, this is documented in the config: https://github.com/freebsd/poudriere/blob/acde697efbe6f857c9b00bc90737dd2d9= 7c95ba5/src/etc/poudriere.conf.sample#L287 > But looking at the build log I see UID is set to 0 in the > environment. And I don't understand how poudriere does this ("ps e" > doesn't show UID in the environment of any jail process). > > Craig > > ---Begin Environment--- > SHELL=3D/bin/csh > [...] > UID=3D0 > [...] > "Begin Environment" is the environment that Poudriere itself was started in, the host one. Also note that when you do "testport -i" and get into the jail, you'll be given root even if nobody was used during building.