Commit Graph

5302 Commits

Author SHA1 Message Date
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
mike
40b3f0a01b o Various mdoc fixes.
o Replace strncpy examples with less confusing ones from
  OpenBSD.  These examples give more detail and also suggest
  using strlcpy(3).

Reviewed by:	des, ru, sheldonh
Obtained from:	OpenBSD
MFC after:	3 days
2001-08-09 17:10:48 +00:00
sobomax
5af575a982 Fix xrefs.
times.3:	gettimeofday(3) --> gettimeofday(2)
rc.conf.5:	isndn(8)	--> isdnd(8)
		idsnd(8)	--> isdnd(8)

MFC after:	2 weeks
2001-08-09 15:46:53 +00:00
yar
27b7f2d4e7 Use the ``.Rv -std'' mdoc(7) macro in appropriate cases.
Reviewed by:	ru
2001-08-09 13:32:13 +00:00
yar
4b2c641db1 Tiny markup fix: `to' isn't a variable 2001-08-09 11:16:12 +00:00
yar
0fe88827f1 A minor markup fix:
- `to' isn't a variable
  - don't omit the first `E' in `ERANGE', even though .Er
    is able to take care of it
2001-08-09 11:03:52 +00:00
dd
8f17f2c988 Fix markup and a couple of thinkos.
Submitted by:	ru
2001-08-09 06:10:46 +00:00
mikeh
c9f4f4bb72 typo: patched->matched 2001-08-09 00:34:57 +00:00
ru
6787c701a8 mdoc(7) police: expand plain text xrefs. 2001-08-08 11:48:28 +00:00
ru
cac152301a Urge the reader to start using getaddrinfo(3) and getnameinfo(3)
protocol-independant functions that don't use static memory area.

Suggested by:	nik
Liked by:	ume, brian
2001-08-08 11:05:47 +00:00
ru
2143008ac0 mdoc(7) police: remove whitespace at EOL. 2001-08-08 10:28:18 +00:00
ru
e3bc6bb329 mdoc(7) police: markup nits. 2001-08-08 08:51:03 +00:00
peter
9db8c8274c Update ptrace(2) re: PT_READ_U and PT_WRITE_U 2001-08-08 05:28:09 +00:00
ru
4345758876 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
ru
4aa9864c7b More spelling fixes. 2001-08-07 12:47:57 +00:00
ru
a7d0535bbf mdoc(7) police: sort xrefs. 2001-08-07 12:33:11 +00:00
ru
90c608c3d9 mdoc(7) police: markup nits. 2001-08-07 12:17:32 +00:00
ume
840f9b9d5f printed current sequence number of the SA. accordingly, changed
into sadb_x_sa2_sequence from sadb_x_sa2_reserved3 in the sadb_x_sa2
structure.  Also the output of setkey is changed.  sequence number
of the sadb is replaced to the end of the output.

Obtained from:	KAME
2001-08-06 19:40:01 +00:00
dd
2e70e83c85 varargs -> stdarg 2001-08-05 05:39:16 +00:00
markm
3b25221320 Fix style/consistency in Makefile and repair static module building.
Submitted by:	bde(partially)
2001-08-04 21:51:14 +00:00
markm
1f44b5f4e9 Don't clobber CFLAGS
Submitted by:	bde
2001-08-04 21:49:30 +00:00
tmm
37ac1a7962 Add some features to libdevstat, and overhaul the interface a bit:
1.) prefix all functions in the library with devstat_ (compatability
    functions are available for all functions that were chaned in an
    incompatible way, but are deprecated).
2.) Add a pointer to a kvm_t as the first argument to functions that
    used to get their information via sysctl; they behave the same
    as before when NULL is passed as this argument, otherwise, the
    information is obtained via libkvm using the supplied handle.
3.) Add a new function, devstat_compute_statistics(), that is intended
    to replace the old compute_stats() function. It offers more
    statistics data, and has a more flexible interface.

libdevstat does now require libkvm; a library depedency is added, so
that libkvm only needs to be explicitely specified for statically linked
programs.
The library major version number is bumped.

Submitted by:	Sergey A. Osokin <osa@freebsd.org.ru>, ken (3)
Reviewed by:	ken
2001-08-04 18:25:48 +00:00
markm
edba6eee5e Fix the bug where this modulke was not checking the priamry GID, only
the GIDS in /etc/group or NIS's group map.

Tested by:	sheldonh
PR:		29349
2001-08-04 09:19:31 +00:00
bde
5acdee8a8e Don't clobber the default for CFLAGS. 2001-08-03 21:45:54 +00:00
iedowse
064d84b252 In getclnthandle(), if the address is found in the cache we need
to strdup() the address string before returning it via *targaddr
because the caller will free the string.

Change the comment at the top of getclnthandle() to clarify that
the caller is responsible for freeing *targaddr.

Noticed by:	sobomax
2001-08-02 21:31:21 +00:00
markm
79a9463a45 With the S/KEY removal, this is no longer buildable or necessary. 2001-08-02 19:04:20 +00:00
markm
9bd038a011 Don't try to make pam_ssh module if NO_OPENSSH is set. 2001-08-02 19:01:02 +00:00
markm
7a60bf6a20 Add opieaccess(5) functionality under the INSECURE_OPIE .ifdef.
Asked for by:	ache
2001-08-02 18:58:52 +00:00
sobomax
b4222d1bf2 Fix a cryptoless world by disconnecting libmp from the build when there is no
crypto bits installed and/or NOCRYPTO/NO_OPENSSL is defined. This unfortunately
meants that usr.bin/chkey, usr.bin/newkey and usr.sbin/keyserv have also to
be disconnected.

IMO it is merely a workaround, the proper solution is to move libmp to
src/crypto where it belongs and use libgmp for the cryptoless builds instead.

Missed by:	dd
2001-08-02 15:47:03 +00:00
markm
78112d8985 Repair the get/set UID() stuff so this works in both su(1) and login(1)
modes.
2001-08-02 10:35:41 +00:00
dd
649f740e57 mdoc(7) police: remove hard sentence breaks. 2001-08-01 16:07:50 +00:00
sheldonh
80fcc4abbc MFS: in HISTORY section, fix release number of first appearance 2001-08-01 12:15:21 +00:00
sheldonh
f153c10891 Fix broken Fn calls; Fn doesn't take a manual page section as an
argument.

Terminate the last sentence with a period.
2001-08-01 12:04:32 +00:00
fenner
db46728f21 Update our bpf.h with tcpdump.org's new DLT_ types.
Use our bpf.h instead of tcpdump.org's to build libpcap.
2001-07-31 23:27:06 +00:00
mp
8151115973 Only pull in the MD files if they exist. This allows for progressive
implementation and compilation when bringing up a new architecture.
2001-07-31 16:34:52 +00:00
mp
eb299211ae Fix compilation errors by adding forward declarations and fix typo. 2001-07-31 16:10:51 +00:00
mp
9cd078f86a Make include file consistent with the rest of libstand. 2001-07-31 15:49:50 +00:00
brian
2f4c944b65 Mention the sa_handler and sa_sigaction #defines in the synopsis.
Mark sa_sigaction consistently.

MFC after: 1 week
2001-07-31 09:33:08 +00:00
asmodai
f1723cd9ea FreeBSD now also defines EIDRM and uses it.
Inspired by PR:		22470
Which was submitted by:	Bjorn Tornqvist <bjorn@west.se>
MFC after:	1 week
2001-07-30 19:30:26 +00:00
asmodai
152e263c19 Remove bogus BUGS section.
FreeBSD _does_ define ENOMSG as per SVID when IPC_NOWAIT is set.

PR:		22470
Submitted by:	Bjorn Tornqvist <bjorn@west.se>
MFC after:	1 week
2001-07-30 19:25:16 +00:00
markm
2754e9c466 Making this major bump was a BAD idea. The API change is internal (to PAM)
and it caused problems without solving any.
2001-07-30 09:56:38 +00:00
dd
5ec8420782 Rename mp.3 to libmp.3 since that's what all the other "library"
manual pages (e.g., libstand, libdisk) are called.

Submitted by:	sheldonh
2001-07-30 09:15:27 +00:00
dd
9bad958190 Add a manual page for the libmp interface. Some of the descriptions
great, but then again neither is the interface it's documenting.
2001-07-30 09:13:56 +00:00
tmm
b7e79511f8 Correct the old length argument passed to sysctlbyname to be a pointer
to a size_t (not to an int).

MFC after:	2 days
2001-07-29 22:01:55 +00:00
markm
6b3146187f (Re)Add an SSH module for PAM, heavily based on Andrew Korty's module
from ports.
2001-07-29 18:31:09 +00:00
sheldonh
8fbfd8b125 Avoid any chance of being misunderstood as having libelled developers
or developers' vendors without compromising the importance of warning
against bad practice.

Reported by:	mjacob
MFC after:	1 week
2001-07-29 15:08:14 +00:00
dd
a912f88e22 Move SHLIB_MAJOR to below LIB and add a comment about why NO_WARNS is set. 2001-07-29 13:22:41 +00:00
dd
30dfa8c18c Install the man page and add mp.h to INCS. 2001-07-29 13:19:24 +00:00
dd
16631fa6d4 Add a manual page for the libmp interface. It isn't real great, but
then again neither is the interface it's documenting.
2001-07-29 13:19:17 +00:00
dd
024a65957f Don't xref mt(1) just because it mentions ioctl.
Submitted by:	Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
2001-07-29 09:17:54 +00:00
dd
43f18c90c8 Don't capitalize variable names. 2001-07-29 09:17:16 +00:00
dd
8497298808 ioctl(2) can return EFAULT from copyin.
PR:		29285
Submitted by:	Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
2001-07-29 09:16:07 +00:00
dd
a12e9377b2 Enable the new libmp in the build, and disable libgmp and its
henchmen.
2001-07-29 08:58:22 +00:00
dd
2aadb93301 This is the traditional BSD libmp interface implemented in terms of
the OpenSSL BIGNUM interface.  It is provided for compatibility only
and should not be used in new code.
2001-07-29 08:49:15 +00:00
mikeh
b925de092b Rename the GLOB_MAXPATH flag of glob(3) to GLOB_LIMIT to be compatible
with NetBSD and OpenBSD. glob(3) will now return GLOB_NOSPACE with
errno set to 0 instead of GLOB_LIMIT when we match more than `gl_matchc'
patterns. GLOB_MAXPATH has been left as an alias of GLOB_LIMIT to
maintain backwards compatibility.

