Commit Graph

474 Commits

Author SHA1 Message Date
Andrey A. Chernov db4dc2ff6e If locale not available, fallback to strcasecmp, not to strcmp 1995-04-16 22:43:45 +00:00
Andreas Schulz 695176ba79 Removed the y.tab.h file from the sources. It is automatically generated
from yacc.
Put the lex.c parser.c and y.tab.h into a CLEANFILES target in the
makefile, they are all generated and need to be removed on a clean.
1995-04-15 17:15:11 +00:00
Bill Paul 8efe1172e2 Head off potential core dump in _havemaster() (we don't need to free any
memory here: the underlying YP routines handle this one for us).
1995-04-15 03:11:55 +00:00
Bill Paul c98fda6ec8 Better conformance to SunOS behavior: if we can't match a user to one
of the plus or minus lists at all, reject him. This lets you create
a +@netgroup list of users that you want to admit and reject everybody
else. If you end your +@netgroup list with the wildcard line
(+:::::::::) then you'll have a +@netgroup list that remaps the
specified people but leaves people not in any netgroup unaffected.
1995-04-14 14:56:28 +00:00
Garrett Wollman 3688be0eeb Add err_set_file() and err_set_exit() functions to make it possible for
programs which use err(3) to work nicely in a wider range of environments
(e.g., dialog).
1995-04-13 18:04:11 +00:00
Bill Paul 8b4709fa93 Add an ethers(3) man page. 1995-04-12 22:28:49 +00:00
Joerg Wunsch bfb50190bb The implementation of rexec() missed the function ruserpass(), so the
link stage fell over for any program that attempted to use rexec().

Ruserpass() remains undocumented; i could not find any documentation
for it on other systems.

Also added a BUGS section to the man page, stating that this function
constitutes a potential security hole (as well as the underlying
"exec" service).

Submitted by:	rgrimes
Originally submitted by: agc@uts.amdahl.com (Alistair G. Crooks)
Obtained from: netbsd-bugs@NetBSD.ORG
1995-04-11 19:52:10 +00:00
Joerg Wunsch a72408576b My libcompat cleanup.
o	add missing man pages

o	make all man pages clearly refer to the libcompat thingie

o	add the information to the vtimes(3) and vlimit(3) man pages
	that nobody has reimplemented the functions by now

o	add the missing getpw.c

o	add code and man pages for cftime(3) and
	ascftime(3) -- i found them somewhere in old
	unfinished work
1995-04-10 18:48:06 +00:00
Bill Paul b9729ac259 More of the same: we also need to handle multiple domains properly
even if /var/yp/binding/DOMAIN.VERS doesn't exist yet.
1995-04-09 21:52:31 +00:00
Bill Paul f067dfeabc Fix behavior of YP library routines in environments with multiple domains,
where one or more of the non-default domains are not yet bound.

If we make a YP request for a domain other than the default domain,
and there is no binding for the new domain yet, _yp_dobind() sees
that the /var/yp/binding/DOMAIN.VERS file for the unbound domain is
not locked (by ypbind) and from this it concludes that the NIS system
is dead, so it gives up.

This behavior has been changed: before giving up in this case, we now
make a second check to see if the binding file for the *default* domain
is also not locked. Only if the default domain binding file is also
unlocked to we now assume that ypbind has bought the farm and bail out.
(Note: this assumes that the user hasn't changed the default domain
while ypbind is running.)

With this change, _do_ypbind() is allowed to proceed into the next
section of code wherein it prods ypbind into establishing a binding
for the new domain. This first call times out after ten seconds,
after which it should retry and succeed. From then on, the binding
for the second domain should be handled normally.
1995-04-09 19:26:23 +00:00
Andrey A. Chernov 929fb7fedd Add missing header reference 1995-04-09 04:59:40 +00:00
Bruce Evans 9f747fa23e Submitted by: J.T. Conklin <jtc@wimsey.com>
Second part of update to fdlibm 5.2: speed up argument reduction for trig
functions in the case pi/4 < |x| < 3pi/4.

