Commit Graph

5445 Commits

Author SHA1 Message Date
bde
165444d3d1 Removed .Nm's for the nonexistent functions exp2() and exp2f(). 2001-10-03 06:25:55 +00:00
bde
785e1fd6f3 Made this header self-sufficient.
Fully parenthesized a macro definition.
2001-10-03 05:25:07 +00:00
bde
530af36479 Fixed syntax errors in synopsis. The restrict keyword doesn't exist yet.
The corresponding bugs in <wchar.h> have no effect because the function
prototypes there don't have args so the __restrict "keyword" is
misinterpreted as an arg.
2001-10-03 05:19:47 +00:00
bde
3c074cac44 Fixed wrong arg type in synopsis. 2001-10-03 03:57:42 +00:00
bde
21ecd9170b Fixed bitrot in synopsis. The change of the return type of
Set_Boot_Blocks() from void to int had not reached here.  Callers
still don't check the new return value.
2001-10-03 03:49:48 +00:00
bde
cb1c1e4e9a Fixed misspelled arg type in synopsis. 2001-10-03 01:45:37 +00:00
bde
33b5f090cb Fixed missing include in synopsis. 2001-10-03 00:51:30 +00:00
ume
b0514e8539 - cope with sa_len < sizeof(struct sockaddr).
From: Patrik Lindergren <patrik@datacom.nu>
- delint (pointer cast issue).  from netbsd-current

Obtained from:	KAME
MFC after:	1 week
2001-10-02 13:51:29 +00:00
obrien
abaceb5ee3 Clean this up after the NetBSD syncing. 2001-10-01 23:10:48 +00:00
obrien
9478329f86 Fix ID's after a total boch CVS merge due to multiple people making
commits to these files.
As I sing to CVS:
	Have I told you lately that I hate your guts?  Have I told you
	all SCM's are above you?  You fill my heart with pain, take away
	all my merging joy, grow my troubles that's what you do."
2001-10-01 23:00:29 +00:00
obrien
6ff59f531c Our histedit.h lives in src/include. 2001-10-01 21:08:03 +00:00
ru
727c2b4b9e mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
ru
77d8d49afd Re-applied some of rev. 1.11 and 1.13 fixes that were lost in the last commit.
Fixed some more.
2001-10-01 15:53:07 +00:00
ru
9e260fdb3e mdoc(7) police: don't split author names in the AUTHORS section. 2001-10-01 13:50:03 +00:00
ru
53175e50f7 mdoc(7) police: markup nits. 2001-10-01 12:52:24 +00:00
ru
d15a85ee23 mdoc(7) police: s/atof/atoi/ 2001-10-01 12:44:24 +00:00
obrien
03d1a1b388 Add the 4.4-FreeBSD libperl.so.3 as the version in -CURRENT is .so.4. 2001-10-01 11:25:34 +00:00
obrien
8e328c32b7 Add the 4.4-FreeBSD libedit.so after the sh version bump in -CURRENT due
to the API changes from merging with the NetBSD libedit.
2001-10-01 09:26:23 +00:00
obrien
68b6f3dd6e What was I thinking???
<JEDI MIND TRICK>
	That was not the commit you wanted to get.
</JEDI MIND TRICK>
2001-10-01 09:25:49 +00:00
obrien
fcf29b52c0 What was I thinking....
<JEDI MIND TRICK>
	This is not the commit you wanted to get.
</JEDI MIND TRICK>
2001-10-01 09:22:04 +00:00
obrien
4a85a3467a Add the 4.4-FreeBSD libwrap after the sh version bump in -CURRENT due to
the API changes from merging with the NetBSD libwrap.
2001-10-01 09:17:23 +00:00
obrien
9d46f4f43a + Sync with NetBSD, bringing in feature enhancements.
+ Convert to ANSI-C function definitions
+ style(9)