Reviewed by:	sheldonh, assar
Obtained from:	NetBSD/OpenBSD
2001-07-29 00:52:37 +00:00
se
742d7aada7 The fix for schemeless and hostless URLs (rev. 1.27) broke the schemeless
proxy specification, which seems to be valid according to the man page.

Change the logic to consider "hostname:port" a hostname and port instead
of a file URL.

Approved by:	des
2001-07-28 21:28:14 +00:00
chris
9ea3d9b848 Add cross-references for the new kldsym(2) man page. 2001-07-27 03:03:36 +00:00
chris
b40a76aaa8 Add a new kldsym(2) man page. 2001-07-27 02:56:16 +00:00
yokota
505859f37d Fix spelling in the last commit. (Oh, I thought I had run ispell... ;-<
Spotted by: sheldonh
2001-07-26 09:46:08 +00:00
yokota
a3ac291cdb Adds notes on program termination and signal handlers.
I revised the text after dd's kind review. So, if you find
any error, it is probably introduced by my last minutes'
update and is entirely my fault, not dd's.

Reviewed by: dd
2001-07-26 08:46:47 +00:00
sheldonh
1e628e76e1 The previous delta duplicated a significant amount of information
already found in the sigaction(2) manual.

As discussed with the committer of that delta, cross-reference the list
in sigaction(2) instead of duplicating the list of functions that are
safe for use within signal handlers.
2001-07-24 11:37:33 +00:00
kris
dd1f265a1a Sync to OpenBSD (update comment and minor style change).
Obtained from:	OpenBSD
MFC after:	1 week
2001-07-24 11:34:22 +00:00
kris
bec32b3e9b Sync to OpenBSD:
Clarify that if strlcat() does not find a NUL within siz byte it
will not NUL terminate either.

Document boundary condition when size < strlen(dst).

"of", not "on" (from Henric Jungheim)

Obtained from:	OpenBSD
MFC After:	1 week
2001-07-24 11:32:29 +00:00
yokota
bd11ff6285 - Do not call VGLEnd() and exit() to terminate the program
immediately when a signal is caught.  Instead, defer
  program termination until the next call to VGLCheckSwitch().
  Otherwise, the video card may not be restored correctly
  if the signal is seen while inside libvgl functions.

MFC after: 1 week
2001-07-24 11:15:20 +00:00
sheldonh
1b8c225dc1 The delta introduced in the previous revision and attributed to the
OpenBSD project had grammar problems and made no attempt to motivate
the practice of saving errno.  Replace it with something better.
2001-07-24 11:15:13 +00:00
sheldonh
c81f0bb5a6 Finish the sweep of changes that fix doubled 'the'. 2001-07-24 08:30:55 +00:00
kris
f1ce55ab17 Add the list of signal-handler safe functions here too, so people can
find it more easily

Obtained from:	OpenBSD
MFC After:	1 week
2001-07-24 08:26:37 +00:00
kris
2dedab32be Add a few more functions which are safe to call from signal handlers,
and give a bit of advice.

Obtained from:	OpenBSD
MFC After:	1 week
2001-07-24 08:24:50 +00:00
yar
267cc8ea92 Unify SEE ALSO sections of the kld*.2 and mod*.2 manpages.
Previously, some useful xrefs were missing.
Now each of the pages refers to all remaining section 2 pages,
to the kld(4) page, and to a related utility's (section 8) page.
2001-07-24 07:59:54 +00:00
ume
512b8c359f Simplify IPv4 mapped IPv6 address handling.
Reviewed by:	brian
MFC after:	5 days
2001-07-23 21:42:22 +00:00
assar
6ea84229c5 remove emalloc,ecalloc,erealloc,estrdup 2001-07-23 12:42:07 +00:00
assar
8668d65218 add ecalloc, emalloc, erealloc, estrdup - versions of the e-less
functions that exit instead of failing
2001-07-22 22:26:37 +00:00
mpp
b836d8030e Fix some man page xrefs.
PR:		docs/26065
MFC after:	1 week
2001-07-22 11:51:11 +00:00
brian
90a600f5b1 Hint getaddrinfo() correctly if we're looking up a name that we got from
an AF_INET6 address.

MFC after: 1 week
2001-07-21 00:18:54 +00:00
jasone
a9a7a5e9d6 Implement pthread_attr_[gs]etguardsize(). Non-default-size stacks used to
be malloc()ed, but they are now allocated using mmap(), just as the
default-size stacks are.  A separate cache of stacks is kept for
non-default-size stacks.

Collaboration with:	deischen
2001-07-20 04:23:11 +00:00
jlemon
303231dd3f Document EVFILT_TIMER.
MFC after: 1 week
2001-07-19 18:35:19 +00:00
dd
6705744fe1 Don't claim that strncpy() is the same as strcpy().
PR:		29002
Submitted by:	Joseph Mallett <jmallett@xMach.org>
2001-07-19 11:26:52 +00:00
ru
aab47f87b8 mdoc(7) police: fix markup. 2001-07-18 15:55:34 +00:00
ru
b2f5024e3b mdoc(7) police: widen width of the options list. 2001-07-18 14:49:32 +00:00
des
35acbfe0b3 Unbreak parsing URLs that have a host part but no document part.
While we're here, fix a snprintf() usage warning.
2001-07-17 20:22:33 +00:00
markm
208d8e13d4 Update to the same level of debug-logging as the rest of the
FreeBSD/PAM modules.
2001-07-17 07:36:51 +00:00
markm
b179f8e35f Update to the same code as in the pam_krb5.so port.
According to Peter, the port works - this needs more testing.
2001-07-17 07:34:36 +00:00
ru
7ebff87751 mdoc(7) police: Add strncpy() to the NAME section. 2001-07-16 12:47:34 +00:00
kris
354c502e4c Remove unnecessary #include <stdlib.h>
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 04:48:28 +00:00
kris
38c4ca6c4e Oops, commit the version which actually works
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 04:04:22 +00:00
kris
698159c01a Avoid a compile-time format string warning
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 03:55:47 +00:00
dd
911ca14c87 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
dd
a145482cf6 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
dd
7dc7a926d0 Set WARNS=2 on libraries that compile cleanly with it.
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-07-15 06:46:02 +00:00
iedowse
b855a121e2 Fix a memory leak in __rpcb_findaddr(), avoid compiler warnings.
Submitted by:	Martin Blapp <mb@imp.ch>
2001-07-14 18:18:23 +00:00
markm
ada1f4d477 Use a better method of getting user credentials to account for
(legal) UID duplication.

Rename use_uid to auth_as_self for consistency with other modules.
2001-07-14 08:42:39 +00:00
markm
921b216c2d Use a better method to get user credentials to account for (legal)
duplications of UID's in /etc/*passwd.
2001-07-14 08:38:24 +00:00
dd
bd37181c76 Recognize the %s format.
Submitted by:	Thomas Zenker <thz@lennartz-electronic.de> and
		    Maxim Konovalov <maxim@macomnet.ru>, respectively
Reviewed by:	-audit
2001-07-13 13:59:24 +00:00
ru
5001e16d30 mdoc(7) police: -xwidth has been fold into -width. 2001-07-13 09:09:52 +00:00
ru
80f926caa5 mdoc(7) police: fixed markup, a little bit. 2001-07-11 08:36:26 +00:00
ru
36e83f27aa mdoc(7) police: fixed markup any numerous typos. 2001-07-11 08:35:34 +00:00
ru
d929062987 mdoc(7) police: removed punctuation after the last SEE ALSO xref. 2001-07-10 18:00:19 +00:00
obrien
5962fc3235 style nits 2001-07-10 17:48:07 +00:00
markm
a8b501863a Fix a horrible bug introduced by myself where the options collection
keeps on growing as the module stack is parsed.
2001-07-10 16:59:30 +00:00
ru
36f138439b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
ru
317b7d8e37 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
obrien
8cfb3274dd MFS: add the FreeBSD history. 2001-07-10 00:12:50 +00:00
obrien
475aed9fb7 Give the FreeBSD history also. 2001-07-10 00:11:00 +00:00
obrien
6b523e5046 style nit 2001-07-09 23:12:23 +00:00
tobez
8e095496f1 Document more resolver(3) routines: dn_skip() from resolv.h, and
ns_get16(), ns_get32(), ns_put16(), and ns_put32() from arpa/nameser.h.

Markup by:	ru
OK'ed by:	markm
2001-07-09 20:46:00 +00:00
markm
88dfad0475 Clean up (and in some cases write) the PAM mudules, using
o The new options-processing API
o The new DEBUG-logging API

Add man(1) pages for ALL modules. MDOC-Police welcome
to check this.

Audit, clean up while I'm here.
2001-07-09 18:20:51 +00:00
markm
ff28ba8b35 Bump the major number. The libraries API has changed incompatibly. 2001-07-09 18:16:33 +00:00
markm
1b8cb1cd38 Almost completely rewrite the PAM module options processing
routines, and provide a more extended API for doing this.

Provide an API for debug logging.

Audit and clean up the code.
2001-07-09 18:14:43 +00:00
markm
5df2506446 Add the WANT_INSECURE_OPIE frob which is useful for debugging and
over secure (encrypted) links.

Add a MLINK for skey(4) to opie(4) to assist in the transition.
2001-07-09 18:08:16 +00:00
markm
431a592722 Axe S/Key. OPIE is the legal successor. 2001-07-09 17:52:34 +00:00
ru
1c060c459c mdoc(7) police: eliminate -ww warnings. 2001-07-09 15:54:36 +00:00
dd
eaa6ee03b8 mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
brian
8636b161b3 Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
des
0ca9dbc9d1 Handle shemeless, hostless URLs correctly. 2001-07-08 15:59:15 +00:00
mikeh
bc02f9cebe Attempt to use the environment variable TMPDIR for the temporary
directory, defaulting to /tmp.

PR:		bin/16924
Reviewed by:	dd
MFC after:	2 weeks
2001-07-07 04:08:32 +00:00
ru
05e503d80a mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2). 2001-07-06 16:46:48 +00:00
ru
fd9d23bf28 mdoc(7) police: fixed formatting. 2001-07-06 07:29:59 +00:00
ru
9ca51e2245 mdoc(7) police: fixed markup and typo. 2001-07-05 11:24:26 +00:00
yar
0b890122b9 Use the .Rv macro to describe the return value.
Suggested by:	ru
MFC after:	5 days
2001-07-04 13:07:38 +00:00
ru
8e7c49994c mdoc(7) police: added missing newline after .Dv macro call,
removed hard sentence breaks.
2001-07-04 12:39:22 +00:00
ru
89c1410787 mdoc(7) police: use .Rv -std. 2001-07-04 12:32:43 +00:00