aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/ypwhich
Commit message (Collapse)AuthorAgeFilesLines
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Adopt SRCTOP in usr.binWarner Losh2017-03-121-1/+1
| | | | | | | | | | | | Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo over ${.CURDIR}/../foo for paths in Makefiles. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence on: arch@ (twice) Notes: svn path=/head/; revision=315170
* Rename YP to NIS in the manpages.Marcelo Araujo2015-09-031-7/+7
| | | | | | | | Approved by: bapt (mentor) Differential Revision: D3555 Notes: svn path=/head/; revision=287425
* Sync ypwhich(1) code with the OpenBSD version that is more modern.Marcelo Araujo2015-08-252-75/+101
| | | | | | | | | | | | Update the BSD LICENSE and remove the 3rd clause. Reviewed by: rodrigc, kib, bapt Approved by: bapt (mentor) Obtained from: OpenBSD Differential Revision: D3249 Notes: svn path=/head/; revision=287129
* Use nitems instead of "sizeof ypaliases/sizeof ypaliases[0]".Marcelo Araujo2015-08-131-5/+7
| | | | | | | | | | | Make the if statement more expressive. Differential Revision: D3366 Reviewed by: ed Approved by: bapt, rodrigc (mentor) Notes: svn path=/head/; revision=286716
* Compilers will complain the usage of obsolescent variable declarations.Marcelo Araujo2015-07-291-2/+2
| | | | | | | | | Also it will fix the build problem with sparc64. Submitted by: ed@ Notes: svn path=/head/; revision=285992
* Staticfy and constify some variables and clean up the code a bit to make itMarcelo Araujo2015-07-281-2/+2
| | | | | | | | | | | more readable. No functional change. Differential Revision: D3166 Reviewed by: kib Sponsored by: gandi.net Notes: svn path=/head/; revision=285926
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
|/ | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* Variable 'getmap' is unused.Gavin Atkinson2010-06-191-2/+2
| | | | | | | Found by: clang static analyzer Notes: svn path=/head/; revision=209342
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-131-0/+1
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-111-1/+0
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* Support shadow.byname and shadow.byuid maps, protecting them byBrian Somers2009-06-251-0/+1
| | | | | | | | | | | | | insisting on privileged port access. Include /var/yp/Makefile.local if it exists and suggest using it to override /var/yp/Makefile behaviour. Approved by: re (kib) MFC after: 3 weeks Notes: svn path=/head/; revision=194968
* Fix markup nit.Ruslan Ermilov2006-12-281-1/+3
| | | | Notes: svn path=/head/; revision=165579
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-2/+4
| | | | Notes: svn path=/head/; revision=131491
* Be consistant while reporting error conditions.Philippe Charnier2004-04-041-2/+2
| | | | Notes: svn path=/head/; revision=127856
* Fix up warnings. There were some biggies here. There seems to be twoPeter Wemm2003-10-261-13/+13
| | | | | | | | | | different sets of definitions in /usr/include/rpcsvc, mostly compatable, but with different names. Will the real one please stand up? In order to get prototypes for yp_maplist, we had to use the 'other' naming system. Notes: svn path=/head/; revision=121551
* Use `The .Nm utility'Philippe Charnier2002-04-201-2/+3
| | | | Notes: svn path=/head/; revision=95124
* 1) Remove blank line between include of sys/cdefs.h and __FBSDIDDavid Malone2002-02-271-2/+1
| | | | | | | 2) compare return value of inet_addr to INADDR_NONE rather than -1. Notes: svn path=/head/; revision=91377
* Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3.Mark Murray2002-02-081-1/+0
| | | | Notes: svn path=/head/; revision=90416
* Apply the following mechanical transformations in preparation forDag-Erling Smørgrav2002-02-061-24/+24
| | | | | | | | | | | | | | | | | | | | ansification and constification: s{\s+__P\((\(.*?\))\)}{$1}g; s{\(\s+}{\(}g; s{\s+\)}{\)}g; s{\s+,}{,}g; s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g; s{return ([^\(].*?);}{return ($1);}g; s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g; s{\s+$}{\n};g Also add $FreeBSD$ where needed. MFC after: 1 week Notes: svn path=/head/; revision=90297
* yp(4) -> yp(8).Ruslan Ermilov2002-01-141-1/+1
| | | | | | | PR: docs/30797 Notes: svn path=/head/; revision=89362
* WARNS=2 fixesMark Murray2001-12-112-33/+36
| | | | | | | | | | | | | __FBSDID() additions some include file sorting. Some Makefile sorting. WARNS?=2 is not added to the Makefile, because it is going to be default for usr.bin/ NO_WERROR is set because there are rpc*.h file issues. Notes: svn path=/head/; revision=87672
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-271-3/+1
| | | | Notes: svn path=/head/; revision=70410
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-3/+3
| | | | Notes: svn path=/head/; revision=68963
* $Id$ -> $FreeBSD$Peter Wemm1999-08-283-3/+3
| | | | Notes: svn path=/head/; revision=50477
* #include <arpa/inet.h>Peter Wemm1998-06-121-3/+5
| | | | | | | Also, use real struct in_addr rather than u_long. Notes: svn path=/head/; revision=36914
* Fix a bunch of spelling errors.Steve Price1998-06-041-2/+2
| | | | | | | | PR: 6856 Submitted by: Josh Gilliam <josh@quick.net> Notes: svn path=/head/; revision=36649
* .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq.Philippe Charnier1998-03-231-3/+3
| | | | Notes: svn path=/head/; revision=34801
* Add ypwhich(1) and yppoll(8) manual pages.Wolfram Schneider1997-09-212-2/+101
| | | | | | | Obtained from: NetBSD, slightly modified Notes: svn path=/head/; revision=29658
* Use err(3). Cosmetic in usage(). Delay the compute of defaultdomain (fromPhilippe Charnier1997-08-291-34/+28
| | | | | | | | OpenBSD). Obtained from: OpenBSD. Notes: svn path=/head/; revision=28895
* Add an alias for master.passwd -> master.passwd.byname to the listPeter Wemm1997-07-121-0/+1
| | | | | | | of convenience map aliases. Notes: svn path=/head/; revision=27345
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=23012
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* More XDR routine cleanups. These three programs should be the onlyBill Paul1995-12-151-8/+9
| | | | | | | ones that require this: the others call the yplib functions in libc. Notes: svn path=/head/; revision=12862
* Slightly better message for `ypwhich -x':Garrett Wollman1995-07-201-1/+1
| | | | | | | | was: Use "foo" for "foo.bar" now: "foo" is an alias for "foo.bar" Notes: svn path=/head/; revision=9594
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-1/+1
| | | | Notes: svn path=/head/; revision=8874
* ypbind.c: Major overhaul.Bill Paul1995-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moved to a more client-driven model. We aggressively attempt to keep the default domain bound (as before) but we give up on non-default domains if we lose contact with a server and fail to get a response after one round of broadcasting. This helps drastically reduce the amount of network bandwitdh that ypbind consumes: if a client references the secondary domain at some later point, this will prod ypbind into establishing a new binding anyway, so continuously broadcasting without need is pointless. Note that we still actively seek out a binding for our default domain even if no client program has queried us yet. I'm not exactly sure if this matches SunOS's behavior or not, but I decided to do it this way since we can get into all sorts of trouble if our default domain comes unbound. Even so, we're still much quieter than we used to be. - Removed a bunch of no-longer pertinent comments and a couple of chunks of #ifdef 0'ed code that no longer fit in to the new layout. - Theo deRaadt must have become frustrated with the callback mechanism in clnt_broadcast(), because he shamelessly stole the clnt_broadcast() code right out of the RPC library and hacked it up to suit his needs. (Comments and all! :) I can understand why: clnt_broadcast() blocks while awaiting replies. Changing this behavior requires surgery. However, you can work around this: fork the broadcast into a child process and relay the results back to the parent via a pipe. (Careful obervation has shown that the SunOS ypbind forks children for broadcasting too, though I can only guess what sort of interprocess communication it uses. pipe() seems to do the job well enough.) This may seem like the long way around, but it's not really that hard to implement, and I'd prefer to use documented RPC library functions wherever possible. We're careful to limit the number of simultaneous broadcasters to avoid swamping the system (the current limit is 5). Each clnt_broadcast() call only sends out a small number of packets at increasing intervals. We're also careful not to spawn more than one bradcaster for a given domain. - Used clntudp_bufcreate() and clnt_call() to implement a ping() function for directly querying a particular server so that we can check if it's still alive. This lets me completely remove the old bradcasting code and use actual RPC library calls instead, at the cost of more than a few handfulls of torn-out hair. (Make no mistake folks: I *HATE* RPC.) Currently, the ping interval is one minute. - Fixed another potential 'nfds too big for select()' bug: use _rpc_dtablesize() instead of getdtablesize(). - Quieted gcc -Wall a bit. - Probably a bunch of other stuff that I've forgotten. ypbind.8: - Updated man page to reflect modifications. ypwhich.c: - Small mind-o fix from last time: decode error results from ypbind correctly (*groan*) yplib.c: - same as above - Change behavior of _yp_dobind() a little: if we get back a 'Domain not bound' error for a given domain, retry a few times before giving up and passing the error back to the caller. We have to sleep for a few seconds between tries since the 'Domain not bound' error comes back immediately (by repeatedly looping, we end up pounding on ypbind). We retry at most 20 times at 5 second intervals. This gives us a full minute to get a response. This seems to deviate a bit from SunOS behavior -- it appears to wait forever -- but I don't like the idea of perpetually hanging inside a library call. Note that this should fix the problems some people have with bindings not being established fast enough at boot time; sometimes amd is started in /etc/rc after ypbind has run but before it gets a binding set up. The automounter gets annoyed at this and tends to exit. By pausing ther YP calls until a binding is ready, we avoid this situation. - Another _yp_dobind() change: if we determine that our binding files are unlocked or nonexistent, jump directly to code that pokes ypbind into restablishing the binding. Again, if it fails, we'll time out eventually and return. Notes: svn path=/head/; revision=8091
* Make Rod Grimes's life a little simpler: replace all exit(1)'s withBill Paul1995-04-221-8/+14
| | | | | | | | | | | | seperate exit values depending on the error. (The error values are #defined and commented near the top of the file for clarity). This is to help write a small bit of shell script for /etc/rc that calls ypwhich a few times after ypbind is invoked to make sure we're actually bound to a server before proceeding (if we aren't, the automounter can fail if it's using NIS maps). Notes: svn path=/head/; revision=7990
* small NIS binding fixes:Bill Paul1995-04-211-1/+1
| | | | | | | | | | | | | | | | | | ypbind.c: if a client program asks ypbind for the name of the server for a particular domain, and there isn't a binding for that domain available yet, ypbind needs to supply a status value along with its failure message. Set yprespbody.ypbind_error before returning from a ypbindproc_domain request. yplib.c: properly handle the error status messages ypbind now has the ability to send us. Add a ypbinderr_string() function to decode the error values. ypwhich.c: handle ypbind errors correctly: yperr_string() can't handle ypbind_status messages -- use ypbinderr_string instead. Notes: svn path=/head/; revision=7982
* Move more YP user programs over.Garrett Wollman1994-08-082-0/+256
Notes: svn path=/head/; revision=1930