Submitted by:	kris
2001-10-01 08:41:27 +00:00
dillon
48b7a24ebd Add huff __FBSDID()s puff to whew! libz 2001-09-30 22:39:00 +00:00
dillon
2f71d00c9b Add __FBSDID()s to liby 2001-09-30 22:36:18 +00:00
dillon
0e88e1c7c7 Add __FBSDID()s to libutil 2001-09-30 22:35:07 +00:00
dillon
2d72bd41cf Add __FBSDID()s to libusb 2001-09-30 22:30:55 +00:00
dillon
20f3660ca4 Add __FBSDID()s to libtelnet 2001-09-30 22:30:15 +00:00
dillon
bdb749a9f5 Add __FBSDID()s to libtacplus 2001-09-30 22:29:19 +00:00
dillon
db188ab31c Add __FBSDID()s to libstand 2001-09-30 22:28:01 +00:00
dillon
0c90d0d4c3 Add __FBSDID()s to librpcsvc 2001-09-30 22:15:15 +00:00
dillon
ed4315156b Add __FBSDID()s to libradius 2001-09-30 22:12:36 +00:00
dillon
a3cbbd5881 Add __FBSDID()s to libpam 2001-09-30 22:11:06 +00:00
dillon
624ee2f8ee Add __FBSDID()s to libopie 2001-09-30 22:04:49 +00:00
dillon
330ebb3184 Add __FBSDID()s to libnetgraph 2001-09-30 22:03:54 +00:00
dillon
1c4a4250e6 Add __FBSDID()s to libncurses 2001-09-30 22:02:43 +00:00
dillon
bb1769d86f Add __FBSDID()s to libncp 2001-09-30 22:01:19 +00:00
dillon
304955a186 Add __FBSDID()s to libmp 2001-09-30 21:58:17 +00:00
dillon
bc1ffc42bd add __FBSDID()s to libmd 2001-09-30 21:56:22 +00:00
dillon
66cde86f8d Add __FBSDID()s to libm 2001-09-30 21:53:45 +00:00
dillon
5adfa0ce0f Add __FBSDID()s to libipx 2001-09-30 21:45:06 +00:00
dillon
bd7955155d Add __FBSDID()s to libipsec 2001-09-30 21:43:45 +00:00
dillon
3a3db64dee Add __FBSDID()s to libio 2001-09-30 21:41:46 +00:00
dillon
5b1baf8bcf Add missing '*/' (? why wasn't this caught earlier?) 2001-09-30 21:39:44 +00:00
dillon
bb37da0bd1 Add __FBSDID()s to internal libgnumalloc() 2001-09-30 21:38:17 +00:00
dillon
4f5104ebf0 Add __FBSDID()s to libftpio 2001-09-30 21:36:38 +00:00
dillon
73e37106ba Add __FBSDID()s to libfetch 2001-09-30 21:36:09 +00:00
dillon
8fdbf9fd2f Add __FBSDID()s to libedit 2001-09-30 21:21:36 +00:00
dillon
b7a4fd6221 Add __FBSDID()s to libdisk 2001-09-30 21:16:57 +00:00
dillon
42c54ed53c Add __FBSDID()s to libcam 2001-09-30 21:13:43 +00:00
dillon
803b6750da Add __FBSDID's to libcalendar 2001-09-30 21:09:57 +00:00
dillon
2153b168ec __FBSDID() Cleanup 2001-09-30 21:06:00 +00:00
dillon
9d4bab5ebe Add __FBSDID's to libalias 2001-09-30 21:03:33 +00:00
peter
4ea382aca1 Update COMPAT3X libc from RELENG_3. This solves the problem of running
3.x binaries with a mixture of 3.x and 5.x libraries (eg: Metro-X server).
2001-09-28 22:30:07 +00:00
asmodai
715aa84d63 Add ERRORS section.
Mention thread safety and async-cancel safety status [not].
Add standards compliancy references.
Note strtol() is preferred over atoi().

MFC after:	2 weeks
2001-09-26 20:22:44 +00:00
asmodai
7254a98259 Be explicit about the POSIX version it conforms to [in this case 1990].
Put the error comment under the more appropriate ERRORS section.
2001-09-26 20:10:10 +00:00
asmodai
1057e03061 Change standards compliancy order so that C and POSIX are grouped. 2001-09-26 19:42:39 +00:00
ache
b6d95abd08 1) Back out ~/.login_conf disable
2) Pick only "me" class from ~/.login_conf as documented
2001-09-25 11:07:26 +00:00
murray
7d54bf6748 - Correct capitalization of a function name.
- Add a missing word to form a complete sentence.

PR:		docs/30626
Submitted by:	Dan Lukes <dan@obluda.cz>, and
		swear@blarg.net (Gary W. Swearingen)
2001-09-24 02:51:43 +00:00
ken
9f9207e121 Turn on WARNS?= 2 for libdevstat.
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-09-23 23:03:23 +00:00
mike
2124c5cf78 Note that strdup(3) will set errno if memory allocation fails. This
is also required by the forthcoming POSIX.1-200x standard.

Obtained from:	malloc.3
2001-09-23 00:37:42 +00:00
dfr
b069d672e1 Fix a whole bunch of dependancy bugs and make it actually work when the
size is not a multiple of eight.
2001-09-22 18:27:01 +00:00
dfr
18649df8d0 Fix byte swapping - it was totally broken. 2001-09-22 18:22:53 +00:00
ru
8d57751206 Reset ``schg'' flag before removing stale libs. 2001-09-22 08:11:24 +00:00
rwatson
43ed18321b o Modify access(2) man page to describe eaccess(2), and add a symlink
so man eaccess will return the access(2) man page.

Obtained from:	TrustedBSD Project
2001-09-21 21:35:22 +00:00
ru
2981473d12 Fixed the bug that prevented communication with FTP servers behind
NAT in extended passive mode if the server's public IP address was
different from the main NAT address.  This caused a wrong aliasing
link to be created that did not route the incoming packets back to
the original IP address of the server.

	natd -v -n pub0 -redirect_address localFTP publicFTP

Note that even if localFTP == publicFTP, one still needs to supply
the -redirect_address directive.  It is needed as a helper because
extended passive mode's 229 reply does not contain the IP address.

MFC after:	1 week
2001-09-21 14:38:36 +00:00
ru
b6506667e7 Replace our stale-lib cleanup with a better one. (less bloated) 2001-09-21 11:32:51 +00:00
peter
678352084e Replace my stale-lib cleanup with a better one. (less noisy)
Submitted by: ru
2001-09-21 09:22:34 +00:00
peter
626f9d31af Put on my peril-sensitive sunglasses. Remove any old libraries that
we have just installed a replacement for.  This should solve the problem
of having a stale /usr/lib/libc.so.4 after we put a fresh
/usr/lib/compat/libc.so.4 in its place.
2001-09-21 09:10:09 +00:00
ru
771cf8368a Document the FTS_ROOTPARENTLEVEL and FTS_ROOTLEVEL constants. 2001-09-20 12:32:45 +00:00
obrien
141c92968c Shared libraries from 4.4-FreeBSD needed for proper binary compatibility. 2001-09-20 06:22:09 +00:00
sobomax
ca39cb6da3 Add support for loading bzip2-compressed filesystems. Among other things
this would allow to load bzip2-compressed kernels/modules from the loader(8)
(support for that will be committer separately).

MFC after:	1 month
2001-09-18 13:01:12 +00:00
ache
0ee8f35866 First appeared in 5.0, not in 4.4 2001-09-17 08:18:45 +00:00
mike
343aaecd7d style(9)
Silence from:	phantom
2001-09-17 00:23:19 +00:00
dillon
d375fe96be Implement __FBSDID() 2001-09-16 21:35:07 +00:00
rwatson
9863b0aeba Disable per-user .login_conf support due to incorrect merging of local
and globaly settings.  An alternative implementation will be developed.

Reported by:	Przemyslaw Frasunek <venglin@freebsd.lublin.pl>
2001-09-16 16:48:40 +00:00
dillon
8bf69256af Revamp FBSDID's for libatm. Restore original import rcsid as per bde
Reviewed by:	various people
2001-09-15 19:36:55 +00:00
rwatson
91edadf993 o Add a comment noting that the early setting of privileges for the purpose
of NFS home directory and root directory processing fails to include
  additional groups.  This doesn't impact the final credential, but does
  mean that users may be denied login even when additional groups might
  allow it.
