Commit Graph

176 Commits

Author SHA1 Message Date
Eitan Adler
5bf8645b8d - Fix style(9) bug I introduced in the last commit
Approved by:	jhb
2011-12-21 20:47:24 +00:00
Eitan Adler
520374b5aa - Remove extraneous null ptr deref checks
- Fix memory leak

Submitted by:	Slono Slono <slonoman2011@yandex.ru>
Approved by:	jhb
MFC after:	1 week
2011-12-21 20:27:41 +00:00
Gleb Smirnoff
b8e20190a3 Protect NIS server with madvise(2) since this daemon is required
for succesful authentication of users.
2011-10-25 10:33:26 +00:00
Jun Kuriyama
2afeb643a5 Add missing argument for -h in usage. 2011-06-20 15:22:47 +00:00
Joel Dahl
d4352d2928 Spelling fixes. 2010-08-01 09:37:36 +00:00
Hiroki Sato
cbf58894c1 Simply ignore unsupported protocols listed in /etc/netconfig and
abort only if no transport is available.  This fixes
(INET && !INET6) and (!INET && INET6) case, for example.
2010-01-20 16:50:13 +00:00
Hiroki Sato
d04ef9128c Try a privileged port for binding whenever possible because the
ypbind daemon requires the ypserv daemon is running on a
privileged port.