Remove unused static constants ("one").
1995-04-07 23:23:27 +00:00
Bruce Evans b29986e0f1 Submitted by: J.T. Conklin <jtc@wimsey.com>
First part of update to fdlibm 5.2: fix jn(n, x) and jnf(n, x).
jn(-1, x) was too large by a factor of 3.
1995-04-07 23:13:43 +00:00
Bruce Evans 980f2abdb8 Reviewed by: ache and wollman (long ago)
isctype.c:
o The tolower() and toupper() functions duplicated too much code
  and were out of date (surprise).  This didn't matter because
  it was difficult to call them.
o Change formatting to be more like that in <ctype.h> (with
  extra parentheses as in the macros).  Perhaps this file should
  be machine generated or everything should be handled like
  __tolower() so that no code is repeated.

nomacros.c:
o Instead of looking at _USE_CTYPE_INLINE_ to see what <ctype.h>
  has done, set _EXTERNALIZE_CTYPE_INLINES_ to tell <ctype.h>
  what to do, so that we don't have anything left to do.  Note
  that code is now generated even if inlines are used by default.
  This allows users to switch to non-inline versions.
1995-04-07 11:52:17 +00:00
Bruce Evans ffe57f1a20 Obtained from: 1.1.5 (originally by jtc)
Fix printf("%g", 0.0) - print "0", not "0.".  The previous fixes in this
area had one non-cosmetic (non-)change that caused this bug.

Bruce
1995-04-06 16:28:15 +00:00
Joerg Wunsch d108492508 The man page setmode(3) declares `void setmode' when it should be
declared `void *setmode'.

Submitted by:	kargl@troutmask.apl.washington.edu
1995-04-05 22:56:45 +00:00
Andrey A. Chernov ffe8306afd Add "before inclusion of any header which ... "
Suggested by: bde
1995-04-04 11:29:51 +00:00
Bill Paul ef8f52ad53 'Fix' for esoteric misfeature discovered while searching for another bug:
select() returns EINVAL if you try to feed it a value of FD_SETSIZE greater
that 256. You can apparently adjust this by specifying a larger value of
FD_SETSIZE when configuring your kernel. However, if you set the maximum
number of open file descriptors per process to some value greater than
the FD_SETSIZE value that select() expects, many selects() within the RPC
library code will be botched because _rpc_dtablesize() will return
invalid numbers. This is to say that it will return the upper descriptor
table size limit which can be much higher than 256. Unless select() is
prepared to expect this 'unusually' high value, it will fail. (A good
example of this can be seen with NIS enabled: if you type 'unlimit' at
the shell prompt and then run any command that does NIS calls, you'll
be bombarded with errors from clnttcp_create().)

A temporary fix for this is to clamp the value returned by _rpc_dtablesize()
at FD_SETSIZE (as defined in <sys/types.h> (256)). I suppose the Right
Thing would be to provide some mechanism for select() to dynamically
adjust itself to handle FD_SETSIZE values larger than 256, but it's a
bit late in the game for that. Hopefully 256 file descriptors will be enough
to keep RPC happy for now.
1995-04-04 05:53:22 +00:00
Bill Paul 958f4e365d getpwent.c: fix problem with emacs dumping core when NIS is enabled. Also
add #includes for YP headers when compiling with -DYP to avoid some implicit
declarations.

getgrent.c & getnetgrent.c: add some #includes to avoid implicit declarations
of YP functions.
1995-04-04 05:36:16 +00:00
Andrey A. Chernov 05e2ed0de3 Properly describe how to expand default limit of handled descriptors 1995-04-04 01:27:54 +00:00
Bill Paul f9dde4e78c Submitted by: Sebastian Strollow
Obtained from: Casper H. Dik (by vay of Usenet)

Small patch to help improve NIS rebinding times (among other things):


