Commit graph

5550 commits

Author SHA1 Message Date
Hajimu UMEMOTO 676e98714d - Make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.
- Don't connect datagram socket if RES_INSECURE1.
- Needed to implement IPv6 anycast UDP DNS queries as documented in
  <draft-ietf-ipngwg-dns-discovery-03.txt>.

Obtained from:	KAME
2001-12-26 21:21:10 +00:00
Andrey A. Chernov 98b870fa7b Add "except the handling of errors" into "equivalent to" paragraph.
Pointed by:	bde
Inspired by:	POSIX
2001-12-25 08:43:35 +00:00
Andrey A. Chernov b12990ca58 Preserve errno.
According to C99:
"The  functions  atof,  atoi,  atol, and atoll need not
affect the value of  the  integer  expression  errno  on  an
error.   If  the  value of the result cannot be represented,
the behavior is undefined."
2001-12-25 04:10:50 +00:00
Alexey Zelkin 0388ec7cac Back out recent replacement of LC_MESSAGES file with directory.
Requested by:   ache
2001-12-24 11:49:49 +00:00
Poul-Henning Kamp 257bc17600 Sort the disknames when we get them from the kernel.
Submitted by:	<anarcat@anarcat.dyndns.org>
2001-12-23 21:43:48 +00:00
Chris Costello d06a764812 o Change the layout of the tagged lists to be like those in acl(3).
o Document the following capabilities: CAP_NET_ADMIN, CAP_SYS_RAWIO,
  CAP_SYS_ADMIN, and CAP_SYS_TTY_CONFIG.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2001-12-23 00:19:48 +00:00
Daniel Eischen 2d170746c7 Use the real function address (instead of function address + 8) for the
return address when modifying a jmp_buf to create a new thread context.
Also set t12 with the return address.

This should fix libc_r on alpha.

With much detective work by: Bernd Walter <ticso@cicely.de>
2001-12-22 06:11:06 +00:00
Daniel Eischen 8572518672 Save and restore t12 in the jmp_buf. t12 is used during function
calls.

This change allows libc_r to create thread contexts with a different
stack and return address.

With much detective work by: Bernd Walter <ticso@cicely.de>
2001-12-22 06:06:17 +00:00
Alexey Zelkin aca736a60e add missing MLINKS 2001-12-21 18:26:01 +00:00
Peter Wemm 57c3d698c2 The VM_STACK option is long dead. MAP_STACK is available everywhere. 2001-12-21 17:24:10 +00:00
Alexey Zelkin 709eed76bd Slightly re-work locale messages storage scheme. Before this commit
LC_MESSAGES related data was installed to <locale>/LC_MESSAGES file.
Now it go to <locale>/LC_MESSAGES/SYS_LC_MESSAGES file. LC_MESSAGES
directory is supposed to be storage of message catalogs of userland tools.
This should allow us to avoid many potential problems with future
libintl related functionality introduction.

Thanks for useful suggestions about correct way how to replace plain
files with directories at installworld stage to: Ruslan Ermilov <ru>
2001-12-21 13:14:02 +00:00
Alexey Zelkin f43a321bf0 style(9)'ify 2001-12-20 18:28:52 +00:00
Sheldon Hearn d7e394992c Supply SMB_CFG_FILE in CFLAGS. The newly imported smbfs-1.4.2
allows us to supply our own value for this, overriding the
default /usr/local/etc/nsmb.conf, which is not appropriate for
base system configuration files.
2001-12-20 16:21:47 +00:00
Alexey Zelkin f2d0f4274b Add my e-mail to copyrights 2001-12-20 15:30:02 +00:00
John Baldwin 6507c9a129 Document that rfork() will return EINVAL if flags not listed in the
manpage are passed in.
2001-12-19 00:59:54 +00:00
Ruslan Ermilov 4aa5d00e3d Fixed the bug in transparent TCP proxying with the "encode_ip_hdr"
option -- TcpAliasOut() did not catch the IP header length change.

