Commit Graph

4057 Commits

Author SHA1 Message Date
gshapiro
1f7ac54fbd Give users a way to alter the sendmail (and related utilities) build
environment so they can enable functionality such as SASL, LDAP, Hesiod.
2000-09-17 00:41:33 +00:00
phk
49cc6ddb0f Pickup SPECNAMELEN from <sys/param.h> and use it.
A missing _PATH_DEVDB ("/var/run/dev.db") is not cause for a warning
anymore, the file is effectively optional these days.
2000-09-16 21:58:53 +00:00
phk
fc5495e38e Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
2000-09-16 13:43:00 +00:00
ru
8f94bca53c Add -Wmissing-prototypes. 2000-09-15 15:37:16 +00:00
msmith
9f76441881 Teach libdisk about 'aac' 2000-09-13 05:04:48 +00:00
ps
43658697fc Change from using poll(2) to kqueue/kevent when waiting for a DNS
response to return.  This will stop processes waiting on DNS requests
from being woken up when a select collision occurs.  This was tested
on mx1.FreeBSD.org (outgoing mail for the FreeBSD.org mailing
lists.)

Reviewed by:	jlemon, peter
2000-09-12 11:37:20 +00:00
nectar
4b57274ae4 Set h_errno when an error is encountered.
PR:		bin/21092
Submitted by:	Alexander Kabaev <ak03@gte.com>
2000-09-10 19:06:05 +00:00
ps
0f7130e6ed Backout last commit. It was wrong.. *sigh* 2000-09-10 01:17:47 +00:00
ps
0965196029 include string.h to silence a warning. 2000-09-10 01:10:15 +00:00
phk
d0fd2f76cf Add code to devname(3) so it can find the names of devices which
were not present when dev_mkdb(8) was run.

First the dev_mkdb(8) database is searched, this caters for non-DEVFS
cases where people have renamed a device.

If that fails we ask the kernel using sysctl kern.devname if the device
driver has put a name in the dev_t.  This covers DEVFS cloned devices.

If that also fails we format a string which isn't entirely useless.
2000-09-09 11:39:59 +00:00
ache
ddefbaa46b Prevent buffer overflow if NLSPATH is too long 2000-09-08 11:42:37 +00:00
kris
a1158cce42 Disallow '/' characters in LC_* environment variables which might
be used to point to a bad locale file. This is only believed to be a
minor security risk - the only risk is if some program uses the result
of a localized string as a format specifier in a vulnerable function
like sprintf(). No such code is believed to exist in the FreeBSD base
system, although it is possible that badly written third party code
would do that.

Submitted by:	imp
Approved by:	ache
2000-09-08 07:29:48 +00:00
nectar
5450aa20ea Fix getipnodebyname(3) bug.
Submitted by:	ume
2000-09-07 02:18:22 +00:00
nectar
748554442d Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
  functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
    . getgrent, getgrnam, getgrgid
    . getpwent, getpwnam, getpwuid
    . getusershell
    . getaddrinfo
    . gethostbyname, gethostbyname2, gethostbyaddr
    . getnetbyname, getnetbyaddr
    . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc.  rc.network has been modified
  to warn that host.conf is no longer used at boot time.  In addition, if
  there is a host.conf but no nsswitch.conf, the latter is created at boot
  time from the former.

Obtained from:	NetBSD
2000-09-06 18:16:48 +00:00
ache
962cffc5fb Add .El 2000-09-06 16:52:01 +00:00
msmith
e2f94e5aa5 Expose the NFS root node, so that an evil consumer can use it to get the
NFS filehandle for the root mount.
2000-09-05 22:11:41 +00:00
ache
f7c8729376 Document %-macros and NLSPATH better. 2000-09-05 19:14:34 +00:00
ache
7925505886 Fully implement NLSPATH processing as described in SUSv2 2000-09-05 14:04:21 +00:00
phantom
5b566d9d01 Oops! don't set errno to ENOMEM explicitly if malloc() failed.
Found by:	ache
2000-09-05 12:23:08 +00:00
msmith
6ff92c14b7 Implement readahead buffering for non-raw files. This drastically improves
the efficiency of byte-by-byte read operations on filesystems not already
supported by the block cache (especially NFS).

This should be a welcome change for users booting via PXE, as the loader
now reads its startup files almost instantly, instead of taking tens of
seconds.
2000-09-05 09:52:50 +00:00
peter
459dd42211 Remove the SIGSYS handler and wrapper around the __getcwd() syscall.
It was kinda silly since the sigaction() syscall that it used to setup
the handler is more recent than __getcwd(), therefore it was useless
as the wrapper would have died before even getting as far as __getcwd(2).

Reminded by:	bde
2000-09-05 09:35:36 +00:00
peter
ebbd43d98f Yank out the NOPOLL conditionals. libc_r no longer needs it, and this
library depends on other things that come *way* later than poll() now
(sigset size changes in particular)
2000-09-04 21:28:16 +00:00
imp
9a4445204b Use .St -susv2 rather than "The Single UNIX Specification".
Submitted by: sheldonh
2000-09-04 15:38:58 +00:00
phantom
adbc56332d * move $FreeBSD$ tag to its usual place (bottom of copyright)
* mdoc cleanup
* document missing errno values (ERRORS section)