>From: casper@fwi.uva.nl (Casper H.S. Dik)
>Newsgroups: comp.sys.sun.misc,comp.sys.sun.admin
>Subject: FIX for slow rebinding of NIS.
>Summary: a small change in libc makes life with NIS a lot easier.
>Message-ID: <1992Jan17.173905.11727@fwi.uva.nl>
>Date: 17 Jan 92 17:39:05 GMT
>Sender: news@fwi.uva.nl
>Organization: FWI, University of Amsterdam
>Lines: 138
>Nntp-Posting-Host: halo.fwi.uva.nl

Have you been plagued by long waits when your NIS server is rebooted?
READ ON!

Sun has a patch, but the README says:

********************* WARNING ******************************

  This is a new version of ypbind that never uses the NIS
  binding file to cache the servers binding. This will have
  the effect of fixing the current symptom. However, it might
  degrade the overall performance of the system when the
  server is available. This is most likely to happen on an
  overloaded server, which will cause the network to produce
  a broadcast storm.

*************************************************************

Therefor, I have produced another fix.

o What goes wrong.

When the NIS server is rebooted, ypserv will obtain different ports
to listen for RPC requests. All clients will continue to use the old
binding they obtained earlier. The NIS server will send ICMP dst unreachable
messages for the RPC requests that arrive at the old port. These ICMPs
are dropped on the floor and the client code will continue sending the
requests until the timer has expired. The small fix at the end of this
message will pick up these ICMP messages and deliver them to the RPC layer.

o Before and after.

I've tested this on some machines and this is the result:

	(kill and restart ypserv on the server)

original% time ypmatch user passwd
user:....
0.040u 0.090s 2:35.64 0.0% 0+126k 0+0io 0pf+0w (155 seconds elapsed time)

fixedhost% time ypmatch user passwd
user:....
0.050u 0.050s 0:10.20 0.9% 0+136k 0+0io 0pf+0w (10 seconds elapsed time)

Rebinding is almost instantaneous.

o Other benefits.
	RPC calls that use UDP as transport will no longer time out but
	will abort much sooner. (E.g., the remote host is unreachable or
	111/udp is filtered by an intermediate router)