Submitted by:	Stepachev Andrey <aka50@mail.ru>
2001-12-18 16:13:45 +00:00
Daniel Eischen 7512c816c0 Fix the retrieval of USRSTACK via sysctl so that it works for 64-bit
archs.  This should fix libc_r on alpha.

Submitted by:	Bernd Walter <ticso@cicely9.cicely.de>
2001-12-18 02:02:59 +00:00
Kelly Yancey cb28eb78cb Const'ify the CDB format string passed to the CDB parsing routines
(csio_decode_visit() and family).

Reviewed by:	ken
2001-12-18 00:48:44 +00:00
Alexey Zelkin 2e394b2fc1 Fix some style bugs
Prompted by:	mike
2001-12-17 15:11:29 +00:00
Daniel Eischen 320bfcf3f1 When cancelling a thread while in a join operation, do not detach
the target thread of the join operation.  This allows the cancelled
thread to detach the target thread in its cancellation handler.
This bug was found by Butenhof's cancel_subcontract test.

Reviewed by:	jasone
2001-12-16 13:26:44 +00:00
David E. O'Brien 2f67a9b3cd Embelish CFLAGS. 2001-12-15 21:41:11 +00:00
David E. O'Brien 07e70b12fc The instructions on doing something with src/lib/csu/sparc64. 2001-12-15 21:36:30 +00:00
David E. O'Brien ee425bffeb Sparc64 ELF version of the C runtime support.
It tries to comply with the SCD 2.4.1 (and thus Sparc 64-bit psABI).

This is an amalgamation of the FreeBSD Alpha crt1.c and the BSD/OS Sparc
crt0.c (which the copyright reflects).
2001-12-15 18:54:06 +00:00
Daniel Eischen 35686a943a Pull the target thread of a join operation from the correct place
when cancelling a thread.
2001-12-15 15:52:24 +00:00
Peter Wemm 8754b1ac25 clnt_bcast.c:420:33: warning: extra tokens at end of #endif directive 2001-12-15 00:07:37 +00:00
Sheldon Hearn 23eb26fa51 Kernel support for smbfs is only built on the i386 at the moment, so
limit the building and installation of the userland utilities to that
architecture for now.

Reported by:	bmah
2001-12-14 23:11:45 +00:00
Ruslan Ermilov 7f432ff831 mdoc(7) police: bump document date. 2001-12-14 13:49:28 +00:00
Sheldon Hearn 85519b003a Add bmake glue for src/contrib/smbfs and connect userland smbfs
support to the build.

The MFC reminder below is subject to <re@FreeBSD.org> approval
prior to 4.5-RELEASE.

Reviewed by:	bp, fjoe
MFC:	1 week
2001-12-14 11:41:22 +00:00
Alexey Zelkin e578c6f17c * cleanup comments and defines
Reviewed by:	bde
2001-12-14 11:36:37 +00:00
Alexey Zelkin 243e90d646 Also fix cases when thousands separator should be put before number. For
example before for grouping sequence "\003\003" number 123456 was formated
as ",123,456", now "123,456".
2001-12-13 21:05:27 +00:00
Alexey Zelkin 98ee763522 Respect locale while handling of \' flag.
In original version grouping was hardcoded. It assumed that thousands
separator should be inserted to separate each 3 numbers. I.e. grouping
string "\003" was assumed for all cases. In correct case (per POSIX)
vfprintf should respect locale defined non-monetary (LC_NUMERIC
category) grouping sequence.

