Commit Graph

1440 Commits

Author SHA1 Message Date
Mike Pritchard 32e43d391c Minor mdoc style fixes. 1997-01-09 07:12:09 +00:00
John Polstra 1a809a51b0 The error returned when F_SETLK collides with an existing lock is
EAGAIN, not EACCES.  POSIX says that either one is OK.
2.2 candidate.
1997-01-08 23:48:02 +00:00
Garrett Wollman e76da59456 Delete -D_POSIX_MODE and -D_MULTI_LIBM from CFLAGS. They never had any effect
because _IEEE_LIBM always takes priority, so the definition just served
to confuse.

Reviewed by:	bde
1997-01-08 13:22:28 +00:00
Andrey A. Chernov 07a7a2c487 Fix fake failures on the short names which looks like hexadecimal numbers
Submitted by: paul@vix.com
1997-01-08 13:06:14 +00:00
Joerg Wunsch ca4967cbda Document the various reasons for EINVAL.
Document the flaw that `offset' is required to be page-aligned, in the
BUGS section.
1997-01-08 12:02:15 +00:00
Andrey A. Chernov c4be7158c8 Build ebones/libtelnet only if MAKE_EBONES defined 1997-01-08 11:34:32 +00:00
Mike Pritchard 717feb32a0 Man page police. 1997-01-08 06:51:32 +00:00
David Nugent 1c594de59d Various bugfixes. 1997-01-07 16:28:12 +00:00
David Nugent 273b52cea1 Consistency check: refs to ~/.login.conf should be ~/.login_conf. 1997-01-07 14:29:50 +00:00
David Nugent 65fa0ae191 Commit the right version this time. :-) 1997-01-07 13:32:04 +00:00
David Nugent 2dc7d862d8 Fix for login_getclass(NULL) case. 1997-01-07 13:29:21 +00:00
Garrett Wollman 01754f1159 Fix Makefile so that dependencies are actually right this time.
It is almost always the wrong thing to put .y and .l files directly
into the SRCS.
1997-01-05 18:25:53 +00:00
Andrey A. Chernov 64cf8d66e2 Disable isxdigit block until proper solution will be found
isxdigit(name[0]) gives false failures on short names which looks
like hexadecimal digits, f.e. "fade", "babe", "d133", etc.
1997-01-05 17:26:09 +00:00
David Nugent 5023ac7251 Fix typos pointed out by bde (thanks!). 1997-01-05 09:06:32 +00:00
Bruce Evans b488c451de Don't depend only <stdio.h> bogusly including <sys/types.h>.
(<sys/types.h> is a prerequisite for <login_cap.h> mainly because
the latter wants to typedef rlim_t.  rlim_t is typedefed in
<sys/types.h> in NetBSD.)
1997-01-05 07:12:29 +00:00
David Nugent 561d61ca90 Add missing manpage for login.conf. 1997-01-05 03:24:45 +00:00
David Nugent 68bbf3adb0 Library functions relating to the login class capabilities database,
including manpages.
See also login_cap.h.
1997-01-04 16:50:08 +00:00
Mike Pritchard 7eb461278e Fix the short description of kvm_getloadavg(3) to reflect
what the function really does.

Also fix a small mdoc problem I noticed while in there.

Obtained from: NetBSD-bugs (NetBSD PR#3077)
1997-01-02 20:16:20 +00:00
David Nugent 4ae89ecddd Added group= facility to /etc/ttys for tty grouping for more
more manageable and convenient referencing by login.conf (login
class database) and (e.g.) login.access.

This is the first of a group of commits which implements the login
class capabilities database.
1997-01-02 08:05:43 +00:00
Jordan K. Hubbard b355f69744 Remove bogus weak reference. 1997-01-01 11:03:44 +00:00
Jordan K. Hubbard 799dbaaffc Eliminate unnecessary warning introduced by a missing forward declaration. 1997-01-01 10:06:37 +00:00
Bruce Evans fd0a86436e Use ${COPY} instead of -C for installing non-source files. crt*.o
should be installed using the same flag as libraries, but ${COPY}
is currently used for libraries.
1997-01-01 04:52:55 +00:00
Alexander Langer 904259996b Grammatical changes.
Reviewed by:	joerg
1997-01-01 03:29:33 +00:00
Peter Wemm a856779ff8 prototype of shared function now in include file 1996-12-31 09:16:12 +00:00
Peter Wemm e85cee866d use svc_maxfd + 1 in the select() call.
(There may be a behavior difference between the 2.1 and 2.2/3.0 kernels
in this area, it seemed to work for me but I have a horribly hacked
select() that might have a bug in the handling of this)

Submitted by: wpaul
1996-12-31 09:13:59 +00:00
Peter Wemm 6678380e8e libgmp.so.2.0 was missing from the compat21 dist
(should be in 2.2)

Reported by:	John Fieber <jfieber@indiana.edu>
1996-12-31 09:02:39 +00:00
Bruce Evans 53f49427b0 Use `beforeinstall' target instead of `install' target to avoid setting a
bad example.
1996-12-31 02:39:40 +00:00
Bruce Evans a1e71a0d14 Use `beforeinstall' target instead of `install' target so that the links
get installed.

