NetBSD Problem Report #60176

From www@netbsd.org  Sun Apr  5 19:54:36 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "R12" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 684791A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  5 Apr 2026 19:54:36 +0000 (UTC)
Message-Id: <20260405195435.96BA21A923A@mollari.NetBSD.org>
Date: Sun,  5 Apr 2026 19:54:35 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: su(1) lacks option for setlogin
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>

>Number:         60176
>Category:       bin
>Synopsis:       su(1) lacks option for setlogin
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 05 19:55:00 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10, 9, ...
>Organization:
The NetBSU Login
>Environment:
>Description:
The su(1) command has no way to do setlogin(), so getlogin() always returns the original caller's login name.
>How-To-Repeat:
try to run automatic tests involving cvs (which uses getlogin() if getuid() == 0) in a chroot with su
>Fix:
Yes, please!

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.