Also simplify thousands_sep handling.
2001-12-13 19:45:41 +00:00
Alexey Zelkin ef1ee63e3c Fix style bugs (mostly remove 'extern' from function prototypes)
Inspired by: conversation with bde
2001-12-13 17:22:17 +00:00
Alexey Zelkin 4b667ee0db * remove reference to m68k-dependent sources
* fix comment
2001-12-13 17:18:26 +00:00
Ruslan Ermilov 358034bcfe If the OID is missing, sysctl(3) returns ENOENT, not EOPNOTSUPP.
PR:		docs/32793
Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
2001-12-13 10:59:00 +00:00
Ruslan Ermilov 3ea75eb1a1 s/crypt_format/crypt_default/ to match reality.
PR:		docs/32787
Spotted by:	Pete Carah <pete@altadena.net>
2001-12-13 08:05:32 +00:00
Ruslan Ermilov 6184d98a2a mdoc(7) police: minor markup nits. 2001-12-12 15:02:32 +00:00
Ruslan Ermilov f7475de715 mdoc(7) police: fix markup, bump document date. 2001-12-12 14:53:51 +00:00
Ruslan Ermilov f0cc88ffed mdoc(7) police: kill HSBs, add missing comma. 2001-12-12 14:41:53 +00:00
Ruslan Ermilov 9a05e59078 mdoc(7) police: fix markup. 2001-12-12 14:40:09 +00:00
Ruslan Ermilov 2554caf28c mdoc(7) police: Minor formatting nits and optimizations to rev. 1.34. 2001-12-12 14:36:28 +00:00
Ruslan Ermilov de400a7b97 mdoc(7) police: use no-break space. 2001-12-12 13:46:15 +00:00
Ruslan Ermilov f079ab33c6 mdoc(7) police: use no-break space, fix markup. 2001-12-12 13:45:35 +00:00
Ruslan Ermilov 5411c22ae5 mdoc(7) police: use non-break space, remove whitespace at EOL, fix markup. 2001-12-12 13:42:25 +00:00
Alfred Perlstein a9ee9c593d Fix a number of subtle and evil bugs in the libc_r wrapping of sendfile(2).
o) Since we unwrap the sendfile syscall, check the return value of
   writev(2) to see if it didn't complete all the data.
   Previously if only a partial writev() succeeded, it would proceed
   to sendfile(2) even though the headers weren't completely sent.

o) Properly adjust the "bytes to send" to take into account sendfile(2)'s
   behaviour of counting the headers against the bytes to be transfered
   from the file.

o) Correct the problem where EAGAIN was being returned from _sys_sendfile(2)
   however the wrapper didn't update the 'sent bytes' parameter to take into
   account for it.  This is because sendfile can return EAGAIN even though
   it has actually transfered data.

Special thanks to Justin Erenkrantz <jerenkrantz@apache.org> for bringing
this to my attention and giving an excellent way to reproduce the problem.

PR: kern/32684
MFC After: 1 week
2001-12-12 08:02:24 +00:00
Alexey Zelkin 52d6b43026 Add my e-mail to copyrights 2001-12-11 16:00:47 +00:00
Alexey Zelkin 74f2b97544 * Add my e-mail to copyrights
* style(9)'ify
2001-12-11 15:55:42 +00:00
Alexey Zelkin b21656a8f4 Fix grouping string handling 2001-12-11 15:26:36 +00:00
John Baldwin 7244e93850 We support writing to at least one filesystem now.
PR:		kern/32389
Submitted by:	Jonathan Mini <mini@haikugeek.com>
Sponsored by:	ClickArray, Inc.
2001-12-11 00:04:28 +00:00
John Baldwin 126a0854a7 Add support for overwriting the existing contents of a file to the UFS
driver in libstand.  This specifically does not expand or truncate files
since the filesystem may be dirty or inconsistent.

PR:		kern/32389
Submitted by:	Jonathan Mini <mini@haikugeek.com>
Sponsored by:	ClickArray, Inc.
2001-12-11 00:03:10 +00:00
David Malone 9f5b04e925 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
Matthew Dillon 173592263d Add auto-fill-on-delete. When deleting an 'A'uto created partition
sysinstall will automatically expand the previous partition to take up
the freed up space.  So you can 'D'elete /home and /usr will get the
combined space, or you can 'D'elete /tmp and /var will get the combined space.

