Date: Thu, 29 Sep 2005 10:10:00 +0700 (OMSST) From: Victor Sudakov <sudakov@sibptus.tomsk.ru> To: FreeBSD-gnats-submit@FreeBSD.org Cc: robert@FreeBSD.org Subject: bin/86693: inconsistency between getusershell.c and NIS "shells" map Message-ID: <200509290310.j8T3A0Cp030713@admin.sibptus.tomsk.ru> Resent-Message-ID: <200509290310.j8T3AJgJ050158@freefall.freebsd.org>
index | next in thread | raw e-mail
>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:
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509290310.j8T3A0Cp030713>