2001-09-15 16:12:56 +00:00
dillon
7363b328ce Convert a library to use the new __FBSDID()'s for testing and review
purposes.
2001-09-15 03:42:10 +00:00
ru
030e2044c8 Unbreak build-tools -- build and use up-to-date ${HEADERS}.
These might not be present in /usr/include, or they may be
incompatible with the version we are building (for library
upgrades/downgrades).

This stopped the RELENG_4 buildworld on a -CURRENT box.
Well, this only fixes the issue if MFC'ed.  :-)
2001-09-14 15:27:51 +00:00
guido
b0b6927668 Typo: s/conatains/contains/
MFC after:	1 week
2001-09-12 17:57:31 +00:00
julian
aff3918a2c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
ru
48443e707b mdoc(7) police: changed pure POSIX text; added missing markup bits. 2001-09-11 09:39:23 +00:00
ru
db3dcabb89 mdoc(7) police: removed commas from the standard (split) AUTHORS block. 2001-09-11 09:26:38 +00:00
asmodai
fb1ad2a222 Add more standards which we conform to.
Note our implementation is not thread nor async-cancel safe.
Explicitely note atof() does not check nor report errors.
Note that strtod() should be used instead.
2001-09-09 21:09:53 +00:00
asmodai
cb6fa75c43 Detail thread-safe and async-cancel-safe status.
Also add C99 conformity status plus clarification that C99 leaves the
flushing of unwritten data, closure of open streams, and removal of
temporary files to the implementation.
2001-09-09 18:52:00 +00:00
ache
5642ea6546 1) If __SAPP stream is not seekable, remove __SAPP flag on first call instead
of repeating unsuccessful lseek call on each write (original stdio bug).

2) Save errno accross _sseek call in _swrite to not touch it in case write
success (original stdio bug).

3) Add _sseek error checking back, but only for __SOPT mode now.
2001-09-07 17:16:02 +00:00
asmodai
f0fdba1cc7 Move to using .In instead of .Fd #include <> for include mark-up.
Inspired by comment from:	dd
2001-09-07 14:46:36 +00:00
phantom
8fd828771b reconnect strfmon.c to build list 2001-09-07 13:03:16 +00:00
asmodai
c6e3253504 Fix some mdoc nits caused by my knowledge not being too up-to-date on
mdocNG.

Submitted by:	dd
2001-09-07 12:38:10 +00:00
dfr
c5cd6f57fa Port to ia64, taking into account the fact that pagesizes may be variable. 2001-09-07 12:32:43 +00:00
asmodai
7c671a32ab Add strfmon.3 to the fray.
This is a first cut, but enough to help people interested in using it
further than before.
More text coming to illustrate use and provide more details.

Based on standards' text.
2001-09-07 09:55:28 +00:00
ache
9f0b8ed26e For now just back out seek error checking in __SAPP case, it cause problems
with non-seekable streams.  Now here is what here was originally, but it is
ugly, producing unneded seek syscall on each non-seekable stream write.  I'll
think about proper solution later.
2001-09-07 02:13:11 +00:00
yar
4e29608365 Fix all the ambiguous or erroneous statements of the brk(2)
manpage by taking its text from NetBSD and editing it further.
This also improves the page's mdoc(7) markup style.

Reviewed by:	ru
Obtained from:	NetBSD
2001-09-06 12:11:22 +00:00
phantom
9784bbd50b correctly wrap macros with { } 2001-09-06 09:26:28 +00:00
kris
524d719550 Add zopen(), a stdio wrapper for gzipped data streams.
Obtained from:	NetBSD
2001-09-06 09:14:49 +00:00
obrien
484d437d06 strfmon(3) is not ready to go live. 2001-09-06 08:58:42 +00:00
phantom
0b2a8aa112 Add strfmon(3) implementation. It still contains few XXX's because I lost
my last version of this work due to HDD crash, but this version cleanly
passed all POSIX and SuSv2 tests. I am working on testing scripts which
should test this implementation against all locales and surely more fixes
will come soon.

Reviewed by:	ache, silence at -audit & -developers
2001-09-05 18:50:02 +00:00
ru
1ecc101a06 mdoc(7) police: markup and minor content fixes.
o Removed whitespace at EOL
o Removed hard sentence breaks
o Added cap_size() to the NAME section
o Normalized .Nd descriptions
o Fixed the abuses of .Nm and .Va
o Fixed some DESCRIPTION texts
o Fixed the RETURN VALUES and ERRORS texts to look more traditional

Reviewed by:	tmm
2001-09-05 14:09:08 +00:00
des
0db879e589 Use fseeko() instead of fseek() (u->offset is already an off_t), and mark
some function arguments as unused.
2001-09-05 12:22:28 +00:00
rwatson
6a02e9ab06 Add Thomas Moestl and Chris Faulhaber to the author list for POSIX.1e
support.

Obtained from:	TrustedBSD Project
2001-09-05 03:36:00 +00:00
ache
36a7b5dd63 Portability fix: use unsigned cast to guaranteed positive part of expression
in case {L}LONG_MAX > abs({L}LONG_MIN).  Non-functional change - we don't
have any such platforms.
2001-09-04 21:28:01 +00:00
ache
ed895616ff Remove rcsids and unneded include 2001-09-04 17:41:20 +00:00
ache
5d51401b40 'acc' is not initialized in one hypotetical case, fix it 2001-09-04 17:12:15 +00:00
markm
90cd94fb46 1) repair the return value in the PAM_RETURN() macro (Side effects!!).
2) canonicalise the options use in pam_options().

Submitted by:	Gunnar Kreitz <gunnark@chello.se>
PR:		30250
2001-09-04 17:05:08 +00:00
ache
05ced81948 Locale *is* used in strto*l*(), at least for isspace(), so remove
'locale not used' statement from comments and BUGS section of manpage.

strtol(): fix non-portable 'cutoff' calculation using the same method as
in strtoll().