Reported by:	Andrzej Tobola
2010-01-20 09:29:07 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Antoine Brodin
13e403fdea (S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages.
Note: this does not affect generated binaries as this argument is not used.

PR:		137213
Submitted by:	Eygene Ryabinkin (initial version)
MFC after:	1 month
2009-12-28 22:56:30 +00:00
Dmitry Morozovsky
a55743484e To remove a server, one should use double backslash, and half of them
are eaten by shell.  Fix this.

MFC after:	2 weeks
2009-12-27 16:00:17 +00:00
Hiroki Sato
f96264e375 - Fix main() to use two separated sockets for the two transports
when "-P port" is specified.  It invoked svc{tcp,udp}_create()
  for only one of the two allocated sockets, and prevented the
  TCP socket from binding to as the result.

- Use TI-RPC functions and handle sockets in a
  transport-independent way.  At this moment only AF_INET ("udp"
  and "tcp") is supported because others need rewrites of ACL
  handling and yp clients.

- Add '-h addr' to specify addresses to bind to.

- Convert _msgout() to use variable argument lists and remove
  asprintf() for error strings.

- Remove register storage class specifier.

Discussed with:	kuriyama
MFC after:	1 week
2009-12-13 15:19:01 +00:00
Jun Kuriyama
8fbf071375 - In ypproc_all_2_svc(), yp_fork() is called only when !debug case.
So _exit() in the bottom of this function should be called with the
  same case.
2009-12-04 14:12:37 +00:00
Jun Kuriyama
4293e80feb - Replace magic number with YPOLDVERS macro (which may be missed in
r14262).
2009-12-04 14:08:57 +00:00
Brian Somers
53c405786b Support shadow.byname and shadow.byuid maps, protecting them by
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
2009-06-25 16:15:39 +00:00
Matteo Riondato
3868f70efe Add -P <port> option to allow binding to a specific port.
PR:		bin/109494
Submitted by:	mtm
MFC after:	1 week
2008-02-03 17:39:37 +00:00
Maxim Konovalov
8ef09875f0 o Re-arrange parentheses and fix a conition logic for !do_dns case.
PR:		bin/98625
MFC after:	1 month
2006-06-09 14:01:07 +00:00
Maxim Konovalov
1e6c9668df o Add /etc/shells to a source files list. 2006-06-08 14:49:38 +00:00
Maxim Konovalov
7d2155f052 o NIS clients ask for "shells" map not "shells.list".
PR:		kern/86693
Submitted by:	Victor Sudakov
MFC after:	1 month
2006-06-08 09:12:07 +00:00
Colin Percival
72f6a0fa7a Enable inadvertantly disabled "securenet" access controls in ypserv. [1]
Correct a bug in the handling of backslash characters in smbfs which can
allow an attacker to escape from a chroot(2). [2]

Security:	FreeBSD-SA-06:15.ypserv [1]
Security:	FreeBSD-SA-06:16.smbfs [2]
2006-05-31 22:32:22 +00:00
Ruslan Ermilov
f2a3dfe5ff - Let make(1) track dependencies and regen netid map when needed.
- Add missing dependency for netid.byname.
2006-04-13 13:03:35 +00:00
Philippe Charnier
4b937b7019 Remove unused variables. int -> size_t for lenghts. 2005-05-20 13:04:10 +00:00
Hajimu UMEMOTO
a89e588c90 add targets for ipnodes.byname and ipnodes.byaddr which carries
IPv6 addresses.  these targets are off by default, and these
are built when there is /var/yp/ipnodes.
2005-05-02 11:19:52 +00:00
Hajimu UMEMOTO
322b21739f fix typo in previos commit. 2005-05-02 09:42:59 +00:00
Hajimu UMEMOTO
4e5a7758f6 teach IPv6 to async DNS resolver in ypserv:
- query AAAA RR on ipnodes.byname query.
- query .ip6.arpa. on ipnodes.byaddr query.
2005-05-02 09:34:07 +00:00
Stefan Farfeleder
595e532309 Use socklen_t where appropriate. 2005-03-11 14:17:12 +00:00
Ruslan Ermilov
36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
69c2a92e4d Utilize FILES, SCRIPTS, and SYMLINKS. While here, fixed a bug in
the implementation of the following feature in revision 1.4:

- Install Makefile.yp as /var/yp/Makefile.dist and link it to
  /var/yp/Makefile only if /var/yp/Makefile doesn't already exist.
  Suggested by Peter Wemm.

The actual code was only symlinking when no /var/yp/Makefile.dist
existed, i.e., never.
2004-10-18 21:42:15 +00:00
Ruslan Ermilov
1c85060a13 Sort SEE ALSO references (in dictionary order, ignoring case). 2004-07-04 20:55:50 +00:00
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Ruslan Ermilov
0d3b8ac42c Eliminated two dozens of superfluous cats and two r-cats (sorry, Jordan).
Suggested by:	Dan Nelson
2003-06-13 16:13:28 +00:00
David E. O'Brien
b728350ee6 Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
David E. O'Brien
052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Robert Drehmel
80fc33c35f Add a target for the creation of a /etc/shells map and add it to
the maps which are built by default.
2003-03-21 11:44:03 +00:00
Mike Makonnen
3a3f8378a9 ypserv(8) is now started from rc.d
Approved by: markm (mentor)(implicit)
2003-01-23 06:03:30 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Mark Murray
15b23bddd9 The resolver library does a pretty acceptable set of domain
suffix attempts before failing. No need to try again by hand,
particularly when it fills your log with failures because
localhost.example.com..example.com fails to resolve. Also improve the
log message that helped find this error.

There is still (maybe) an uninitialised pointer problem here, but in a
month of testing I haven't triggered it.
2002-09-20 20:09:27 +00:00
Ruslan Ermilov
a654c53e16 mdoc(7) police: Removed redundant .Ns calls. 2002-08-13 16:07:28 +00:00
Ruslan Ermilov
d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Ruslan Ermilov
0b87f79976 s/${INSTALL} -c/${INSTALL} ${COPY}/ 2002-07-18 12:07:49 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Dag-Erling Smørgrav
e009976aa6 Fix a boatload of format errors and constness violations.
Sponsored by:	DARPA, NAI Labs
2002-05-08 15:41:15 +00:00
Dag-Erling Smørgrav
f249dbcc71 Spell void * as void * rather than caddr_t. This is complicated by the
fact that caddr_t is often misspelled as char *.

Sponsored by:	DARPA, NAI Labs
2002-04-28 15:18:50 +00:00
Mark Murray
9c7e3cbf60 Sort out the documentation WRT TCP_WRAPPERs, which is now enabled. 2002-02-06 20:48:03 +00:00
Mark Murray
3b0560228a Fix an inconsistency between what FreeBSD NIS and AMD think the
AMD map name should be.
2002-02-06 20:42:36 +00:00
Mark Murray
adb79039fd Enable TCP_WRAPPERs for the NIS server. The protection afforded is
not massive, but usable.
2002-02-06 20:39:36 +00:00
Dag-Erling Smørgrav
dc584ddbc5 ANSIfy and remove some dead code.
Sponsored by:	DARPA, NAI Labs
2002-02-06 15:26:07 +00:00