Reviewed by:	sheldonh
2000-09-04 13:20:56 +00:00
phantom
07bb417f8a Finaly cleanup libc/nls code:
* rewrite catopen() to remove duplicate code chunks and optimize
* if empty string is passed to catopen() as name argument then
   catopen() will set errno to ENOENT (File not found), not EINVAL
* move search code to LOOKUP() macro to shrink amount of duplicated code
* move common resource freeing actions to __nls_free_resources() function
* exclude from build code related to MCLoadAll defintion since it is not
  using at all
* style(9) related whitespace changes

Reviewed by:	ache
2000-09-04 12:09:40 +00:00
peter
6592e5f7bb Constify the arg to logout(3). It is const-safe.
(cosmetic: drop some "register" qualifications too.)
2000-09-04 08:13:49 +00:00
imp
56dbb8be3c Get errno from <errno.h>, not from extern int.
Add $FreeBSD$ to hopefully the right place.
2000-09-04 03:54:23 +00:00
imp
78c14ae89a Don't print an error message if the bad option is '?'. This has been
in my tree for a long time.  bde reviewed this once upon a time and
said it was OK, iirc.  This also obviates the need to put ? in the
optstring argument to preclude the extra warning message which some
people think confuses users.  When I made my getopt cleanups of a long
time ago, this was the compromise reached.  I just neglected to commit
it until now.
2000-09-04 03:49:22 +00:00
imp
6eee268d67 The comparison against 0 should be against LC_ALL. category isn't a
boolean and it is LC_ALL that's special.

Someone submitted this to me a long time ago, but I can't find the
mail now.
2000-09-04 03:43:24 +00:00
imp
b21324d129 Soften the statement about select's timeout argument. This part of
the system likely won't change in the future, but the warning is a
good idea.
2000-09-04 03:32:30 +00:00
ache
bbd4badbd6 Rewrite using stdio. It cause program speedup since eliminates lots of small
read() syscalls.  It not cause static binary size increasing because stdio
already picked via setlocale() called from catopen()
2000-09-03 21:05:10 +00:00
ache
9ec6d409a0 Add:
The implementation will behave as if no library function calls strtok().
2000-09-03 13:24:28 +00:00
peter
fc5face494 Make libstand compile 2000-09-03 11:29:18 +00:00
brian
3f670babb5 setproctitle() requires unistd.h and not libutil.h/-lutil 2000-09-02 02:25:34 +00:00
brian
5990f9fefc Move setproctitle() from libutil to libc (after a repo-copy)
and bump __FreeBSD_version to 500012 to mark the occasion.

setproctitle() is prototyped in unistd.h as opposed to stdlib.h
where OpenBSD and NetBSD have it.

Reviewed by: peter
2000-09-02 01:51:36 +00:00
ru
c183e5be0a Match IPPROTO_ICMP with IP protocol field of the original IP
datagram embedded into ICMP error message, not with protocol
field of ICMP message itself (which is always IPPROTO_ICMP).

Pointed by:	Erik Salander <erik@whistle.com>
2000-09-01 16:38:53 +00:00
ache
6d6923050a Treat empty lang as "C" lang too 2000-09-01 13:19:18 +00:00
phantom
5b3f190e28 Set rcsid to correct value
Resort #include files
Remove SYSV compatibility chunks
2000-09-01 12:19:00 +00:00
phantom
76465a7c58 protect .h file contents correctly. 2000-09-01 12:13:33 +00:00
phantom
2ae932bdcb Remove unused indirect references to cat* functions. 2000-09-01 12:10:59 +00:00
phantom
3fd2030fc4 Fix memory leak introduced by kris in rev 1.22 2000-09-01 11:56:31 +00:00
ache
abfec47a85 setlocale may return NULL, handle this case too by resetting to "C" 2000-09-01 11:13:38 +00:00
ache
fea9bbdd85 Move protection code down to handle NL_CAT_LOCALE case too. 2000-09-01 11:09:34 +00:00
ache
c023c260fc Protect from badly formed LANG variable 2000-09-01 10:54:04 +00:00
ru
3e30fdbd5a Changed the way we handle outgoing ICMP error messages -- do
not alias `ip_src' unless it comes from the host an original
datagram that triggered this error message was destined for.

PR:		20712
Reviewed by:	brian, Charles Mott <cmott@scientech.com>
2000-09-01 09:32:44 +00:00
des
355bb561f3 Import XPG4-compliant basename(3) and dirname(3) from OpenBSD.
The man pages need some adjustments.

PR:		12960, 12962
Submitted by:	James Howard <howardjp@wam.umd.edu>
Obtained from:	OpenBSD
2000-08-31 15:56:15 +00:00
des
ebf8e6bdbf Document the FTP_PROXY and HTTP_PROXY variables better. 2000-08-31 15:13:22 +00:00
ru
e01f2b2835 Grab ADJUST_CHECKSUM() macro from alias_local.h. 2000-08-31 12:54:55 +00:00
ru
5feb1713fe Create aliasing links for incoming ICMP echo/timestamp requests.
This makes outgoing ICMP echo/timestamp replies to be de-aliased
with the right source IP, not exactly the primary aliasing IP.
2000-08-31 12:47:57 +00:00
ache
85d6a99272 catgets: detect if fd becomes invalid after exec and return default response
cosmetique, use NULL for pointers comparison
2000-08-30 11:44:44 +00:00