This gives the user, developer, or lay person a huge amount of flexibility
in constructing partitions from an 'A'uto base.  It takes only 3 or 4
keystrokes to achieve virtually any combination of having or not having
a /tmp and/or /home after doing an 'A'uto create.

Change 'A'uto creation of /var/tmp to 'A'uto creation /tmp, which should
be less controversial.

MFC after:	6 days
2001-12-09 23:40:02 +00:00
Dag-Erling Smørgrav 18a85de04b Back out previous commit.
Requested by:	ru
2001-12-09 15:11:55 +00:00
Dag-Erling Smørgrav 3c4b4d83f7 Don't build with NDEBUG.
PR:		bin/32615
MFC after:	1 week
2001-12-09 15:06:38 +00:00
Dag-Erling Smørgrav 7f807cb867 Conditionalize some debugging code that didn't use the DEBUG macro.
MFC after:	1 week
2001-12-09 15:05:58 +00:00
Dag-Erling Smørgrav 7eb2f34d73 Introduce a fetchDebug global. Change the DEBUG macro so it only runs the
debugging code if fetchDebug is set.

PR:		bin/32615
MFC after:	1 week
2001-12-09 15:05:19 +00:00
Ruslan Ermilov edd2da71b2 Start using .St macro for POSIX.1-2001. 2001-12-08 19:06:23 +00:00
Ruslan Ermilov 945b9f4de9 mdoc(7) police: sort xrefs. 2001-12-08 16:28:20 +00:00
Maxim Sobolev e10f1484e4 Prevent infinite loop, when kevent(2) is called wihout eventlist (i.e.
eventlist == NULL or nevents == 0).
2001-12-08 00:53:37 +00:00
Alexey Zelkin a94da0a9f3 Get rid of unused anymore file! Alpha works fine with our strtod() now. 2001-12-07 17:19:09 +00:00
Andrey A. Chernov f34b139cda Return 'c' back to signed due to potential comparison problems
Use simpler test for valid ranges

Submitted by:	bde
2001-12-07 16:33:47 +00:00
Ruslan Ermilov 6cbb6156c3 Fix a typo.
Submitted by:	"Alexey V. Neyman" <alex.neyman@auriga.ru>
2001-12-07 14:58:41 +00:00
Alexey Zelkin 7ae5c6791e * localeconv() usage is not FLOATING_POINT specific anymore (due to "'" flag
addition) so move locale.h inclusion out of FLOATING_POINT ifdef's.
* add more comments
2001-12-07 12:38:47 +00:00
Dag-Erling Smørgrav bdd601a1e3 Get pam_mod_misc.h from .CURDIR rather than .OBJDIR or /usr/include.
Sponsored by:	DARPA, NAI Labs
2001-12-07 11:51:47 +00:00
Wes Peters 556f162ac0 Make strerror and strerror_r use sys_errlist[0] for errnum = 0. Be
more careful about reporting truncation with ERANGE in strerror_r.
Set errno to EINVAL for "unknown" errnum in strerror as required
by P1003.1-200x Draft June 14, 2001.

More carefully document the handling of strerrbuf when errors
(ERANGE, EINVAL) are encountered in strerror_r.

Reviewed by:	bde (ongoing discussion)
2001-12-07 06:28:58 +00:00
Bill Fenner 828829cda5 Remove blank line. 2001-12-07 03:25:26 +00:00
Dag-Erling Smørgrav 47c8f6faec Now that _pam_init_handlers() works as intended, it seems clear that we
do not actually want to define PAM_READ_BOTH_CONFS, so back out previous
commit.

Sponsored by:	DARPA, NAI Labs
2001-12-07 00:38:37 +00:00
Dag-Erling Smørgrav a45af0e2b0 We need pam_client.h from libpamc. This unbreaks world
Pointed out by:	jhay
Pointy hat to:	des
2001-12-06 12:35:18 +00:00
Wes Peters f61a2ede84 New, improved, more Posix-compliant strerror_r implementation,
complete with documentation.