The `install' target should only be overridden when the default one would
do something wrong and you're too lazy to fix the default one.
1996-12-31 02:38:28 +00:00
Mike Pritchard cb22292338 Spelling/mdoc police. 1996-12-30 21:08:45 +00:00
Peter Wemm c5bb6008ce Oops! Bad Idea! (TM)
Restore the clamp on the return value from rpc_dtablesize()..  Some programs
(eg: ypserv) use this as an indication of how large svc_fdset is in their
hand-rolled svc_run() loops.  The svc_fdset table is maintained by the
rpc library explicitly for compatability with such programs.  (It uses
a different variable-sized bitmap itself internally)
1996-12-30 18:41:20 +00:00
Peter Wemm 9180f99125 - make wire protocol 64 bit type safe
- extern prototypes now in include file
- fix local prototypes
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:21:19 +00:00
Peter Wemm 9ff75e1aac - prototypes now in include file
- overhaul for unlimited fd's
- OpenBSD's ftp port bounce attack fix
- fix timeouts

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:19:08 +00:00
Peter Wemm 75a98e21b1 - canonical function declaration
- prototypes now in common include file
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:16:22 +00:00
Peter Wemm 0143afc23b - overhaul for unlimited file descriptors
- prototypes now in include files

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.

Note: potential bug here, It looks like there could be a null pointer
dereference depending on what has already been called to initialise some
shared data.
1996-12-30 15:14:29 +00:00
Peter Wemm 3a6ebf3676 - make wire protocol 64 bit type safe
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:10:14 +00:00
Peter Wemm ae1e6afd31 - major overhaul to make this deal with unlimited fd's.
- kill non-FD_SETSIZE code

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.

Note, there was a nasty bug with our old code here.  It would trash the
stack if a fd > 31 was passed in.  It was using a "long" as though it
was an "fd_set", ie: it was assuming that a long was 256 bits wide. :-(
This has been lurking here for a while, since the FD_SETSIZE #ifdef's
were first implemented.
1996-12-30 15:07:33 +00:00
Peter Wemm 39f377845f - make wire protocol 64 bit type safe
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:00:53 +00:00
Peter Wemm c8df2bbd52 Remove our code that clamped the max select() fd number to FD_SETSIZE (256)
This function is now unused.
1996-12-30 14:59:12 +00:00
Peter Wemm 47c49966f6 - kill non-FD_SETSIZE code
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:57:33 +00:00
Peter Wemm ec3ca1a2d3 - 64 bit type safe on-the-wire protocol
- use standard functions
- prototype now in include file

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:55:38 +00:00
Peter Wemm b93e2c954d - prototype now in include file, plus no longer needed anyway
- fix timeout code
- better sequence number generation (for long running daemons)
- dont close an unopen socket
- use standard functions
- 64 bit type safe for wire protocols
- unlimited file descriptors

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:53:20 +00:00
Peter Wemm fadfbc36c6 - dont close an unopen socket
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:49:24 +00:00
Peter Wemm df7da8069f - Don't close an unopened socket
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:48:28 +00:00
Peter Wemm ec53c6fa4a - don't close unopen socket
- ensure we're not spoofed/confused while trying to talk to the portmapper
- handle new get_myaddress failure cases
- prototype now in include file

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:46:33 +00:00
Peter Wemm 726212fc09 - missing prototype from include file
- canconical function declaration (ctags safe)
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:43:42 +00:00
Peter Wemm e7485a4786 - OpenBSD's strncpy fixes to ensure NULL termination
- missed endrpcent() in some cases.

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:42:31 +00:00
Peter Wemm 5df070f36d - prototypes now in include file
- fix timeout code
- better "random" initial transaction id for long running daemons
- unlimited number of file descriptors to select().
- 64 bit type safe wire protocol
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.

- typo (spelling police :-)
- dont die on select() that returns time remaining (on my systems)
1996-12-30 14:40:34 +00:00
Peter Wemm 7bdb2acfaa - prototypes now in standard include file
- improve initial "random" sequence number, to make it harder to guess
  in long running daemons.
- fix timeout code.
- unlimited number of fd's in select.
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.

- Protect against select() that returns time remaining (on my systems).
1996-12-30 14:36:17 +00:00
Peter Wemm d7c57d7159 - update return type of an "internal but documented" function
- warn about FD_SETSIZE in certain internal functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:30:27 +00:00
Peter Wemm f3c1d59c73 - tags in correct order
- list missing functions
- list missing args

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:28:10 +00:00
Peter Wemm ad51fb4d83 - canonical function declaration
- don't exit. It's bad form for libc to exit() or abort() instead of
  returning an error.
- only use loopback addresses after checking the real interfaces.

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:26:28 +00:00
Peter Wemm 0ab74c6fd6 - don't close an unopen socket
- canonical function declaration
- use constants from includes, not magic numbers
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:23:50 +00:00
Peter Wemm a68eb0d41f - prototype moved to include file
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:21:36 +00:00
Peter Wemm 370c138add - buffer overflow fix, from OpenBSD
- optimise the error number -> string mapping code

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:19:34 +00:00
Peter Wemm dd418becac - use standard function
- timeout code repaired elsewhere, remove unneeded workaround

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:17:20 +00:00
Peter Wemm bf3bd46dc3 - prototype now in common include file
- standard function name

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:14:39 +00:00
Peter Wemm 27b979b2d7 - prototype now in include file, not here
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:13:30 +00:00
Peter Wemm dd50fc2139 - Man page fix, updates.
- minor cosmetic tweaks

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:12:36 +00:00
Peter Wemm 0159281b07 Add manpage links for rpc functions
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:08:45 +00:00
Peter Wemm 1ad08a09e9 - Missing prototypes, including pointers to functions
- 64 bit long type safe (wire protocols specified in explicit sized types)
- Support systems that don't do unaligned accesses
- Support for explicit int16 and int32 sizes in xdr

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:07:11 +00:00
Peter Wemm 889f6ffb91 xdr manpage links
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:02:42 +00:00
Peter Wemm 8c675e8051 Tempt fate! 'cvs add' a file remotely which also exists in the Attic on
RELENG_2_2!

This is part#2 of the previous commit to src/lib/libc/net to contain the
potential damage.

This provides stubs so that binaries linked in 2.2 will run on 3.0
1996-12-30 13:25:38 +00:00
Peter Wemm ca785773f6 Here goes.. Bring the 4.9.5-P1 resolver into -current. This has the
DNSSEC stuff, among other things.  There are also some renamed functions,
I've left out the res_stubs.c from this commit in case cvs bombs out..
1996-12-30 13:18:48 +00:00
Jordan K. Hubbard c94d336e8b LIBMODE -> LIBOWN 1996-12-30 07:32:34 +00:00
Jordan K. Hubbard 4accebfea4 Argh, guys, LIBOWN, not LIBMODE for -o! :-) 1996-12-30 07:31:43 +00:00
Peter Wemm f6911bfce9 Back out max's rev 1.15. tclLoad.c and tclLoadDl2.c are most definately
needed, as he discovered when he tried to run vi. :-]
These files used to be stubs which used #ifdef PIC to decide whether to
use the real dlopen() version or the stub version from the src/contrib/tcl
sources.  Now, with the our stubs gone, the .PATH directive causes them to
be compiled directly from src/contrib/tcl/{unix,generic}.  You might need
to rebuild your depend rules though as they may have stale paths.

Also, this is a generated file. This should not have been edited here.
1996-12-30 06:20:21 +00:00
Masafumi Max NAKANE 4c180e3dfa Remove tclLoad.c and tclLoadDl2.c from SRCS as these files have been removed. 1996-12-30 01:11:26 +00:00
Joerg Wunsch 483f4c8371 Finally document the interfaces found in libutil. While being here,
also add the missing declaration of forkpty() to libutil.h.

Btw., the calling interface for login(3) is crude.  Some better
abstraction is needed, perhaps similar to logwtmp(3).

2.2 candidate, but i'll wait for the spelling police first. :)
1996-12-29 18:30:42 +00:00
Bill Paul 1e6c86d048 Unspam this file: replace spaces with tabs so make doesn't barf. (I smell
a cut & paste-o.)

Noticed by: Ron Bolin <rlb@mindspring.com>
1996-12-29 16:32:21 +00:00
Alexander Langer c65976619e Sync with libc.
Submitted by:	John Birrell <jb@cimlogic.com.au>
1996-12-29 03:04:08 +00:00
Alexander Langer d0c9b2a226 Added uthread_attr_destroy.c to SRCS.
Submitted by:	John Birrell <jb@cimlogic.com.au>
1996-12-29 02:51:55 +00:00
Alexander Langer 8596ee6d82 _thread_kern_sig_unblock takes an integer, not a reference.
Submitted by:	John Birrell <jb@cimlogic.com.au>
1996-12-29 02:38:50 +00:00
Peter Wemm 3488b209cc Fix some more problems:
- the .gz files are no longer used as intermediate files, it's in a pipe
  now.  (gunzip normally deleted them anyway, but this should not hurt)
- I accidently left a -p arg to install from testing.  Bruce says it should
  be ${COPY} instead, but almost everything else in the tree uses plain -c
  anyway.
- Use "LINKS=" or two identical files are installed sepeately instead of
  as links (doh!)
- Use "LIB..." instead of "BIN..." for install permissions.  Note that we
  still use bsd.prog.mk, not bsd.lib.mk because bsd.lib.mk has problems
  (it can't install a library unless it compiles it).
- Define LIBCOMPATDIR in Makefile.inc instead of using BINDIR.

Mostly submitted by: bde
1996-12-28 17:42:48 +00:00
Peter Wemm a4ae35ba9e Remove these.. umm.. "interesting".. hacks now that they are not needed. 1996-12-28 17:15:10 +00:00
Peter Wemm fbde87863d When linking with no rtld support, provide stub dl*() functions that
just return errors.  This removes the need for awful hacks like that in
our build of libtcl which would get link errors when linked static.

John Polstra once mentioned that this was on his "todo" list.

Note that one can use:
  cc -Wl,-Bstatic -o foo foo.o
and get an executable that has it's libraries statically linked, but has
a fully functional runtime linker so the executable can call dlopen() and
have it work.  (I've tested this)
1996-12-28 17:10:52 +00:00
Andrey A. Chernov af155bdff3 Add comment that range checking is already done at upper level
Kill snprintf left in collate.c from previous backout

Should go in 2.2
1996-12-28 05:04:24 +00:00
Bill Paul 1d2493ff77 Small yet significant tweaks/cleanups:
- getpwent:
  o adjunctbuf should be NUL terminated after copying
  o _pw_breakout_yp() needs to know the length of the buffer returned
    from YP so it can properly NUL terminate its local buffer.

- getgrent:
  o YP buffers should be YPMAXRECORD + 2 bytes long and NUL terminated.
    (Previously they were hardcoded to 1024 bytes.)

- getnetgrent:
  o YP data should be copied with snprintf(), not sprintf()

These are 2.2 candidates. I will wait a few days to make sure these don't
break anything and then, if there are no objections, move them to the 2.2
branch.
1996-12-27 19:28:46 +00:00
Bill Paul 3951b8e32c Small yet significant tweaks/cleanups:
- getservent:
  o put _yp_check() proto under #ifdef YP where it belongs
  o local YP buffers should be YPMAXRECORD + 2 bytes long and should
    be NUL terminated after copying

- gethostbynis:
  o local YP buffer should be YPMAXRECORD + 2 bytes long

- getnetbynis:
  o local YP buffer should be YPMAXRECORD + 2 bytes long and should
    be NUL terminated after copying

- ether_addr:
  o local YP buffers should be YPMAXRECORD + 2 bytes long and should
    be NUL terminated after copying (in this case it's BUFSIZ + 2 bytes,
    but it happens that BUFSIZ == YPMAXRECORD.

- gethostbydns:
  o nuke stray 'return(NULL)' in __dns_getanswer() (harmless but looks silly)

These are 2.2 candidates. I will wait a few days to make sure these don't
break anything and then, if there are no objections, move them to the 2.2
branch.
1996-12-27 18:21:07 +00:00
Alexander Langer 205390f373 Make a note in the standards section that sysconf isn't completely
POSIX conforming.
1996-12-27 03:39:03 +00:00
Wolfram Schneider ebddb6b4fe Use dynamic allocated buffers instead static buffers. No member or
line length limit anymore - now 500 members or 5000 members are
possible. For security group lines longer than 256K will be count as
an error. 256K should be enough for 65536 users.

Support comments (lines that begin with a #) if compiled with
option -DGROUP_IGNORE_COMMENTS.

Fortunately it seems that all system utilities which use getgrent()
functions are dynamically linked executables. So you need only
rebuild libc.so.3.0 if you want this change. Note: if you have
an old X server which depend on libc.so.2.* you should rebuild
libc.so.2.* too.

Not a 2.2 candidate.
1996-12-25 21:51:24 +00:00
Bill Paul f360d1effe Another one-liner: remember to NUL terminate local copy of NIS host
lookup results. Without this, doing multiple host/addr lookups in a
single process yeilds strange results (the buffer is static, and
garbage may be left behind from previous lookups).

I just noticed this in 2.2-BETA. Unless somebody threatens to chop my
hands off with an axe, I'm going to move this to the 2.2-RELENG branch
shortly.
1996-12-24 17:01:49 +00:00
Bill Paul 6b73680dcf Make the __dns_getanswer() wrapper work right. For the newer versions
of BIND, we need to tweak some things to that gethostanswer() knows
whether or not we're dealing with an IPv4 or IPv6 address. (This'll
teach me to use a 2.1.0 system for NIS development -- but it's so nice
and stable I just can't being myself to upgrade it. :)
1996-12-24 02:10:24 +00:00
Wolfram Schneider 13608f6661 comma typos 1996-12-23 23:09:55 +00:00
Jordan K. Hubbard 9e08703418 BINMODE != BINOWN - I was wondering why the output files were owned by
uid 555. :-)
1996-12-23 21:47:28 +00:00
Peter Wemm 8ff1029282 In the spirit of Christmas, I give ye a gift!
- A major 11th hour, last second,  untested commit!

Build some infrastructure to clean up the compat lib distributions, and
also allow them to be installed from the source tree rather than having
to to and get the tarballs from freefall or a CD.  Some tweaks to
/etc/make.conf are in the pipeline to enable it.

This came about because it became apparent that we'd have to change the
compat21.tgz tarball to fix the NIS problem with 2.1.x binaries.  Since
it's tar..gz.uu, doing this would have caused a huge repository change
and we may as well try and fix it once and for all.  Now, adding/removing
libraries should have MUCH less repository impact.

Peril sensative sunglasses: on!
Flame proof suit: on!
Concept reviewed by a stream of ascii representing the opinion of: jkh
Changes casually reviewed by: jkh (but not actually tested)
1996-12-23 05:07:37 +00:00
Mike Pritchard c5ea5a2eb0 Add the appropriate MLINKS for the new skey.3 man page. 1996-12-22 23:18:50 +00:00
Mike Pritchard eabc732c93 Fix a spelling error. 1996-12-22 23:13:58 +00:00
Bill Paul ce8bac1e6d Add __dns_getanswer() hook to allow access to the gethostanswer()
functions from outside libc. (Needed for async DNS resolver in ypserv.)
1996-12-22 22:05:43 +00:00
Joerg Wunsch 42ceaa809f Back out rev 1.5: the overflow condition is already handled elsewhere. 1996-12-22 15:48:06 +00:00
Stephen McKay 354ae80dd4 The fix for PR#bin/722 made it into 2.1.5 and 2.1.6, but not into -current.
Without it, the last row and last column don't get their background updated.

I think this should be in 2.2.

Submitted by:	Paul Koch <koch@thehub.com.au>   (again)

Passing observation: The fixes that pst put in on 1996/09/22 then backed out
look like they should be put in again.  If sysinstall is depending on bugs,
then it should be fixed.
1996-12-22 14:24:49 +00:00
David Nugent 85c08564c3 Manpage for public functions in libskey. 1996-12-22 13:33:56 +00:00
David Nugent 5b062f153c Incorporate new manpage for libskey. 1996-12-22 13:33:11 +00:00
Poul-Henning Kamp 76516938fa Just pick up the real thing from <sys/md5.h> 1996-12-22 10:32:17 +00:00
Poul-Henning Kamp 15cfc283d8 Make this compile in the kernel too, major cosmetic cleanup. 1996-12-22 10:27:25 +00:00
David Nugent b8dd511777 Speeling fix. 1996-12-22 02:14:56 +00:00
Mike Pritchard 639460dc29 Convert to mdoc format. 1996-12-21 22:56:48 +00:00
Bill Paul 73418074a9 Add a missing #ifdef YP/#endif pair so that this module will
compile without -DYP.

Pointed out by: Wolfram Schneider
1996-12-21 18:36:44 +00:00
Bill Paul cc64a2bf11 Fix for bug noticed by Christoph Kukulies.
_yp_dobind() checks to see if a fork() happens (by checking PIDs) and
invalidates all bindings if it finds itself in a newly created child
process. (This avoids sharing RPC client handles and socket descriptors
with the parent, which would be bad.) Unfortunately, it summarily
calls clnt_destroy() on the handles, which may result in the destruction
of a descriptor that isn't really a socket.

This is fixed by replacing the explicit call to clnt_destroy() with a
call to _yp_unbind(), which deals with potentially hosed socket descriptors
an a safe manner.

This is basically a one-liner. Once I confirm that it fixes Christoph's
problem, I'd like permission to put it in the 2.2-RELENG branch.
1996-12-20 19:41:15 +00:00
Bruce Evans f4af388575 Removed references to nonexistent functions log2() and log2f(). 1996-12-18 17:47:03 +00:00
Steven Wallace 78ecc89829 Back out change. The last argument to semctl() IS union semun
for the C library call, which is a wrapper that passes it by reference
to the kernel.
1996-12-18 08:03:31 +00:00
Jordan K. Hubbard 6e173e27c2 Last argument to semctl() is union semun *, not union semun.
Pointed-Out-By: swallace
Person-With-Commit-Privs-By-Whom-It-Should-Have-Been-Committed: swallace
1996-12-17 21:58:00 +00:00
Jordan K. Hubbard 558ad0694d Sanitize and extend SIGALRM timeout handling. 1996-12-17 20:19:35 +00:00
Peter Wemm ba27affb3a Regenerate. This picks up the new CFLAGS for the PR#2006 fix. 1996-12-17 13:13:11 +00:00
Joerg Wunsch 120e62ec50 Fix yet another buffer overflow. :-(
Vulnerable: all programs that use setlocale(LC_COLLATE),
setlocale(LC_CTYPE), or setlocale(LC_ALL).  The only setuid/setgid
binary i've found for this is w(1).

Should go into 2.2.
1996-12-16 17:32:58 +00:00
Peter Wemm 819ba1a1c4 Rerun configure for updates 1996-12-16 11:59:10 +00:00
Mike Pritchard 495be781d9 Mention FreeBSD explicitly along with 4.2BSD so that the
reader will know that this information does apply to FreeBSD also.

Closes PR# 1618.

This can go into 2.2.
1996-12-15 23:23:17 +00:00
Mike Pritchard 487990280d Correct some xrefs/mlinks. 1996-12-14 23:27:20 +00:00
Bruce Evans c5dd403925 Fixed fiddling with the control word. Use the stack space reserved for
that purpose instead of space below the stack.
1996-12-14 16:43:53 +00:00
Bruce Evans aa9a769760 Clean up the FPU stack before returning. One stack slot was leaked on
every call.  The damage was sometimes limited by other routines using
and freeing stack slots that should have been empty to being with.
1996-12-14 16:24:42 +00:00
Steve Price fb5cb2083a Merge Lite2 mods, and -Wall cleaning. undelete(2) cruft
not yet implemented is protected by a define (BSD4_4_LITE)
that should be removed when this call is supported by the
kernel.
1996-12-14 06:03:29 +00:00
Joerg Wunsch b784c223ee Fix the fix.
Pointed out by:	wollman, bde
1996-12-13 13:31:12 +00:00
Jordan K. Hubbard 0b3870cb60 Close PR#2198:
I've added an installation from optical disk drive facility.
	This enables FreeBSD to be installed from an optical disk, which
	may be formatted in "super floppy" style or sliced into MSDOS-FS
	and UFS partitions.

	Note:  ncr.c should be reviewed by Stefan Esser <se@freebsd.org>
	and cd.c by Joerg Wunsch <joerg@freebsd.org> before bringing this
	into 2.2.

Submitted-By: Shunsuke Akiyama <akiyama@kme.mei.co.jp>
1996-12-13 07:55:14 +00:00
Joerg Wunsch 4e17605909 Don't free the line buffer, since getttynam(3) might still reference
it.

Closes PR # bin/2196: Bug in src/libc/gen/gettty...

Submitted by:	davidn@blaze.net.au (David Nugent)
1996-12-12 23:52:34 +00:00
Joerg Wunsch 4d224b7f55 Fix an embarassing and rather obscure incarnation of an uninitialized
local variable use.

Found by:	actually using ascii2addr() :-/
1996-12-12 21:21:11 +00:00
Alexander Langer 6616431596 POSIX.4 defines MAP_FAILED to be the error return from mmap(). 1996-12-12 01:00:14 +00:00
Poul-Henning Kamp d4c468e3fe Don't look for encumbered objects, but encumbered sources. 1996-12-11 10:02:29 +00:00
Garrett Wollman 13629194a5 Get struct ether_addr directly from <net/ethernet.h> rather than pulling
in lots of unrelated junk from <net/if.h> and <net/if_ether.h>.  These
functions still aren't prototyped anywhere (but should be in
<net/ethernet.h>---got that, Bill?).
1996-12-10 17:19:11 +00:00
Mike Pritchard 222ca58f9a Change another reference to host names to domain names, and restore some
changes that were lost.

Pointed out by: bde
1996-12-09 16:50:39 +00:00
Mike Smith b0236c093d English pedantry : affect -> effect
Submitted by:	 Daniel O'Callaghan" <danny@panda.hilink.com.au>
1996-12-09 06:04:03 +00:00
Andrey A. Chernov fca321513e Turn POSIX_SAVED_IDS off 1996-12-06 22:53:52 +00:00
Jordan K. Hubbard 380577b434 I asked Bill Paul why _getnetbynis() was only being called with 2 parameters,
and he said:

	The 3rd agrument is new; looks like it was part of the upgrade to
	a new BIND with some IPv6 support. The third argument here should be
	AF_INET. In order for it to be anything else, I'd have to add new
	NIS functions to support IPv6 lookups. I don't even know what those
	look like yet.

So there ya go, add AF_INET as the 3rd argument to the call.

Submitted-by: wpaul
1996-12-06 00:12:31 +00:00
Jordan K. Hubbard 2696fe9c84 Remove more instances of passing arrays by address when they should
have simply been passed as arrays.  In some cases, casts had even
been added to remove the warnings generated by such misuse!  Aieee!
1996-12-05 18:46:19 +00:00
Jordan K. Hubbard afb5b8ed4d Eliminate 3 more examples of gratutiously passing arrays by address.
Everyone please call ParaSoft today and say "I will buy 57 copies of
Insure++ tomorrow, but first I want a FreeBSD version." :-)
1996-12-05 18:41:35 +00:00
Jordan K. Hubbard ecc9c8e3cd sethostname() returns int, not long. I could get used to having this
copy of insure++, too bad the runtime only works for BSD/OS. :-(

Maybe they'll be so impressed by my initial 15 entry bug report for it
that they'll take the FreeBSD version more seriously. :-) :-)
1996-12-05 18:27:20 +00:00
Jordan K. Hubbard 4186474051 _key is a char array and we don't need to pass its address to _buildkey()
when buildkey is expecting a char *.
1996-12-05 18:22:00 +00:00
Jordan K. Hubbard 8af0a47fba gethostname() returns int, not long. Answered my own question by
RTFM'ing.  Either both the header files and the man pages are wrong
or this code is, and I'll take the majority decision. :-)
1996-12-05 18:14:56 +00:00
Jordan K. Hubbard 15ba0c4e86 make u_char * -> char * conversion explicit.
Found-By:  insight's "insure++" tool.
1996-12-05 18:05:11 +00:00
Mike Pritchard 96bafa0758 The semget man page uses the incorect symbol for alter
access.  Closes PR# 1712.

Submitted by:	Kent Vander Velden
1996-12-03 23:03:22 +00:00
Bill Paul 2be5d4cba8 Add support for detecting and hopefully using the passwd.adjunct.byname
NIS map which is present on SunOS NIS servers with the SunOS C2 security
hack^Woption installed. I'm convinced that the C2 security option restricts
access to the passwd.adjunct.byname map in the same way that I restrict
access to the master.passwd.{byname,buid} maps (checking for reserved ports),
which means that we should be able to handle passwd.adjunct.byname map
correctly.

If _havemaster() doesn't find a master.passwd.byname map, it will now
test for a passwd.adjunct.byname map before defaulting back to the
standard non-shadowed passwd.{byname,byuid} maps. If _pw_breakout_yp()
sees that the adjunct map was found and the password from the standard
maps starts with ##, it will try to grab the correct password field
from the adjunct map. As with the master.passwd maps, this only happens
if the caller is root, so the shadowing feature is preserved; non-root
users just get back ##username as the encrypted password.

Note that all we do is grab the second field from the passwd.adjunct.byname
entry, which is designated to be the real encrypted password. There are
other auditing fields in the entry but they aren't of much use to us.

Also switched back to using yp_order() to probe for the maps (instead
of yp_first()). The original problem with yp_order() was that it barfed
with NIS+ servers in YP compat mode since they don't support the
YPPROC_ORDER procedure. This condition is handled a bit more gracefully
in yplib now: we can detect the error and just punt on the probing.
1996-12-03 17:55:49 +00:00
Wolfram Schneider fd3bf33fd0 upgrade STANDARDS from POSIX 1003.1-88 to 1003.1-90 using .St macro
use ``is expected to conform to'' phrase, not ``conforms to''

Pointed out by: Bruce->NIST-PCTS
1996-12-02 20:03:58 +00:00
Mike Pritchard c5fe2345a9 Update getdomainname(3) to reflect that it operates on
domain names and not host names.

Pointed out by:  bde
Obtained from:  NetBSD
1996-12-01 00:10:28 +00:00
Poul-Henning Kamp 00f723bf6b Improve the Dangerously Dedidcated mode a bit. Not much, but a bit better. 1996-11-27 22:44:43 +00:00
Andrey A. Chernov e2900279d2 Add rcsid[]
Since locale reading code not resistent against stack overflowing or
similar intruder attacks, don't allow PATH_LOCALE env variable action
for s-bit programs (non-standard locale path setting)
1996-11-27 22:30:44 +00:00
Andrey A. Chernov 40c0625e97 Add Id
Optimize/improve recently added locale restoration on failure
1996-11-26 08:00:17 +00:00
Andrey A. Chernov 1a1379aedf Move PATH_LOCALE handling to setlocale.c, simplify locale path building,
don't treat empty encoding as C encoding
1996-11-26 02:52:52 +00:00
Andrey A. Chernov c8f931a80e PATH_LOCALE: use this non-standard env variable first time only, i.e.
strdup() it to prevent unsetenv() or setenv() effects. Check its length to
not allow user to overflow internal locale buffer. Move PATH_LOCALE
handling code into one place.

POSIX: make better stub for LC_MONETARY & LC_NUMERIC, now it check
locale directory existance instead of refusing all non-C non-POSIX
locales. POSIX treats empty locale env variable as unset variable
while our old code treats it as "C" locale, fix it. Implement previous locale
restoring, if locale setting fails. Old code assumes success if some
of LC_ALL subset is successed even other fails, POSIX treats it as
failure with previous locale restoring, fix it.

Remove unneccessary length checking in currentlocale()
1996-11-26 02:49:53 +00:00
Paul Traina f308a4b42c get_myaddress() wasn't following the interface array properly
Cannidate for: 2.2
1996-11-22 23:37:08 +00:00
Garrett Wollman 3267ea91c8 Oops, we still want to build/install the static libraries. 1996-11-20 20:55:11 +00:00
Garrett Wollman bbcb8093fe Copy a slightly modified version of the `libgnumalloc hack' to allow
us to finally phase out the 8K shared version of liby in favor of the
600-byte static one, as was done years ago for libl/libfl.
1996-11-20 20:54:28 +00:00
Bruce Evans 766631018f Fixed execvp() of an empty pathname to fail POSIXly. Previously it
attempted to exec the components of $PATH and it usually set errno
to the wrong value.

