bin/86693: inconsistency between getusershell.c and NIS "shells" map

Victor Sudakov sudakov at sibptus.tomsk.ru
Wed Sep 28 20:10:20 PDT 2005


>Number:         86693
>Category:       bin
>Synopsis:       inconsistency between getusershell.c and NIS "shells" map
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 29 03:10:19 GMT 2005
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


More information about the freebsd-bugs mailing list