Reviewed by:	mike@ gad@
MFC after:	1 week
2001-12-06 04:53:31 +00:00
Dag-Erling Smørgrav 87316434d1 Define PAM_READ_BOTH_CONFS. We can now have both /etc/pam.d and
/etc/pam.conf.

Sponsored by:	DARPA, NAI Labs
2001-12-05 17:06:16 +00:00
Andrey A. Chernov 8ede26d773 Clarify ' ' space issue 2001-12-05 16:33:11 +00:00
Dag-Erling Smørgrav bda74fe925 Install the correct version of pam_misc.h.
Sponsored by:	DARPA, NAI Labs
2001-12-05 16:27:41 +00:00
Dag-Erling Smørgrav 8d3978c115 Add dummy functions for all module types. These dummies return PAM_IGNORE
rather than PAM_SUCCESS, so you'll get a failure if you list dummies but
no real modules for a particular module chain.

Sponsored by:	DARPA, NAI Labs
2001-12-05 16:06:35 +00:00
Dag-Erling Smørgrav d5a8dd3fb5 Connect the man page to the build.
Sponsored by:	DARPA, NAI Labs
2001-12-05 16:02:50 +00:00
Dag-Erling Smørgrav e2c8459e85 Add a pam_self authentication module that succeeds if and only if the local
and remote user names are the same.

Sponsored by:	DARPA, NAI Labs
2001-12-05 15:55:14 +00:00
Ruslan Ermilov dd98d57b45 mdoc(7) police: markup the previous delta. 2001-12-04 16:09:27 +00:00
Dag-Erling Smørgrav 6478822fba Correct some egregious style bugs. 2001-12-04 12:32:35 +00:00
Dag-Erling Smørgrav a8adfe18ce Add a missing error check. This fixes a bug that would cause pwd_mkdb to
dump core if invoked with an input file that looks like a password file
but isn't (e.g. /etc/group).

PR:		32378
Submitted by:	Maxim Konovalov <maxim@macomnet.ru>
MFC after:	1 week
2001-12-04 12:31:02 +00:00
Dag-Erling Smørgrav 6598654546 Properly handle being redirected to an FTP URL.
Also fix a couple of not-so-minor bugs:
 - missing case for HTTP_SEE_OTHER
 - incorrect definition of HTTP_NEED_PROXY_AUTH

PR:		20259
MFC after:	2 weeks
2001-12-04 01:12:51 +00:00
Dag-Erling Smørgrav 89db7b8c6d Add prototype for _ftp_request(). 2001-12-04 01:10:34 +00:00
Dag-Erling Smørgrav 102a87c1e1 Reorganize to reduce code duplication. 2001-12-04 01:09:19 +00:00
Anton Berezin b9449db117 Fix typos getpeerid -> getpeereid.
PR:		docs/32442
Reviewed by:	dd
2001-12-02 23:50:40 +00:00
Mark Murray 1a8b24c257 Use __FBSDID(). Also do a bit of cosmetic #if and header-order
cleaning-up.
2001-12-02 20:54:57 +00:00
Peter Wemm 6464bbfa03 Use the merged strtod.c everywhere. This has been tested on alpha and
ia64.
2001-12-02 18:27:40 +00:00
Andrey A. Chernov e3a3c468a5 Remove specific reference to ASCII space (' '), it is true for localized
spaces too
2001-12-02 12:31:44 +00:00
Andrey A. Chernov 4bd71a3c89 Make it works for non ASCII compatible encodings too.
The only assumption left is that 'A'..'Z' 'a'..'z' both are contiguous
2001-12-02 09:15:54 +00:00
Mark Murray d2f6cd8fd5 Style fixups.
Sort function declarations, includes. Make consistent WRT use of _P()
macro (ugh!)