Cleanup 'cutoff' calculation, remove unneded casts. Misc. cleanup to
make all functions looks the same.

Implement EINVAL reaction per POSIX, document it in manpage, corresponding
POSIX example quotes here:

------------------------------------------------
If the subject sequence is empty or does not have the expected form, no
conversion is performed; the value of str is stored in the object pointed
to by endptr, provided that endptr is not a null pointer.

If no conversion could be performed, 0 shall be returned and errno may be
set to [EINVAL].

[EINVAL] The value of base is not supported.

Since 0, {LONG_MIN} or {LLONG_MIN}, and {LONG_MAX} or {LLONG_MAX} are
returned on error and are also valid returns on success, an application
wishing to check for error situations should set errno to 0, then call
strtol( ) or strtoll ( ), then check errno.
-----------------------------------------------------
2001-09-04 16:39:11 +00:00
dfr
60b84b2ad7 Implement _setjmp()/_longjmp().
Obtained from: Intel's EFI toolkit
2001-09-04 08:27:39 +00:00
dd
c04bc9020f This does not describe sched_{get,set}scheduler.
PR:		26001
Submitted by:	OHSAWA Chitoshi <ohsawa@catv1.ccn-net.ne.jp>
2001-09-03 17:55:08 +00:00
dd
441b4d8fc9 Don't capitalize jail(2) in the middle of a sentence.
PR:		25876
Submitted by:	Koizumi Satoru <koizumi@cms.phys.s.u-tokyo.ac.jp>
2001-09-03 17:49:29 +00:00
dfr
f8fc031664 Remove bogus implementation of _setjmp/_longjmp 2001-09-03 14:19:02 +00:00
murray
f0c4c8f6c8 PT_STEP in ptrace(2) man page is described as 'addr and data fields
are not used'.  This is incorrect, as addr must be passed (caddr_t)1
to do anything useful.  The source for gdb and a short test program
will confirm that this man page was in error.

PR:		docs/27758
Submitted by:	Jiangyi Liu <jyliu@163.net>
2001-09-03 09:42:40 +00:00
kris
c2afb2f049 Check for malloc failure in a couple of cases
MFC after:	2 weeks
2001-09-03 05:57:06 +00:00
ache
cafec4e6e9 When __SOPT is cleared, clear __SOFF too.
NOTE: original stdio bug.
2001-09-03 02:35:10 +00:00
ache
eb856b3441 Re-arrange my funopen(3) fix to minimize differences with original stdio code,
no functional changes.

Add fp->_offset optimization in _SAPP+_SOPT case
2001-09-03 02:24:37 +00:00
rwatson
28f9a3deab o Sync up prototypes for cap_size() and cap_copy_ext() with
sys/capability.h--this compiled fine on i386 where (int) and (ssize_t)
  are the same, but broke on Alpha where they differ.

Submitted by:		Mike Barcroft <mike@FreeBSD.org>
Obtained from:	TrustedBSD Project
2001-09-02 23:13:49 +00:00
ache
a20179f385 Internal seeks are overoptimized. They should remember fp->_offset only for
plain regular files, i.e. files with __SOPT flag set. Fix it, so ftell(stdout)
always returns the same as lseek(1, 0, 1) now.

