Commit Graph

5322 Commits

Author SHA1 Message Date
dillon
41abc6d4e4 Implement __FBSDID() 2001-09-16 21:35:07 +00:00
rwatson
42e6b3b99d 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
d085d52af7 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
d2c6f7e657 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
7454909fa1 Convert a library to use the new __FBSDID()'s for testing and review
purposes.
2001-09-15 03:42:10 +00:00
ru
622683f615 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
4a2c71d741 Typo: s/conatains/contains/
MFC after:	1 week
2001-09-12 17:57:31 +00:00
julian
5596676e6c 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
05234b1d16 mdoc(7) police: changed pure POSIX text; added missing markup bits. 2001-09-11 09:39:23 +00:00
ru
1fa842fa3f mdoc(7) police: removed commas from the standard (split) AUTHORS block. 2001-09-11 09:26:38 +00:00
asmodai
fe6129599e 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
e08a19072b 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
2612796329 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
a04d04aa06 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
ae41577e4e reconnect strfmon.c to build list 2001-09-07 13:03:16 +00:00
asmodai
b883ee05be 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
890e070aa1 Port to ia64, taking into account the fact that pagesizes may be variable. 2001-09-07 12:32:43 +00:00
asmodai
aa037ff4c0 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
ac2b9c4fdc 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
5787ab3545 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
ef56905cb0 correctly wrap macros with { } 2001-09-06 09:26:28 +00:00
kris
cb3a3b2a12 Add zopen(), a stdio wrapper for gzipped data streams.
Obtained from:	NetBSD
2001-09-06 09:14:49 +00:00
obrien
c2f1c203f1 strfmon(3) is not ready to go live. 2001-09-06 08:58:42 +00:00
phantom
2b26e9313c 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
f512fee07c 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
a0569e9940 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
72b8fa9d63 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
c516d85954 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
a9d341bd9b Remove rcsids and unneded include 2001-09-04 17:41:20 +00:00
ache
48c9c31dbb 'acc' is not initialized in one hypotetical case, fix it 2001-09-04 17:12:15 +00:00
markm
75cc8b4799 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
cd61d5ab48 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
9d255ceec0 Implement _setjmp()/_longjmp().
Obtained from: Intel's EFI toolkit
2001-09-04 08:27:39 +00:00
dd
e2dcf3d0c9 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
3ac0264ecd 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
b7b50a3fa3 Remove bogus implementation of _setjmp/_longjmp 2001-09-03 14:19:02 +00:00
murray
66f0420861 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
bc52b0fc56 Check for malloc failure in a couple of cases
MFC after:	2 weeks
2001-09-03 05:57:06 +00:00
ache
2a55bd67ec When __SOPT is cleared, clear __SOFF too.
NOTE: original stdio bug.
2001-09-03 02:35:10 +00:00
ache
cbe865cf8c 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
fea7223b35 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
eb6143a73e 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
59ebf79b48 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
698550762f Remove MLINKS seek.2 to lseek.2, we don't have seek.2 syscall 2001-09-02 19:28:41 +00:00
ache
8e45098f4c Typo seek(2) -> lseek(2) 2001-09-02 19:24:07 +00:00
ache
245c459c3f 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
fe9bd7a606 Another punctuation fix (missing comma ending preposition). 2001-09-01 21:32:52 +00:00
chris
e540bd45f2 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
040bf33abb 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
77759ea63b Remove even more unneded checks, original code can't overflows in that place 2001-09-01 15:01:37 +00:00
ache
20c6fc0914 Remove two checks unneeded now (can't happens) 2001-09-01 14:48:45 +00:00
ache
0c69b04984 Make fseek(... SEEK_CUR) fails if current file-position is unspecified. 2001-09-01 14:40:01 +00:00
ache
d8648337d6 Note that prev. commit addition is for ftell/ftello 2001-09-01 14:23:30 +00:00
ache
6628a9dfdc 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
162eb9fa4e Describe file-position behaviour from POSIX 2001-09-01 14:01:52 +00:00
ache
8785013776 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
625f4c5432 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
116ee96d9d 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
5610a6ae63 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
c4e5554168 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
74812a92b8 Describe EOVERFLOW I implement per POSIX.
Sort ERRORS section
2001-08-31 23:06:28 +00:00
ache
0ad06d5009 Add originally missing __sinit() call. 2001-08-31 20:36:19 +00:00
ache
689eee076f Simplify offset underflow checks even more 2001-08-31 20:17:32 +00:00
ache
13118a14e0 Describe that we disallow ungetc at offset 0 now. 2001-08-31 20:03:49 +00:00
ache
7d962c74f0 Disallow ungetc at offset 0 (to prevent negative offset happens), so simplify
checks in ftell.
2001-08-31 19:50:25 +00:00
ache
f00df8355c Drop buffer first, _then_ ask for real position 2001-08-31 18:54:44 +00:00
ache
2362fc36bc 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
ef96044374 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
8479e8b5bb Initialize _offset to 0 in fopen(), it helps to optimize fseek/ftell 2001-08-31 13:14:49 +00:00
ache
ae7b8fc7f6 Detect fp->_offset overflow on read
Use errno to catch negative seek with -1 offset
2001-08-31 12:55:22 +00:00
ru
da7d969a02 Add manpage for inet_net_ntop(3) and inet_net_pton(3).
Obtained from:	NetBSD
2001-08-31 10:54:44 +00:00
ru
69224c0edd Use ``.Rv -std'' wherever possible.
Submitted by:	yar
2001-08-31 09:57:38 +00:00
rwatson
68e6cd77c0 o Use .Fx to refer to FreeBSD
Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:12:54 +00:00
rwatson
bee0359b32 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
b7b3700317 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
e7cbb8efe4 Add Xref to make.conf(5). 2001-08-30 21:44:46 +00:00
ache
831e2fb1cd 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
5141c6e8a2 goto dumb; if can't obtain curoff for whence != SEEK_CUR cases, as supposed 2001-08-30 20:19:45 +00:00
ache
f8e201c549 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
a45063618a 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
d118ae3895 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
9dcb56a64f 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
92c5759916 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
4101eebee9 There shuldn't be whitespace before a question mark. 2001-08-27 09:34:39 +00:00
ru
52e5d5e07a mdoc(7) police: removed whitespace at EOL. 2001-08-27 08:37:35 +00:00
ru
70db921414 mdoc(7) police: markup and spelling fixes. 2001-08-27 08:26:57 +00:00
ru
5466c22840 mdoc(7) police: removed whitespace at EOL, sorted SEE ALSO xrefs. 2001-08-27 08:12:37 +00:00
ru
571547c023 mdoc(7) police: markup nits. 2001-08-27 08:01:01 +00:00
sobomax
c7ad1b8b26 Remove grammatical bogon. 2001-08-27 08:00:15 +00:00
markm
9e62e18a59 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
c98dbe0779 Introduce better logging, error reporting and use of login_cap data. 2001-08-26 18:05:35 +00:00
markm
27a8adb330 Add extra logging detail. This needs a more general solution. 2001-08-26 17:57:44 +00:00
markm
4499680c11 Adjust dependancies and build order. PAM needs RPC. 2001-08-26 17:49:51 +00:00
markm
67fcc4111a 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
5ba0f943c6 Cosmetique fixes from bde 2001-08-26 10:38:29 +00:00
rwatson
16ffaac49c 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
c6694b94db 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
5844ade67e 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
a8a9c78664 Oops, minherit() uses VM_INHERIT_XXX as the argument, not MAP_XXX. Properly
document minherit().
2001-08-24 19:43:45 +00:00
dillon
082a1e71f3 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
94dfd084a9 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
29c24377ac Fd is macro too, so use \&Fd 2001-08-24 11:12:58 +00:00
ache
5ced16d835 Fildes -> Fd too (started from big letter) 2001-08-24 11:05:11 +00:00
ache
2ebcfc4bde Change
start means ...
to
.Fa l_start
means ...
2001-08-24 10:59:32 +00:00
sheldonh
2107a3a429 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
3d8ba93519 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
89bd0a4338 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
dcc548344f Remove a duplicate "that".
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-08-24 02:24:58 +00:00
dd
aa2ac8fd06 begin executed --> being executed
Obtained from:	NetBSD
2001-08-24 00:18:37 +00:00
dg
e6de45d5ec Killed reference to MAP_INHERIT which is not supported in FreeBSD. 2001-08-23 22:39:52 +00:00
ache
0fcb9c0939 Now we implement l_len<0 per POSIX, describe it. 2001-08-23 19:00:34 +00:00
gallatin
df8be8c104 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
d56c927547 Cosmetique: correct English in comments 2001-08-23 14:49:02 +00:00
ache
1a36f4817c Rephrasing prev. commit a bit. 2001-08-23 09:55:10 +00:00
ache
024eb9d706 Describe EOVERFLOW, EOPNOTSUPP and reaction to negative l_len 2001-08-23 09:42:30 +00:00
ru
2b577fc318 mdoc(7) police: Fixed broken xrefs. 2001-08-22 14:16:31 +00:00
ache
c7e44d0909 Document new EINVAL, EOVERFLOW cases. Sort ERRORS 2001-08-21 21:44:48 +00:00
dd
0d4ba9ee29 Don't claim to be mp(3). 2001-08-21 20:05:39 +00:00
dd
a53b7a0080 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
bed180befd Expand the ?: construct into an if/else.
Submitted by:	nectar
2001-08-21 19:27:07 +00:00
dd
99b2d7167c 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
daf9108f0f Fix style bug. 2001-08-21 18:46:33 +00:00
ru
f67ee72edf Fixed warnings. 2001-08-21 17:28:39 +00:00
nectar
aae0c019d1 Pass the pointy hat, please.
Submitted by:	ru
2001-08-21 17:16:32 +00:00
nectar
43702240bb setprogname() should set __progname to the last component of the given
path.
2001-08-21 16:55:34 +00:00
dfr
d280a62e1c Make sure stack is aligned to 16 bytes. 2001-08-21 16:53:23 +00:00
ru
cf9d9a36e7 Added TFTP support.
Submitted by:	Joe Clarke <marcus@marcuscom.com>
MFC after:	2 weeks
2001-08-21 16:25:38 +00:00
ru
4d0fae19b5 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
12638a445d 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
067f3e7b94 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
bf0ff75162 Make the copyright consistent.
Previously approved by:	Charles Mott <cmott@scientech.com>
2001-08-20 22:57:33 +00:00
brian
903d158fae Handle snprintf() returning < 0 (not just -1)
MFC after:	2 weeks
2001-08-20 15:44:17 +00:00
brian
f6df81abf7 Better snprintf() handling.
Prompted by: bde
2001-08-20 15:43:14 +00:00
brian
3b24d8f2af Handle snrintf overflows.
Spotted by: bde
2001-08-20 13:44:13 +00:00
kris
110fc843a0 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
4e059b7f96 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 12:50:21 +00:00
markm
ac30099bce Add 'try_mapped_pass' standard option.
Asked for by:	lukeh@PADL.COM
2001-08-20 12:43:19 +00:00
brian
d3f8bf4154 Handle snprintf() returning -1
MFC after:	2 weeks
2001-08-20 12:41:36 +00:00
brian
340d41bc10 Handle snrintf() returning -1.
MFC after: 2 weeks
2001-08-20 12:31:13 +00:00
brian
600042995a Handle snprintf() returning -1
MFC after: 2 weeks
2001-08-20 12:06:42 +00:00
markm
98d3c6bc19 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
07b5572402 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
2d7a958ca5 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
6ea1f5e148 Add about rewind+errno, describe ESPIPE, minor formatting. 2001-08-19 08:24:50 +00:00
ken
ef96d4b7a9 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
0585574d9b 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
489477439a Xref raise(3). 2001-08-17 21:04:42 +00:00
ru
c82403ffa0 mdoc(7) police: collapse multiple spaces. 2001-08-17 15:25:55 +00:00
ru
ea8c823418 mdoc(7) police: fixed the fatal. 2001-08-17 15:18:49 +00:00
ache
b2c8d2cea9 Simplify overflow calculations a bit 2001-08-17 11:08:56 +00:00
ache
a95746d6e3 Remove extra check, already done in upper level caller, i.e. in
_fseeko()
2001-08-17 10:43:03 +00:00
ache
4107e6045e Mention ftell & ftello in EOVERFLOW section too. 2001-08-17 10:29:09 +00:00
ache
28f5a91209 Add more overflow checks in case of fseek() 2001-08-17 10:22:03 +00:00
ache
555ada99b6 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
ca91420dc8 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
ed60690b9e mdoc(7) police: replace \*(Ba' with a simple |', it's handled specially. 2001-08-16 11:09:00 +00:00
jasone
6e7ccfd093 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
033062de28 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
cfe0163bbc Explain the relation of getchar() to getc() in less words.
Submitted by:	ru
2001-08-16 03:09:33 +00:00
markm
fa04b8c3cb Remove out-of-date "cannot be exported from USA" notice. 2001-08-15 20:25:16 +00:00
ache
9c95fc6cbe Use smarter overflow tests
Suggested by: bde
2001-08-15 20:10:38 +00:00
markm
78c5ea3c24 Document the no_warn option. 2001-08-15 20:05:33 +00:00
markm
0261d9dad2 Fix a couple of cross-references to reflect the reality of the module. 2001-08-15 20:03:26 +00:00
ache
9d7273169f 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
deeb90994a Use the ".Rv" mdoc(7) macro where appropriate.
Reviewed by:	ru
2001-08-14 14:20:35 +00:00
yar
337d5700b4 Isolate the ERRORS section from the RETURN VALUES one.
Reviewed by:	ru
2001-08-14 14:10:01 +00:00
ru
24c7b0a61d mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
peter
3e5894fd23 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
c6c3284428 mdoc(7) police: s;BSD/OS;.Bsx; where appropriate. 2001-08-13 17:07:40 +00:00
ru
d896280a89 mdoc(7) police: s/NetBSD/.Nx/ where appropriate. 2001-08-13 17:00:36 +00:00
ru
4e5771e1b8 mdoc(7) police: s/OpenBSD/.Ox/ where appropriate. 2001-08-13 16:43:02 +00:00
ru
e8e5635e4a Spell "FreeBSD" with "F" and "BSD" in uppercase. 2001-08-13 16:33:00 +00:00
ru
95ce4d2cdc Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
iedowse
9b5fad0513 Cross-reference io(4). 2001-08-12 21:16:41 +00:00
markm
8d004b8b0d 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
2004f62eea 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
384d536a12 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
imp
3e581274aa Make the name parameter const char *. 2001-08-11 05:16:00 +00:00
dd
cbf63217c2 Use .Fn, .Fa, and .Dv where appropriate. 2001-08-10 20:49:38 +00:00
markm
0935831088 Clean up this module very extensively. Fix the logging, the coding
standards and the option handling. This module is now much more easy
to maintain as a part of the FreeBSD tree.
2001-08-10 19:24:34 +00:00
markm
d4dc7767d7 Code clean up; make logging same as other modules and fix warnings. 2001-08-10 19:21:45 +00:00
markm
74d9830e38 General code clean-up. Sort out warnings, and make the warning and
logging work the same as other modules.
2001-08-10 19:18:52 +00:00
markm
746b322ce6 Simplify code. Also verbose logging, verbose overridable error reporting. 2001-08-10 19:15:48 +00:00
markm
30eda03ef6 Verbose logging, overridable verbose error reporting. 2001-08-10 19:12:59 +00:00
markm
846c7876be Module clean-up. Verbose logging, Overridable verbose error reporting,
FreeBSD pam_prompt() usage to simplify conversation function usage.
2001-08-10 19:10:43 +00:00
markm
6d1911d4af Verbosely (overridable) report failure to the user. 2001-08-10 19:07:45 +00:00
markm
d6d9a9d422 Use the FreeBSD pam_prompt() interface to the conversation function
instead of home-rolling it. Clean up debugging code and tidy the
module.
2001-08-10 19:05:57 +00:00
markm
cda9e6f687 Verbosely report errors to the user (overridable), and make sure
that the correct failure mode is reported.
2001-08-10 19:02:21 +00:00
ru
f858dca3dc mdoc(7) police: join split punctuation to macro calls. 2001-08-10 17:35:21 +00:00
jhb
e294674e6c Include string.h for the strlen() prototype to quiet a warning. 2001-08-10 16:55:09 +00:00
ru
7221cd94bd mdoc(7) police: fixed the "new sentence" bogons. 2001-08-10 15:03:10 +00:00
markm
fef690379a Fix broken logic so that this actually works for the superuser.
Verbosely log (properly).
Verbosely report errors to the user.
2001-08-10 14:21:58 +00:00
markm
12c08f0451 Rework this to prevent a nasty problem involving different modules'
option interacting with each other.
2001-08-10 14:16:47 +00:00
markm
9768c83960 Declare the new user-error reporting macro.
This is a macro to allow use of the __FILE__ and __FUNCTION__
macros.
2001-08-10 14:15:00 +00:00
markm
7b1059217e Add a routine for providing feedback via the conversation mechanism
(usually to stderr) for user-reportable errors.
2001-08-10 14:13:16 +00:00
ru
80f060f0cf mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
ru
14c81f3796 Fixed style bugs (dot `.' at the end of error and warning messages).
Noticed by:	bde
2001-08-10 11:46:37 +00:00
ru
c41292f634 Markup nits: use diagnostic type lists for error and warning messages.
Backout previous revision.  We should not expand plain text xrefs if
they appear in the literal text, e.g. in the error or warning message
of the library function.  (Submitted by: bde)

Moved "out of memory" from warning to errors section.
2001-08-10 11:41:55 +00:00
ru
904defb32d mdoc(7) police: add xref to intro(2). 2001-08-10 10:11:55 +00:00
mike
b57ab26cc8 o Remove some misleading and incomplete information about search
permissions.
o Add a reference to intro(2) where it is properly documented.

Reviewed by:	bde
MFC after:	3 days
2001-08-09 17:29:46 +00:00