From sudakov@sibptus.tomsk.ru  Thu Sep 29 03:10:05 2005
Return-Path: <sudakov@sibptus.tomsk.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8EE0316A41F;
	Thu, 29 Sep 2005 03:10:05 +0000 (GMT)
	(envelope-from sudakov@sibptus.tomsk.ru)
Received: from relay2.tomsk.ru (relay2.tomsk.ru [212.73.124.8])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 78AB943D49;
	Thu, 29 Sep 2005 03:10:03 +0000 (GMT)
	(envelope-from sudakov@sibptus.tomsk.ru)
Received: from [172.16.138.125] (account sudakovva@sibptus.tomsk.ru HELO admin.sibptus.tomsk.ru)
  by relay2.tomsk.ru (CommuniGate Pro SMTP 4.3.2)
  with ESMTPSA id 1271559; Thu, 29 Sep 2005 10:10:01 +0700
Received: (from sudakov@localhost)
	by admin.sibptus.tomsk.ru (8.12.9p2/8.12.9/Submit) id j8T3A0Cp030713;
	Thu, 29 Sep 2005 10:10:00 +0700 (OMSST)
	(envelope-from sudakov@sibptus.tomsk.ru)
Message-Id: <200509290310.j8T3A0Cp030713@admin.sibptus.tomsk.ru>
Date: Thu, 29 Sep 2005 10:10:00 +0700 (OMSST)
From: Victor Sudakov <sudakov@sibptus.tomsk.ru>
Reply-To: Victor Sudakov <sudakov@sibptus.tomsk.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: robert@FreeBSD.org
Subject: inconsistency between getusershell.c and NIS "shells" map
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         86693
>Category:       kern
>Synopsis:       [nis] [patch] inconsistency between getusershell.c and NIS "shells" map
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    maxim
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 29 03:10:19 GMT 2005
>Closed-Date:    Sat Jul 08 07:49:17 GMT 2006
>Last-Modified:  Sat Jul 08 07:49:17 GMT 2006
>Originator:     Victor Sudakov
>Release:        FreeBSD 5.4-RELEASE
>Organization:
AO "Svyaztransneft", SibPTUS
>Environment:
System: FreeBSD 5.4-RELEASE
>Description:
/var/yp/Makefile creates a map named "shells.list" while
src/lib/libc/gen/getusershell.c expects the name to be just "shells"

>How-To-Repeat:

Configure a NIS client, put "shells: nis" into /etc/nsswitch.conf .
Any program using getusershell() will return a default list of shells
instead of the contents of the relevant NIS map.

>Fix:

The relevant map on the NIS server should be called "shells", not
"shells.list". 

I suggest changing the Makefile:


--- /var/yp/Makefile.dist.orig	Wed Sep 28 17:04:47 2005
+++ /var/yp/Makefile.dist	Thu Sep 29 10:02:17 2005
@@ -178,7 +178,6 @@
 protocols: protocols.bynumber protocols.byname
 rpc:	   rpc.byname rpc.bynumber
 services:  services.byname
-shells:    shells.list
 passwd:    passwd.byname passwd.byuid
 group:     group.byname group.bygid
 netgrp:    netgroup
@@ -434,7 +433,7 @@
 	@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi
 	@if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi
 
-shells.list: $(SHELLS)
+shells: $(SHELLS)
 	@echo "Updating $@..."
 	@$(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*") print $$0"\t"$$0 }' \
 		$(SHELLS) \


Symlinking /var/yp/`domainname`/shells to /var/yp/`domainname`/shells.list 
works also as a workaround.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: maxim 
State-Changed-When: Thu Jun 8 09:14:25 UTC 2006 
State-Changed-Why:  
Fixed in HEAD.  Thanks! 


Responsible-Changed-From-To: freebsd-bugs->maxim 
Responsible-Changed-By: maxim 
Responsible-Changed-When: Thu Jun 8 09:14:25 UTC 2006 
Responsible-Changed-Why:  
MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86693 
State-Changed-From-To: patched->closed 
State-Changed-By: maxim 
State-Changed-When: Sat Jul 8 07:48:59 UTC 2006 
State-Changed-Why:  
Merged to RELENG_6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86693 
>Unformatted:
