Commit Graph

869 Commits

Author SHA1 Message Date
smpatel
de19e026cc Fix the man page to reflect the recent addition of RFNOWAIT and the removal of
Plan9 specific flags.
1996-04-18 23:36:41 +00:00
ache
6d0f739b3c Fix error in wcstombs: byte count not counted
Remove unneded casts in sgetrune/sputrune
Submitted by: wcstombs fix by Mihoko Tanaka <m_tonaka@pa.yokogawa.co.jp>
1996-04-18 07:01:46 +00:00
joerg
a411fde3df Document the possible EPERM return.
Submitted by:	imp@village.org (Warner Losh)
1996-04-17 20:49:29 +00:00
wpaul
24c5b47bb2 NIS cleanups and fixes, the next generation.
getnetgrent.c:

- Catch one bogon that snuck by: in _listmatch(), check for '\0'
  rather than '\n'; strings returned from yp_match() are terminated
  with a nul, not a newline.

getpwent.c:

- Rip out all of the +inclusion/-exclusion stuff from before and
  replace it with something a little less grotty. The main problem
  with the old mechanism was that it wasted many cycles processing
  NIS entries even after it already knew they were to be exlcuded
  (or not included, depending on your pointof view). The highlights
  of these changes include:

  o Uses an in-memory hash database table to keep track of all the
    -@netgroup, -user, and -@group exclusions.

  o Tries harder to duplicate the behavior normally obtained when using
    NIS inclusions/exclusions on a flat /etc/passwd file (meaning things
    come out in much the same order).

  o Uses seperate methods for handling getpwent() and getpwnam()/getpwuid()
    operations instead of trying to do everything with one general
    function, which didn't work as well as I thought it would.

  o Uses both getnetgrent() and innetgr() to try to save time where
    possible.

  o Use only one special token in the local password database
    (_PW_KEYYPBYNUM) instead of seperate tokens to mark + and -
    entries (and stop using the counter tokens too). If this new
    token doesn't exist, the code will make due with the standard
    _PW_KEYBYNUM token in order to support older databases that
    won't have the new token in them.

  All this is an attempt to make this stuff work better in environments
  with large NIS passwd databases.
1996-04-16 00:22:41 +00:00
wpaul
78748acfc6 Fix a few NIS-related bogons:
- Clear the _yp_innetgr flag immediately after calling setnetgrent() from
  innetgr(). We only need the flag set to temporarily alter setnetgrent()'s
  behavior. Previously, it was being cleared too late.

- When in NIS-only mode, innetgr() was wasting time doing unecessary
  extra processing after it had already found a match.

- Remember to free memory allocated by the NIS functions during innetgr()
  searches.
1996-04-15 16:17:04 +00:00
mpp
f150b93f6a Update the description of strncat to accurately describe how many
bytes are copied to the destination string.  Closes PR#1000.

Submitted by:	Dave Glowacki <dglo@ssec.wisc.edu>
1996-04-09 22:00:39 +00:00
mpp
a86dce0f60 Correct a minor typo. Fixes part of PR#1000.
Submitted by:	Dave Glowacki <dglo@ssec.wisc.edu>
1996-04-09 21:48:21 +00:00
mpp
f13d17519f Do not install the now unsupported netns and netiso
related man pages.  Comment out cross references to those man
pages from other man pages.
1996-04-08 05:15:09 +00:00
mpp
3c57dc7753 Correct some man page xrefs, and some other minor changes to bring some
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.
1996-04-08 04:18:31 +00:00
mpp
86b292ffbd Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
joerg
51c32388d4 Mention other possible errors that could be caused by the F_[GS]ETOWN
commands.
1996-04-06 09:55:07 +00:00
joerg
adfc8d6391 Xref clocks(7). 1996-04-05 08:53:38 +00:00
jmacd
db840afbd6 Added a note about the return value. Its been so long I can't
remember who suggested the 'caveat' section.  Sorry.
1996-04-05 05:35:57 +00:00
peter
14009d1ae0 Remove outdated (and never quite correct anyway) reference to the
"fact" that pipes were implemented as calls to socketpair().
1996-04-03 04:57:27 +00:00
joerg
f55ef7e508 Xref sysexits(3). 1996-03-31 22:31:51 +00:00
bde
21c110b53c stat() before open() because opening of special files may be harmful. 1996-03-29 12:55:54 +00:00
ache
65241f8b90 Back out one of my previous changes: don't clear PARODD,
so return to absolute minimum of changed flags now
1996-03-28 13:33:18 +00:00
ache
d392938469 cfmakeraw:
clear PARODD bit too, help user program to set its own
parity via |
Set CREAD bit, it is 99% case
1996-03-27 21:29:32 +00:00
mpp
822fdcab93 Added missing section numbers to a bunch of .Xr macros, or
converted them into .Fn macros where appropriate.  Also fixed
up some minor formatting problems.
1996-03-27 20:49:07 +00:00
bde
f8f67e13c6 Removed now-bogus casts that were to hide the inconsistency between the
nonstandard normal version and the standard threaded version.

Removed a bogus L in a constant.  fpos_t's aren't longs, and casting to
fpos_t would be verbose.
1996-03-27 18:07:29 +00:00
bde
0994461968 Fixed bogus cross references.
Reviewed by:	mpp
1996-03-27 17:54:40 +00:00
bde
f1d0d6d615 Say what happens to the buffer when fgets() returns NULL.
Fixed bogus cross references and a misordered line.
1996-03-27 17:43:38 +00:00
ache
86f3f18b7f 8bit clean fixes 1996-03-25 14:34:26 +00:00
ache
46b10c0b2b Convert int to uchar range for ctype 1996-03-25 14:32:30 +00:00
ache
5ae177135b Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:43:24 +00:00
ache
5719077b9b Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:35:36 +00:00
ache
53d0d5e303 Since n is int now, sanity check must be n <= 0, not simple n == 0 1996-03-25 12:03:11 +00:00
joerg
18d2a8c9e5 Make libdisk C++ aware:
- add __BEGIN_DECLS and __END_DECLS,
- add a bunch of ``const'' qualifiers all over the place,
- rename the `private' struct member into `private_data' to avoid the
  clash with the C++ keyword.
1996-03-24 18:55:39 +00:00
paul
a9cb635df2 Fix incorrect parameter types. 1996-03-24 15:49:34 +00:00
wpaul
7ef60754ce Don't bother trying to flock() /var/run/ypbind.lock; this breaks when
/var/run resides on an NFS filesystem (flock() always returns 0 in
this case, so we falsely assume that ypbind is dead and bail out).

Settle instead for better failure checking when using clnttcp_create()
and clnt_call() to interact with ypbind. We still try to flock()
/var/yp/binding/$DOMAINNAME.2, but if this doesn't work, we drop into
the code that retrieves the binding information from ypbind directly.
If that also fails, then we're toast. On NFS filesystems, this means
we'll be ignoring the binding file for no reason and always talking to
ypbind even though we don't have to, but at least things will work.

(I could just replace the flock(/var/run/ypbind.lock) check with
an RPC call to ypbind's NULLPROC procedure, but if the flock() of
the binding file doesn't pan out we're going to try to talk to
ypbind later anyway. *sigh* Is NFS file locking ever going to work?)
1996-03-23 22:48:19 +00:00
wpaul
ce5b804dd0 Fix other half of problem reported in PR #1079: _getnetbynisaddr() is
broken. The translation from network number to ASCII string was not
working correctly (you would sometimes get things like 0.244.0.0 instead
of 244.0.0).

Also copied results of yp_match() to a static buffer for consistency
with gethostbynis.c.

Note: _getnetbynisaddr() chops off trailing .0's, i.e. 244.0.0 is
truncated to 244. By contrast, getnetbyht.c code (for local /etc/networks
lookups) leaves the traling .0's in place. This means that the NIS
and local file lookups will match different things when looking up the
same network number. I'm not sure which is the correct behavior. (I
think the DNS lookup code tries all combinations -- should the NIS
and local host lookup routines do that too?)
1996-03-23 22:16:22 +00:00
fenner
78136570e7 The 4.4-lite vfprintf counted the %# hex prefix and the sign in
the precision; ANSI X3J11 is not crystal clear but certainly says
that the precision specifies the number of /digits/, and signs
and "0x" aren't really digits.

NetBSD already has a similar patch.
1996-03-20 18:28:48 +00:00
julian
4a26557147 keep the libc_r makefiles in step with those from libc
There needs to be a better way of doing this..
preferably we could add another pass to the
normal libc makefiles to do _r versions as well as _p versions
1996-03-20 03:05:34 +00:00
wpaul
11fb5722e2 Fix yp_all() so that it doesn't bogusly return YP_NOMORE at the end
of a successful map retrieval. (This has to do with a previous change
to xdr_ypresp_all_seq() and ypxfr_get_map(); originally, yp_all()
would look for a return value of YP_FALSE to signal success, but now
it should be looking for YP_NOMORE. It should not be passing YP_NOMORE
back up to the caller though.)

Noticed by:  <aagero@aage.priv.no>

There is also another small bug here, which is that the call to
xdr_free() that happens immediately after the clnt_call() in yp_all()
clobbers the return status value. I've worked around this for now,
but I think the xdr_free() is actually bogus and should be removed.
I want to check some more before I do that though.
1996-03-19 19:27:03 +00:00
bde
c475889107 alarm -> ualarm. 1996-03-19 13:53:00 +00:00
bde
00289fe415 Updated a type to match Lite2's fixed-width type changes.
Added $Id$.

Obtained from:	4.4BSD-Lite2
1996-03-19 13:44:57 +00:00
joerg
aa8fa83344 Add libdisk. 1996-03-18 18:59:08 +00:00
jkh
e938ba728f Fix bogus MLINKS line. When is the old libdisk going to go away, BTW? 1996-03-18 15:15:42 +00:00
joerg
126dc2f282 libdisk is now `adult':
. install libdisk.h into /usr/include
. add a (preliminary) manpage, mostly featured after phk's comments
  in libdisk.h
1996-03-17 23:20:09 +00:00
guido
7a8ec4f7ff Work around a bug in the Sun rpc code. This fixes a problem where
a machine with aliase ip addresses on the same subnet of an
interfaces' `real' ip addresses would generate <n> duplicate
broadcasts in clnt_broadcast().
Basically, this fix does a purge on the list of bradcast addresses.
1996-03-17 20:12:53 +00:00
peter
f319c01b19 Repository copy src/release/libdisk to src/lib/libdisk as per recent
discussion on -core about disk partitioning tools etc.

Add NOPIC=yes to Makefile to prevent any possibility of version mismatch
because of the potential grave consequences. (as suggested by phk)

Note that this is also on RELENG_2_1_0, since the sysinstall stuff is
hopefully going to remain in sync.
1996-03-17 19:02:07 +00:00
wpaul
d51d5c3ca5 gethostbynis.c:
- Fix problem described in PR #1079: _gethostbynisaddr() doesn't
  work. Make it accept the same arguments as all the other
  gethostby*addr() functions and properly convert the supplied IP
  address into a text string so that yp_match() can find it in the
  hosts.byaddr map.

- Also fix potential memory leak: copy the results of yp_match() to
  a static buffer and free the result (yp_match() returns dynamically
  allocated memory).

ether_addr.c:

- Since I was in the neighborhood, fix ether_ntohost() and
  ether_hostton() so that they don't bogusly for a free(result)
  when yp_match() fails.
1996-03-16 21:25:59 +00:00
hsu
5f68927341 From Lite2: proc and file LIST changes 1996-03-11 05:34:46 +00:00
hsu
62bcd1f510 From Lite2: rename fs to vfs. 1996-03-11 03:08:51 +00:00
hsu
6845ef4584 From Lite2: rename fs to vfs. 1996-03-11 03:06:45 +00:00
dg
a4dbe92a75 Implemented negative caching on uid/gid lookup failures. This won't
matter much on some systems, but on ftp servers (like wcarchive) where
you run with special stripped group and pwd.db files in the anonymous
ftp /etc, this can be a major speedup for ls(1).
1996-03-05 13:11:42 +00:00
peter
1aa447c3b2 Update the current sigaction(2) man page to current reality..
* sigstack(2) -> sigaltstack(2).
* Document the SA_NODEFER flag
* Document the SA_RESETHAND flag
1996-03-03 14:52:54 +00:00
jkh
67bb6e60dc Close PR#218. Don't reference non-existant dbm(3) and ndbm(3) manual
pages.
1996-03-03 08:53:05 +00:00
peter
1236508ee7 Update the docs after the rename of SA_DISABLE and SA_ONSTACK when used for
ss_flags to SS_DISABLE and SS_ONSTACK.  SA_ONSTACK is still used in
struct sigaction.  Nowhere in our entire source tree could I find a
single place these were used.
1996-03-02 20:24:12 +00:00
peter
d7f117dcfc If the send() to the AF_UNIX socket to the syslogd fails, attempt to
reconnect once using the saved openlog() parameters.

This helps one of the system startup race conditions. If syslogd takes too
long to get going, some daemons can fail the connection and forever log
to the console even though the syslogd is running.  That is ..unfortunate..
1996-03-02 19:56:16 +00:00