Inspired by:	bde
2001-12-01 21:12:04 +00:00
Mark Murray e317b97026 WARNS=2 fixes.
Reviewed by:	bde (a while back)
2001-12-01 17:46:46 +00:00
Joseph Koshy 4d44f0b5a3 Add support for sysconf(_SC_NPROCESSORS_CONF) and sysconf(_SC_NPROCESSORS_ONLN).
This API is supported in SVR4.0MP, Solaris, Linux, AIX and Tru64 Unix.

PR:		bin/27489
Submitted by:	Arun Sharma <arun@sharma-home.net>
Reviewed by:	bde (prior version)
2001-12-01 12:07:42 +00:00
Mike Barcroft de2656d0ed o Stop abusing MD headers with non-MD types.
o Hide nonstandard functions and types in <netinet/in.h> when
  _POSIX_SOURCE is defined.
o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>.
o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new
  __FBSDID() macro.
o Fix some miscellaneous issues in <arpa/inet.h>.
o Correct final argument for the inet_ntop() function (POSIX.1-200x).
o Get rid of the namespace pollution from <sys/types.h> in
  <arpa/inet.h>.

Reviewed by:		fenner
Partially submitted by:	bde
2001-12-01 03:43:01 +00:00
Mark Murray 33cc94ddaf Merge the (in)complete ANSIfication work from src/crypto/telnet. 2001-11-30 22:37:28 +00:00
Mark Murray 018925b883 Invoke the new 'unifdef:' target, and make this lib a complete subset
of the crypto (master) code.
2001-11-30 21:55:10 +00:00
Mark Murray b3c1c587b6 Diff-reduce WRT src/secure/*telnet*/Makefile.
Also, add an "unifdef:" target, so that the telnet sources can
be remade from the crypto sources in src/crypto/telnet.
2001-11-30 21:34:51 +00:00
Alexey Zelkin 4a57e677c7 Merge NetBSD's changes from netbsd_strtod.c in preparation of
removing it from our source tree in order to have one version
of strtod() for all arches. netbsd_strtod.c still left in source
tree until alpha folks make sure that our native strtod() works
as well as NetBSD's one.

Reviewed by: peter, bde (some time ago)
2001-11-30 12:48:30 +00:00
Alfred Perlstein 25993d3a47 Back out my 'fix', resid is different for strategy than for write 2001-11-30 06:24:34 +00:00
Bill Fenner 7735bb0f64 Implement several of the c99 updates to printf(3):
- New length modifiers: hh, j, t, z.
 - New flag: '.  Note that %'f is not yet implemented.
 - Use "inf"/"nan" for efg formats, "INF"/"NAN" for EFG formats.
 - Implemented %q in terms of %ll; if "quad_t" is not "long long"
   %q will break.

Still to do:
 - %C, %S, %lc, %ls (wide character support)
 - %'f (thousands in integer portion of %f)
 - %a/%A (exact hex representation of floating-point numbers)

Garrett Wollman wrote the first version of the vfprintf.c update;
Mike Barcroft wrote the first version of the printf.3 changes.
2001-11-30 06:12:15 +00:00
Alfred Perlstein 58cbb07307 Make the same fix for writes to RAW objects. 2001-11-30 05:59:47 +00:00
Alfred Perlstein fd19a949b4 write should return the number of bytes written, not 0 on success.
Submitted by: Jonathan Mini <mini@haikugeek.com>
PR: kern/32350
2001-11-30 05:54:30 +00:00
Andrey A. Chernov f2f94c9675 Clarify isblank range 2001-11-30 05:39:08 +00:00
Andrey A. Chernov a72d401cce Clarify valid isspace() range 2001-11-30 02:01:32 +00:00
Brian Feldman 7d8cee925b Fix pam_ssh by adding an IPv4or6 (evidently, this was broken by my last
OpenSSH import) declaration and strdup(3)ing a value which is later
free(3)d, rather than letting the system try to free it invalidly.
2001-11-29 21:16:11 +00:00