1995-04-02 20:05:20 +00:00
Bill Paul 6cc65caedb Fix xdr_ypmap_parms() so that it agrees with xdr_domainname(), xdr_peername()
and friends.
1995-04-02 19:58:29 +00:00
Andrey A. Chernov b97843726d Fix manpage rule 1995-04-02 19:35:40 +00:00
Bill Paul 7680d1b004 Add ether_addr functions to libc. This seems to be the logical place
to put them. A man page is in the works.
1995-04-02 01:31:17 +00:00
Bill Paul 97fd4ecfb6 Add some missing xdr functions needed for server-side implementations.
(This is to help me reduce yppush a bit: it has its own copy of yp_xdr.c
right now, but I can get rid of it now that this stuff is here.)
1995-04-02 01:02:17 +00:00
Jordan K. Hubbard 6eaef61813 Add the nls code for XPG3-style message catalogs to libc.
Obtained from: NetBSD
1995-03-30 12:47:27 +00:00
Jordan K. Hubbard c7e6130943 Add nls include to Makefile. 1995-03-30 12:46:36 +00:00
Poul-Henning Kamp 139762f2be Install the dlopen.3 manpage. 1995-03-30 06:40:31 +00:00
Andrey A. Chernov 3437da9391 Clear IGNPAR in cfmakeraw() instead of set it. 1995-03-29 19:28:35 +00:00
Doug Rabson db0770545f Use __tty_fileno instead of STDERR_FILENO when detecting window size
changes
Reviewed by:	Bob Willcox <bob@obiwan.pmr.com>
1995-03-28 22:20:19 +00:00
Jordan K. Hubbard e36fea798c Tweak a few things just to show how form traversal might work fully.
Fix some spelling errors in the example.c file and make error handling
a little more explanatory.
1995-03-28 10:42:09 +00:00
Jordan K. Hubbard 4fe2ad2c59 Include <strhash.h> instead now. 1995-03-28 10:25:13 +00:00
Jordan K. Hubbard 71e60921ff Fix a missing _hash() to prevent namespace pollution with the db/hash routines.
Grrr.  If the dbhash routines weren't grossly overengineered I wouldn't
even need to do this! :-(

Also now export the hash_stats routine.  Manpage coming RSN - I promise.
1995-03-28 08:41:02 +00:00
Bill Paul b38bb6d374 Use yp_order() instead of yp_first() in _havemaster() to check for the
presence of the master.passwd.byname map, and remember to free the
returned order value before exiting.
1995-03-27 20:46:40 +00:00
Nate Williams 6fc818e63f Bump the shared library minor # because of the additions of the
strhash() functions.
1995-03-27 20:23:11 +00:00
Andrey A. Chernov 2f69f2f2f3 Remove duplicates: parm rindex & scroll right 1995-03-27 05:13:31 +00:00
Andrey A. Chernov 668326cbc5 Fix bug using CSR for partial scrolling 1995-03-27 01:19:14 +00:00
Andrey A. Chernov d030a0729f Hash 8bit chars without sign extension 1995-03-26 19:32:24 +00:00
Andrey A. Chernov 626da9c8ba Update info about LC_COLLATE implementation 1995-03-26 18:57:19 +00:00
Jordan K. Hubbard be01ce9346 change hash.h to strhash.h to match new convention.
Manpage for strhash functions to follow tomorrow.
1995-03-26 10:25:00 +00:00
Jordan K. Hubbard 4796867161 Add the strhash family of routines. They provide a number of features
that the db/hash functions don't, and they're much simpler to use for
low-overhead string hashing.
1995-03-26 10:21:55 +00:00
Paul Richards 62773adf71 Use a hash table to hold all the bindings info rather than a linked list.
Forms now have their own local bindings table so that anything
declared within a form is local to that form. This means you can
have fields of the same name in different forms.

Added inlined attribute setting for strings e.g. "This is \bold bold"

Added entry and exit functions for fields.
1995-03-26 07:44:33 +00:00
Andrey A. Chernov bc4908f401 Continue of previous fix: eliminate backslashes too. 1995-03-26 00:47:02 +00:00
Andrey A. Chernov 9da94f20f7 Compact entry returned to user:
1) Eliminate spaces and double ':'.
2) Remove duplicated capabilities from tc= expansion.
It is needed to not overflow historycal 1024 limit.

Add range check and return -1 if entry is too big instead
of corrupting user memory.
1995-03-26 00:35:36 +00:00
David Greenman eb0bc8709b Updated manual page to indicate flags argument; added return value and
errors section.
1995-03-25 17:24:47 +00:00
Poul-Henning Kamp e169c6670b scandir(3) didn't transfer d_type, and d_ino is called d_fileno now. 1995-03-25 07:39:02 +00:00
Bill Paul f05daed916 Add calls to endgrent() and endnetgrent() to the end of _createcaches(). 1995-03-25 00:30:35 +00:00
Bill Paul 06643071e5 Add more sanity checks. *Lots* of sanity checks. Huge tracts of sanity checks.
Make sure all arguments to the yp_*() functions are valid before sending
them off to the server. This is somewhat distressing: once again my
FreeBSD box brought down my entire network because of NIS bogosities.
I *think* the poor argument checking in this module is the cause, but
I still haven't been able to reproduce the exact series of events that
lead to the ypserv crashes. For now I've resorted to sticking my FreeBSD
box in a seprate domain. Hopefully a weekend of heavy testing will
uncover the problem.
1995-03-24 21:21:37 +00:00
Bill Paul 0ffe27f544 Make sanity checks saner: don't let setnetgrent() or innetgr() swallow
any bogus arguments.
1995-03-24 20:42:28 +00:00
Andrey A. Chernov c90720154b Get rid of strtok(), it is depricated in libs 1995-03-24 17:40:54 +00:00