Found by:	NIST PCTS
1996-11-18 19:24:47 +00:00
Bruce Evans 1ad652a54c Fixed uninitialized variables for the '/'-in-pathname case in execvp().
Garbage in `eacces' caused the wrong errno to be set for non-EACCES errors.
Garbage in `etxtbsy' caused a semi-random retry strategy for ETXTBSY errors.

Found by:	NIST-PCTS.  gcc -Wall reported the problem, but -Wall is not
		enabled for libc.
1996-11-18 16:56:51 +00:00
Andrey A. Chernov dbf96d1210 Oops, back out previous optimization, don't work as I expect
(lack of sleep)
1996-11-14 09:51:47 +00:00
Andrey A. Chernov bbd3d24b96 Since ftpPutURL not use hostname cache, optimize it by always closing
connection at the end of operation, so it not leave opened
file without a reason.
1996-11-14 09:44:09 +00:00
Andrey A. Chernov 0c663b7771 For functions ftpGetURL, ftpPutURL, ftpLogin it was impossible to know
FTP error return code because
1) They return NULL, it means that ftpErrno can't be used because
it takes file pointer
2) They don't have FILE-type argument as f.e. ftpGet/ftpPut to use
it for ftpErrno instead.

For that functions I add yet one int* type argument to store
FTP error return code. It is impossible to add some global variable
for that reason, because user can have multiply FTP connections
opened at the same time.

So, interface changed, major number bumped.
Userland changes will follows.

Minor bugfixes, the code:
Forget to close file in few places, when failure occurse
Forget to NULL cached host name, multiply free is possible
1996-11-14 06:59:41 +00:00
Andrey A. Chernov 9e05df0992 Oops, forget the fact that several ftp connections can be active
at the same time, so add new con_state to avoid QUIT recursion

Still should go to 2.2
1996-11-14 05:22:12 +00:00
Andrey A. Chernov b92fd90719 1) Don't allow endless recursion in ftp_close when it attempts to
send QUIT to closed connection.
2) Preserve login failure code, don't overwrite it with ftp_close
code

Should go to 2.2
1996-11-14 05:05:26 +00:00
Alexander Langer 1e7c9b04ad Slight rewording of the BUGS section. 1996-11-13 23:55:28 +00:00
Jeffrey Hsu c1f20410c2 Parameters for localtime_r() and gmtime_r() definitions changed.
Parameters for pthread_getspecific() call changed.
pthread_keycreate() renamed to pthread_key_create().
1996-11-11 09:14:24 +00:00
Jeffrey Hsu 3384e369af Parameters pthread_getspecific() changed. 1996-11-11 09:11:59 +00:00
Jeffrey Hsu 9144f05e36 Add pthread_mutexattr_init() and pthread_mutexattr_setkind_np(). 1996-11-11 09:09:30 +00:00