NetBSD Problem Report #52297

From  Tue Jun 13 23:59:33 2017
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id 0A7C27A175
	for <>; Tue, 13 Jun 2017 23:59:33 +0000 (UTC)
Message-Id: <>
Date: Tue, 13 Jun 2017 23:59:32 +0000 (UTC)
Subject: lib/libc/gen/setdomainname_test changes the nisdomain and fails to clean up
X-Send-Pr-Version: www-1.0

>Number:         52297
>Category:       lib
>Synopsis:       lib/libc/gen/setdomainname_test changes the nisdomain and fails to clean up
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 14 00:00:00 +0000 2017
>Originator:     Alan Somers
I discovered this problem in FreeBSD via the ATF tests imported from NetBSD, and from inspection I can see that the bug affects NetBSD too.

If you run either setdomainname_test:setdomainname_limit or setdomainname_test:setdomainname_basic, it will change the system's nisdomain and fail to clean it up.  The former leave the nisdomain blank, while the latter sets it to a bunch of dashes.  This is a problem, because if the tests are run on a system that uses NIS, logins will become impossible.

The bug affects both 12.0-CURRENT and 11.1-BETA1
On an nis client, run these three commands.  The output of the third should equal the first, but it doesn't.

[alans@stealthy /usr/tests/lib/libc/gen]$ domainname 
[alans@stealthy /usr/tests/lib/libc/gen]$ sudo kyua debug setdomainname_test:setdomainname_basic
setdomainname_test:setdomainname_basic  ->  passed
[alans@stealthy /usr/tests/lib/libc/gen]$ domainname 


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.