From owner-freebsd-arch@freebsd.org Sun Jul 1 03:42:57 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3FFEFE6B8A for ; Sun, 1 Jul 2018 03:42:56 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 68679707ED for ; Sun, 1 Jul 2018 03:42:56 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mailman.ysv.freebsd.org (Postfix) id 24B90FE6B89; Sun, 1 Jul 2018 03:42:56 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2E5AFE6B88 for ; Sun, 1 Jul 2018 03:42:55 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x234.google.com (mail-yw0-x234.google.com [IPv6:2607:f8b0:4002:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87B40707EC for ; Sun, 1 Jul 2018 03:42:55 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x234.google.com with SMTP id j68-v6so1927697ywg.1 for ; Sat, 30 Jun 2018 20:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I/SPHoKZ4HEQe9Qh2caC0kRfUMApTztQKqTiQEqM7P0=; b=Nu+BIDPwTj6GmARhTfk9oITCoHegKR/QQ0aWEn2ZzXqd7U+u9U4jQRZC83qerme1fg zvwzuygMSxZd+44ANXZEdo/XZT+qg0t8yf+IQx6T5/trt22glAmakwy5S38M84C5x+f5 +tqar9/fNWcQE3TlC/D5JEFjIxCbysyxqmaw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I/SPHoKZ4HEQe9Qh2caC0kRfUMApTztQKqTiQEqM7P0=; b=U9U1X3roR2R5m7ybJGxPfQQ2ZDvsXMvY0YGfH9Swcqtg8+P/8pKPljqRU6WY2fo4R8 2pkEapi7dnADQgbqa46h3r3IzJc1MZR9536iyF91oyq9hDJGsUTTZL5jq2+KnadafTVX /kgqeoGjKcnyomAVuDTH8C2DMVNwAT2HIhEg2z80NmmBNIXwC3/v1dZMzNfi0uiA47ch XYI5ikKlyW8OJnFQ/x4gUuX2zQdDoa6bgefe621ry1N0O4+dDzykDrzfPKrRB32NYvK+ vpjLjdGESHmvnL/VL3S0IO+i6AiKyCQa1KM+H9L9kA4U41Yu8u0zvHeg9DogoAabqsiO VZ2g== X-Gm-Message-State: APt69E1AqkbMJvY94fYDc0xSmzF+z+aeDd+jBCFCcGWKj67Rv6iPxYU8 f7O1rCLHse1qSkoZmmT8aCLED7zSoB2vUleBkYGPeg== X-Google-Smtp-Source: AAOMgpc09HrUEvHpkB2zxenSmSIvNDSTxEf4Rh3mKC3pLvZAD+/h4dpnN0r8yZ+R3RBI22gmZim5NnL/Q1pic9W0HOY= X-Received: by 2002:a81:2c56:: with SMTP id s83-v6mr10148173yws.387.1530416574783; Sat, 30 Jun 2018 20:42:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:870e:0:0:0:0:0 with HTTP; Sat, 30 Jun 2018 20:42:24 -0700 (PDT) In-Reply-To: <27EE2F1E-245C-4D97-97DE-65E9DA133AF1@dons.net.au> References: <20180624121412.GY2430@kib.kiev.ua> <27EE2F1E-245C-4D97-97DE-65E9DA133AF1@dons.net.au> From: Eitan Adler Date: Sat, 30 Jun 2018 20:42:24 -0700 Message-ID: Subject: Re: What to do about rcmdsh(3) ? To: "O'Connor, Daniel" Cc: Konstantin Belousov , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2018 03:42:57 -0000 On 26 June 2018 at 23:45, O'Connor, Daniel wrote: > > >> On 27 Jun 2018, at 13:01, Eitan Adler wrote: >> >> On 24 June 2018 at 05:14, Konstantin Belousov wrote: >>> On Sun, Jun 24, 2018 at 03:32:13AM -0700, Eitan Adler wrote: >>>> Now that the rcmds are removed from base, it opens a question about >>>> what to do with rcmdsh(3). >>>> This is documented as >>>> rcmdsh ??? return a stream to a remote command without superuser >>>> And is implemented as a rather simple wrapper of getaddrinfo and exec. >>>> >>>> This isn't something I'd imagine we'd add to libc now-a-days and is >>>> currently broken by default (due to defaulting to _PATH_RSH) >>>> >>>> I'm not sure there is much value in keeping this function around. I >>>> did a rather naive search for uses of this function in ports and >>>> couldn't find any. I'm preparing a more comprehensive patch for an >>>> exp-run. >>> There is a huge value in keeping ABI compatibility. The symbol must be kept. >>> You may remove default version for the symbol if you are so inclined. >> >> I'm new at this. How does one do that? > > You could just leave the call, I assume it will fail with an error if rsh isn't in the path. It will fail unconditionally since the call looks explicitly for /bin/rsh. Is it wrong to change the implementation to use PATH?I have not looked closely, but are there security implications to trusting the environment? -- Eitan Adler