NOTE: this bug was in original stdio code
2001-09-02 21:22:00 +00:00
ache
7016e01313 Fix bug in off_t overflow checking: if fp->_offset overflows, just remove
__SOFF flag (i.e. we don't have offset) instead of returning EOVERFLOW.
It allows again continious reading from non-stop stream.
2001-09-02 19:52:09 +00:00
ache
92941cea51 Remove MLINKS seek.2 to lseek.2, we don't have seek.2 syscall 2001-09-02 19:28:41 +00:00
ache
5e04bb177f Typo seek(2) -> lseek(2) 2001-09-02 19:24:07 +00:00
ache
9e2731545a Move all stdio internal flags processing and setting out of __sread(),
__swrite() and __sseek() to higher level. According to funopen(3) they all
are just wrappers to something like standard read(2), write(2) and
lseek(2), i.e. must not touch stdio internals because they are replaceable
with any other functions knows nothing about stdio internals. See example
of funopen(3) usage in sendmail sources f.e.

NOTE: this is original stdio bug, not result of my range checkin added.
2001-09-02 19:10:10 +00:00
chris
3ac75f8536 Another punctuation fix (missing comma ending preposition). 2001-09-01 21:32:52 +00:00
chris
98b1387ed7 o Mention the fact that specifying a fileid of 0 searches all loaded
modules.
o Properly terminate a preposition.
2001-09-01 21:31:33 +00:00
ache
1884501edb Save errno before function call and restore it on success (because many
internal functions there may fail and set (i.e. overwrite) errno in normal
(not error) situation). In original variant errno testing after call
(as POSIX suggest) is wrong when errno overwrite happens.
2001-09-01 15:28:24 +00:00
ache
995dba2741 Remove even more unneded checks, original code can't overflows in that place 2001-09-01 15:01:37 +00:00
ache
ca9e5330a4 Remove two checks unneeded now (can't happens) 2001-09-01 14:48:45 +00:00
ache
8f0ae93dff Make fseek(... SEEK_CUR) fails if current file-position is unspecified. 2001-09-01 14:40:01 +00:00
ache
6c12b81f9e Note that prev. commit addition is for ftell/ftello 2001-09-01 14:23:30 +00:00
ache
881c3de923 Describe ESPIPE as result of unspecified file-position indicator value.
Add more to SEE ALSO section.
2001-09-01 14:11:53 +00:00
ache
ce1052ddf1 Describe file-position behaviour from POSIX 2001-09-01 14:01:52 +00:00
ache
95153484d6 Strict in the POSIX sence, if file position is unspecified after ungetc() at
0, return that we can't specify it, i.e. error with ESPIPE.
(hint from: "Peter S. Housel" <housel@acm.org>)

Back out sinit() addition, not needed after various code simplifications.
2001-09-01 12:13:33 +00:00
ache
7969ae86e7 If lseek to wrong value sucessfully happens despite all pre-checks, set __SERR
to indicate that stream becomes inconsistent.
2001-09-01 11:21:28 +00:00
ache
d2dd124ce9 If position is underflowed, don't try to hide that fact by recovery, just
return EIO and set __SERR to mark stream as inconsistent.
2001-09-01 11:18:53 +00:00
ache
8600372379 Back out disabling ungetc() at 0, use different solution:
keep negative offset internally, but return 0 externally in ftell*()
I.e. use 0 now as 'unspecified value' per POSIX ungetc() description.
2001-09-01 01:56:54 +00:00
rwatson
623bb334e1 o Attach cap_cmp.c and cap_copy.c to the build.
o Attach cap_copy_ext.3 and cap_copy_int.3 to the install, and link
  cap_size.3 to cap_copy_ext.3.

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-09-01 00:00:50 +00:00
ache
4dd49b9b5f Describe EOVERFLOW I implement per POSIX.
Sort ERRORS section
2001-08-31 23:06:28 +00:00
ache
80e4821772 Add originally missing __sinit() call. 2001-08-31 20:36:19 +00:00
ache
35e82e09ce Simplify offset underflow checks even more 2001-08-31 20:17:32 +00:00
ache
e597389e9e Describe that we disallow ungetc at offset 0 now. 2001-08-31 20:03:49 +00:00
ache
dd1a040c2e Disallow ungetc at offset 0 (to prevent negative offset happens), so simplify
checks in ftell.
2001-08-31 19:50:25 +00:00
ache
77380a7fba Drop buffer first, _then_ ask for real position 2001-08-31 18:54:44 +00:00
ache
610e2d4159 The same big piece of ftell code repeated in 3 places. Simplify things moving
it into one subfunction instead.
Try to use real offset in strange cases.
2001-08-31 18:23:29 +00:00
ache
579639b198 If file offset is smaller than internal buffer character left count, just drop
internal buffer and trust offset, not return error.
2001-08-31 14:11:14 +00:00
ache
a0ba17755e Initialize _offset to 0 in fopen(), it helps to optimize fseek/ftell 2001-08-31 13:14:49 +00:00
ache
6633ea2c9b Detect fp->_offset overflow on read
Use errno to catch negative seek with -1 offset
2001-08-31 12:55:22 +00:00
ru
110427f9fb Add manpage for inet_net_ntop(3) and inet_net_pton(3).
Obtained from:	NetBSD
2001-08-31 10:54:44 +00:00
ru
62a7940402 Use ``.Rv -std'' wherever possible.
Submitted by:	yar
2001-08-31 09:57:38 +00:00
rwatson
0c60d06e85 o Use .Fx to refer to FreeBSD
Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:12:54 +00:00
rwatson
3e80e7cd1c o Remove definition of CAP_MAX_BUF_LEN since it is defined in
sys/capability.h now.

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:11:59 +00:00
rwatson
3760deb245 Introduce implementations of POSIX.1e non-portable form capability
support functions:
     cap_subset_np()    - Is cap1 a subset of cap2
     cap_equal_np()     - Is cap1 equal to cap2

o Introduce implementations of POSIX.1e capability support functions:
     cap_copy_ext()     - Externalize capability
     cap_copy_int()     - Internalize capability
     cap_size()         - Determine size required for cap_copy_ext()

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:07:48 +00:00
alex
c6c34215f7 Add Xref to make.conf(5). 2001-08-30 21:44:46 +00:00
ache
54afb32fa2 Try to discard some ungetc data in saved internal buffer checks too,
if offset tends to be negative.
2001-08-30 20:49:47 +00:00
ache
8218f60acd goto dumb; if can't obtain curoff for whence != SEEK_CUR cases, as supposed 2001-08-30 20:19:45 +00:00
ache
ddf6597fbd Add more EOVERFLOW checks.
When file offset tends to be negative due to internal and ungetc buffers
additions counted, try to discard some ungetc data first, then return EBADF.
Later one can happens if lseek(fileno(fd),...) called f.e. POSIX says that
ungetc beyond beginning of the file results are undefined, so we can just
discard some of ungetc data in that case.

Don't rely on gcc cast when checking for overflow, use OFF_MAX.

Cosmetique.
2001-08-30 19:54:04 +00:00
mike
4e3e5279d1 o Remove some GCCisms in src/powerpc/include/endian.h.
o Unify <machine/endian.h>'s across all architectures.
o Make bswapXX() functions use a different spelling of u_int16_t and
  friends to reduce namespace pollution.  The bswapXX() functions
  don't actually exist, but we'll probably import these at some
  point.  Atleast one driver (if_de) depends on bswapXX() for big
  endian cases.
o Deprecate byteorder(3) prototypes from <sys/types.h>, these are
  now prototyped indirectly in <arpa/inet.h>.
o Deprecate in_addr_t and in_port_t typedefs in <sys/types.h>, these
  are now typedef'd in <arpa/inet.h>.
o Change byteorder(3) prototypes to use standards compliant uint32_t
  (spelled __uint32_t to reduce namespace pollution).
o Document new preferred headers and standards compliance.

Discussed with:	bde
PR:		29946
Reviewed by:	bmilekic
2001-08-30 00:04:19 +00:00
jdp
e2bfcb1a16 Fix a bug in lseek which caused the loader to fail on some gzipped
kernels.  The error message was "elf_loadexec: cannot seek".

Libstand maintains a read-ahead buffer for each open file, so that
it can read in chunks of 512 bytes for greater efficiency.  When
the loader tries to lseek forward in a file by a small amount, it
sometimes happens that the target file offset is already in the
read-ahead buffer.  But the lseek code simply discarded the contents
of that buffer and performed a seek directly on the underlying
file.  This resulted in an attempt to seek backwards in the file,
since some of the data has already been read into the read-ahead
buffer.  Gzipped data streams cannot seek backwards, so an error
was returned.

This commit adds code which checks to see if the desired file offset
is already in the read-ahead buffer.  If it is, the code simply
adjusts the buffer pointer and length, thereby avoiding a reverse
seek on the gzipped data stream.

I incorporated a suggestion from Matt Dillon which saved a little
bit of code in this fix.

Reviewed by:	dillon, gallatin, jhb
2001-08-29 23:33:22 +00:00
rwatson
7e1901895b o src/sys/capability.h provides a number of support macros that are not
documented by POSIX.1e, and understand the opaque capability structures.
  Introduce support in the userland POSIX.1e library for a
  _CAPABILITY_NEEDMACROS define to remove these macros from the normal
  namespace, but allow the libc functions to use them.

Submitted by:	tmm
Obtained from:	TrustedBSD Project
2001-08-29 17:53:45 +00:00
bde
50df980de4 Fixed namespace pollution related to `warn' in libc (but not in other
libraries or for other members of the err() family).

This fixes world breakage in bc and rcs/* for NOSHARED worlds.
2001-08-29 13:52:27 +00:00
dd
2d70fb6108 There shuldn't be whitespace before a question mark. 2001-08-27 09:34:39 +00:00
ru
774fe2fdce mdoc(7) police: removed whitespace at EOL. 2001-08-27 08:37:35 +00:00
ru
47fa71655e mdoc(7) police: markup and spelling fixes. 2001-08-27 08:26:57 +00:00
ru
524f4d9e13 mdoc(7) police: removed whitespace at EOL, sorted SEE ALSO xrefs. 2001-08-27 08:12:37 +00:00
ru
07d71fd775 mdoc(7) police: markup nits. 2001-08-27 08:01:01 +00:00
sobomax
9d85358bad Remove grammatical bogon. 2001-08-27 08:00:15 +00:00
markm
2bc4538f02 Introduce a "noroot_ok" option to make this module ignore authentications
to a non-superuser if required.
2001-08-26 18:09:00 +00:00
markm
ca27273b17 Introduce better logging, error reporting and use of login_cap data. 2001-08-26 18:05:35 +00:00
markm
9259e6a60d Add extra logging detail. This needs a more general solution. 2001-08-26 17:57:44 +00:00
markm
1821568d5e Adjust dependancies and build order. PAM needs RPC. 2001-08-26 17:49:51 +00:00
markm
bed2067305 Big module makeover; improve logging, standardise variable names,
introduce ability to change passwords for both "usual" Unix methods
and NIS.
2001-08-26 17:41:13 +00:00
ache
16016c9943 Cosmetique fixes from bde 2001-08-26 10:38:29 +00:00
rwatson
d60872ff4a o s/violate/override/ Capabilities are part of the system policy, not
an exception to it.

Submitted by:	tmm
Obtained from:	TrustedBSD Project
2001-08-25 14:37:01 +00:00
brian
30669fc42f Rename the DIAGNOSTICS section to RETURN VALUES and describe the
return values a little more.  Specifically, mention that a return
of 0 from NgRecvData() and NgRecvMsg() means the socket has been
closed.

Suggested by: jkh
2001-08-24 21:39:27 +00:00
dillon
d8f47c3dcc Ok, third time is the charm. VM_INHERIT_XXX -> INHERIT_XX (use the same
semantics as PROT_XXX vs VM_PROT_XXX separating user-space defines from
kernel defines).
2001-08-24 19:45:59 +00:00
dillon
a689358625 Oops, minherit() uses VM_INHERIT_XXX as the argument, not MAP_XXX. Properly
document minherit().
2001-08-24 19:43:45 +00:00
dillon
e74674220c Update the mmap.2 and minherit.2 manual pages. Add a short explanation and
referal from mmap to minherit for MAP_INHERIT.  Fully document the
minherit.2 manual page (because frankly, my dear, however you think it
currently works is almost certainly wrong!).  I may soon re-implement
MAP_COPY because I believe we can support it properly now, but I will have
to call it something else and that is for a later time.
2001-08-24 19:28:00 +00:00
brian
555f723063 Explain what the return value from NgRecvMsg() and NgRecvData() means,
specifically that 0 means the socket has been closed.
2001-08-24 14:52:05 +00:00
ache
e19bfc33ec Fd is macro too, so use \&Fd 2001-08-24 11:12:58 +00:00
ache
48f4de4b24 Fildes -> Fd too (started from big letter) 2001-08-24 11:05:11 +00:00
ache
a8dcabefec Change
start means ...
to
.Fa l_start
means ...
2001-08-24 10:59:32 +00:00
sheldonh
0d4a8deadc Fix up English from previous 3 revisions.
There is no such argument 'fildes' in the SYNOPSIS.  It's called 'fd'.
2001-08-24 10:36:29 +00:00
peter
5c9278dd27 Make ps -M corefile work again. This has been broken for quite some time.
kvm_proclist() was aborting when it saw the ithreads with no pgrp.
2001-08-24 09:43:44 +00:00
peter
48a05c39e4 Dynamically adjust to the value of KERNBASE in a crashdump, with
a fallback for old kernels without the "kernbase" symbol.
2001-08-24 08:53:30 +00:00
ken
f3757912bf Remove a duplicate "that".
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-08-24 02:24:58 +00:00
dd
499a5e0623 begin executed --> being executed
Obtained from:	NetBSD
2001-08-24 00:18:37 +00:00
dg
3f316f2813 Killed reference to MAP_INHERIT which is not supported in FreeBSD. 2001-08-23 22:39:52 +00:00
ache
6bf9344aea Now we implement l_len<0 per POSIX, describe it. 2001-08-23 19:00:34 +00:00
gallatin
284bfcfa90 Bail if we go beyond the directory size, not just if we hit it.
Certain ISO fs's (like the one for 4.4-RC1 disc1 on alpha)
trigger this, and we end up opening a null file name.  This causes us to get
a false match for "kernel.ko" when it does not exist.
2001-08-23 17:08:26 +00:00
ache
34fdd670e3 Cosmetique: correct English in comments 2001-08-23 14:49:02 +00:00
ache
dfbde1a364 Rephrasing prev. commit a bit. 2001-08-23 09:55:10 +00:00
ache
6ecf913158 Describe EOVERFLOW, EOPNOTSUPP and reaction to negative l_len 2001-08-23 09:42:30 +00:00
ru
f5c34b17b4 mdoc(7) police: Fixed broken xrefs. 2001-08-22 14:16:31 +00:00
ache
f60d2f7ff6 Document new EINVAL, EOVERFLOW cases. Sort ERRORS 2001-08-21 21:44:48 +00:00
dd
a88fc7be96 Don't claim to be mp(3). 2001-08-21 20:05:39 +00:00
dd
9d4ed109cd Use .In, .Ux, and .Rv where appropriate. Also consistently call this
a "function" instead of a "routine".

Submitted by:	ru
2001-08-21 19:32:47 +00:00
dd
ed0220ed4a Expand the ?: construct into an if/else.
Submitted by:	nectar
2001-08-21 19:27:07 +00:00
dd
5976d34281 The setprogname() function sets the name of the program to be the last
component of the progname argument.
2001-08-21 18:49:58 +00:00
dd
e3c9222f4b Fix style bug. 2001-08-21 18:46:33 +00:00
ru
561f062ba6 Fixed warnings. 2001-08-21 17:28:39 +00:00
nectar
1476d8bd38 Pass the pointy hat, please.
Submitted by:	ru
2001-08-21 17:16:32 +00:00
nectar
80287b2545 setprogname() should set __progname to the last component of the given
path.
2001-08-21 16:55:34 +00:00
dfr
1a1e0c68e0 Make sure stack is aligned to 16 bytes. 2001-08-21 16:53:23 +00:00
ru
f7788377b5 Added TFTP support.
Submitted by:	Joe Clarke <marcus@marcuscom.com>
MFC after:	2 weeks
2001-08-21 16:25:38 +00:00
ru
b50e7f1fae Close the "IRC DCC" security breach reported recently on Bugtraq.
Submitted by:	Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
2001-08-21 11:21:08 +00:00
peter
b25bd9e46c Rebuild libcrypto.so.1 and libssl.so.1 from 4.2-RELEASE, but this time
without the silly librsaINTL.so and/or librsaUSA.so dependencies.
4.2-RELEASE appears to be after the demolition of the librsa* stuff, so
I'm not sure where ps got these binaries from.  Anyway, this makes old
binaries work again since we dont ship librsaINTL.so and/or librsaUSA.so
in the compat dists.  I believe RELENG_4 is affected still too.
2001-08-21 07:48:58 +00:00
ken
6d1c79ab1c Fix some style inconsistencies introduced in rev 1.10, as well as some
other inconsistencies that I missed in my review of rev 1.7.  Also fix
a cut-n-paste error from an earlier revision.
2001-08-21 05:23:37 +00:00
brian
b043974ed5 Make the copyright consistent.
Previously approved by:	Charles Mott <cmott@scientech.com>
2001-08-20 22:57:33 +00:00
brian
b7d1243b98 Handle snprintf() returning < 0 (not just -1)
MFC after:	2 weeks
2001-08-20 15:44:17 +00:00
brian
d7dc171062 Better snprintf() handling.
Prompted by: bde
2001-08-20 15:43:14 +00:00
brian
f203925086 Handle snrintf overflows.
Spotted by: bde
2001-08-20 13:44:13 +00:00
kris
7a9caa3fb8 Mark some functions as __printflike() and/or taking const char * arguments
instead of char *.

MFC after:	2 weeks
2001-08-20 12:53:36 +00:00
brian
328c1acb51 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 12:50:21 +00:00
markm
ea3816f355 Add 'try_mapped_pass' standard option.
Asked for by:	lukeh@PADL.COM
2001-08-20 12:43:19 +00:00
brian
9bd6d0c6d8 Handle snprintf() returning -1
MFC after:	2 weeks
2001-08-20 12:41:36 +00:00
brian
b09490b948 Handle snrintf() returning -1.
MFC after: 2 weeks
2001-08-20 12:31:13 +00:00
brian
3a701f2e73 Handle snprintf() returning -1
MFC after: 2 weeks
2001-08-20 12:06:42 +00:00
markm
8942e2435b No functional changes, but:
o unifdef AUTHENTICATE. We have never compiled this code, and its
  doubtful it will even work in this case.

o Style changes (some ansification, some comment updating)

o Diff reduction and code style merging with crypto telnet.
2001-08-20 12:04:53 +00:00
kris
9e765a93bb Say goodbye to libss, which somehow managed to crouch hidden in the tree
for long after it was used.
2001-08-19 21:32:52 +00:00
jasone
dca1753a8e Fix logic errors in pthread_cond_wait() and pthread_cond_timedwait() that
could cause deadlock after interruption due to a signal.

Reviewed by:	deischen
2001-08-19 20:05:42 +00:00
ache
9a033cc7c8 Add about rewind+errno, describe ESPIPE, minor formatting. 2001-08-19 08:24:50 +00:00
ken
c0187522a6 Implement compute_stats() in terms of devstat_compute_statistics(). This
gets rid of the duplicated code in compute_stats().

Add a new DSM_SKIP statistic type for devstat_compute_statistics() that
causes the subsequent variable argument to be skipped.

Thanks to Sergey Osokin for coding up my idea/code fragment.

Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-08-18 05:46:59 +00:00
dd
e28e900e18 Implement getpeereid(3), a front-end to the LOCAL_PEERCRED
socket option for the Unix domain.  It's weaker than the
socket option (this only returns the uid and gid, while the
socket opt. can return the entire group list), and is
implemented mostly for compatibility with OpenBSD.
2001-08-17 22:09:15 +00:00
dd
505c5a72cd Xref raise(3). 2001-08-17 21:04:42 +00:00
ru
053e568e92 mdoc(7) police: collapse multiple spaces. 2001-08-17 15:25:55 +00:00
ru
5ea6efa119 mdoc(7) police: fixed the fatal. 2001-08-17 15:18:49 +00:00
ache
15b17530eb Simplify overflow calculations a bit 2001-08-17 11:08:56 +00:00
ache
2b683510d5 Remove extra check, already done in upper level caller, i.e. in
_fseeko()
2001-08-17 10:43:03 +00:00
ache
ebbe15509b Mention ftell & ftello in EOVERFLOW section too. 2001-08-17 10:29:09 +00:00
ache
72d09d2a6d Add more overflow checks in case of fseek() 2001-08-17 10:22:03 +00:00
ache
b738f843d4 Don't clear "we have offset" flag even if long is overflow for fseek(),
there is no harm to have it, it will reduce next call efforts.
2001-08-17 10:06:46 +00:00
ache
fc8382547a fseek.c:
Resulting fseek() offset must fit in long, required by POSIX (pointed by bde),
so add LONG_MAX and final tests for it.

rewind.c:
1) add missing __sinit() as in fseek() it pretends to be.
2) use clearerr_unlocked() since we already lock stream before _fseeko()
3) don't zero errno at the end, it explicitely required by POSIX as the
only one method to test rewind() error condition.
4) don't clearerr() if error happens in _fseeko()
2001-08-17 09:57:11 +00:00
ru
feb6bd4a9b mdoc(7) police: replace \*(Ba' with a simple |', it's handled specially. 2001-08-16 11:09:00 +00:00
jasone
82812deed1 Fix a bug in canceling joining threads.
Do not detach canceled threads.

Reported by:		Arno Klaassen <arno@heho.snv.jussieu.fr>
Collaboration with:	deischen
2001-08-16 06:31:32 +00:00
jkoshy
ac15012658 If the string specifying the allowed options starts with a leading `:',
`getopt(3)' should not print a warning for missing argument values.

PR:		bin/29625
Reviewed by:	mikeh
MFC after:	1 week
2001-08-16 03:27:03 +00:00
dd
8da0282652 Explain the relation of getchar() to getc() in less words.
Submitted by:	ru
2001-08-16 03:09:33 +00:00
markm
c8efe5c4e4 Remove out-of-date "cannot be exported from USA" notice. 2001-08-15 20:25:16 +00:00
ache
e9f266c7a1 Use smarter overflow tests
Suggested by: bde
2001-08-15 20:10:38 +00:00
markm
f9589ccdf9 Document the no_warn option. 2001-08-15 20:05:33 +00:00
markm
4f7de5d571 Fix a couple of cross-references to reflect the reality of the module. 2001-08-15 20:03:26 +00:00
ache
539fabcdf5 1) Disallow negative seek as POSIX require for fseek{o} (but not for lseek):
"[EINVAL] ... The resulting file-position indicator would be set to a
negative value."

Moreover, in real life negative seek in stdio cause EOF indicator cleared
and not set again forever even if EOF returned.

2) Catch few possible off_t overflows.

Reviewed by:	arch discussion
2001-08-15 02:07:47 +00:00
yar
5f7ce195ed Use the ".Rv" mdoc(7) macro where appropriate.
Reviewed by:	ru
2001-08-14 14:20:35 +00:00
yar
8bbd5f0636 Isolate the ERRORS section from the RETURN VALUES one.
Reviewed by:	ru
2001-08-14 14:10:01 +00:00
ru
173222b339 mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
peter
88a00dbf33 Rip out the old __stdin/out/err stuff. It was completely 100% useless. :-(
It was foiled because of dynamic copy relocations that caused compile-time
space to be reserved in .bss and at run time a blob of data was copied to
that space and everything used the .bss version..  The problem is that
the space is reserved at compile time, not runtime... So we *still* could
not change the size of FILE.  Sigh.  :-(

Replace it with something that does actually work and really does let us
make 'FILE' extendable.  It also happens to be the same as Linux does in
glibc, but has the slight cost of a pointer.  Note that this is the
same cost that 'fp = fopen(), fprintf(fp, ...); fclose(fp);' has.
Fortunately, actual references to stdin/out/err are not all that common
since we have implicit stdin/out/err-using versions of functions
(printf() vs. fprintf()).
2001-08-13 21:48:44 +00:00
ru
ac7b73f2d4 mdoc(7) police: s;BSD/OS;.Bsx; where appropriate. 2001-08-13 17:07:40 +00:00
ru
ebb24ad8bf mdoc(7) police: s/NetBSD/.Nx/ where appropriate. 2001-08-13 17:00:36 +00:00
ru
991cd15ec5 mdoc(7) police: s/OpenBSD/.Ox/ where appropriate. 2001-08-13 16:43:02 +00:00
ru
839959ae32 Spell "FreeBSD" with "F" and "BSD" in uppercase. 2001-08-13 16:33:00 +00:00
ru
325db7b385 Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
iedowse
79b42b9e3c Cross-reference io(4). 2001-08-12 21:16:41 +00:00
markm
881d373f6c Remove the WANT_INSECURE_OPIE option - it is now a default. This is not
nearly as ominous as it sounds, and it allows OPIE to be used over SSH
and on xterms.

Requested by:	ache
Discussed on:	-security
2001-08-12 18:47:56 +00:00
ume
4549bb6c00 Fill _res.sort_list with harmless entry. sortlist for IPv6/IPv4
is stored in _res_ext.sort_list, and sortlist for IPv4 is stored in
_res.sort_list for backward compatibility.  However, both sort_list's
are maintaind by just one index _res.nsort.  So, when IPv6 address is
specified to sortlist, empty entry was created in _res.sort_list.  It
broke sortlist facility of gethostbyname().
Discussed on users@jp.ipv6.org.
2001-08-11 15:01:12 +00:00
markm
8c288b46f8 Fix:
/usr/src/lib/libpam/modules/pam_ssh/pam_ssh.c has couple of bugs which cause:

1) xdm dumps core
2) ssh1 private key is not passed to ssh-agent
3) ssh2 RSA key seems not handled properly (just a guess from source)
4) ssh_get_authentication_connectionen() fails to get connection because of
   SSH_AUTH_SOCK not defined.

PR:		29609
Submitted by:	Takanori Saneto <sanewo@ba2.so-net.ne.jp>
2001-08-11 12:37:55 +00:00