Commit Graph

5049 Commits

Author SHA1 Message Date
jasone
df09425d2e 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
916d745e8b Document EVFILT_TIMER.
MFC after: 1 week
2001-07-19 18:35:19 +00:00
dd
6f6246ae29 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
7372bf093f mdoc(7) police: fix markup. 2001-07-18 15:55:34 +00:00
ru
daec10e73c mdoc(7) police: widen width of the options list. 2001-07-18 14:49:32 +00:00
des
f475f6d39e 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
dbd7b5ebfb 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
71aa34195b 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
6d62472ce6 mdoc(7) police: Add strncpy() to the NAME section. 2001-07-16 12:47:34 +00:00
kris
ed0f63e1e4 Remove unnecessary #include <stdlib.h>
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 04:48:28 +00:00
kris
685d50cdba Oops, commit the version which actually works
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 04:04:22 +00:00
kris
717434c523 Avoid a compile-time format string warning
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 03:55:47 +00:00
dd
7d1013753f Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
dd
c49a4e6620 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
dd
61c5e8c1ae 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
c03a162980 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
2400f53cc7 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
c171ef66d7 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
03ee1c54f1 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
c69a258319 mdoc(7) police: -xwidth has been fold into -width. 2001-07-13 09:09:52 +00:00
ru
b6927cf589 mdoc(7) police: fixed markup, a little bit. 2001-07-11 08:36:26 +00:00
ru
0758106616 mdoc(7) police: fixed markup any numerous typos. 2001-07-11 08:35:34 +00:00
ru
29353320f4 mdoc(7) police: removed punctuation after the last SEE ALSO xref. 2001-07-10 18:00:19 +00:00
obrien
f7ff2865ef style nits 2001-07-10 17:48:07 +00:00
markm
9e3fb9a2ce 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
ecbb298b07 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
ru
940dc0c680 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
obrien
6c92db5963 MFS: add the FreeBSD history. 2001-07-10 00:12:50 +00:00
obrien
b44d306aaa Give the FreeBSD history also. 2001-07-10 00:11:00 +00:00
obrien
6aa8907844 style nit 2001-07-09 23:12:23 +00:00
tobez
ba096e7080 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
b93e321e4a 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
88481e2817 Bump the major number. The libraries API has changed incompatibly. 2001-07-09 18:16:33 +00:00
markm
ce40061f63 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
c1b5c1af3a 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
b4bc00b9ce Axe S/Key. OPIE is the legal successor. 2001-07-09 17:52:34 +00:00
ru
ae06dbeeb4 mdoc(7) police: eliminate -ww warnings. 2001-07-09 15:54:36 +00:00
dd
978810079e mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
brian
34ad3e29c4 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
757dd1764a Handle shemeless, hostless URLs correctly. 2001-07-08 15:59:15 +00:00
mikeh
f5470d0455 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
884f4c52f0 mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2). 2001-07-06 16:46:48 +00:00
ru
41797d793c mdoc(7) police: fixed formatting. 2001-07-06 07:29:59 +00:00
ru
aee3c7d3da mdoc(7) police: fixed markup and typo. 2001-07-05 11:24:26 +00:00
yar
20160f2e98 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
5ca1a122bf mdoc(7) police: added missing newline after .Dv macro call,
removed hard sentence breaks.
2001-07-04 12:39:22 +00:00
ru
7bc2aa069c mdoc(7) police: use .Rv -std. 2001-07-04 12:32:43 +00:00
ru
891aecc820 mdoc(7) police: mark NULL with .Dv. 2001-07-04 12:04:25 +00:00
ru
7ced5fbc6b mdoc(7) police: fixed/simplified formatting. 2001-07-04 11:59:14 +00:00
ru
a15d9a775b mdoc(7) police: sort xrefs. 2001-07-04 11:02:10 +00:00
ru
6faa17b0cf mdoc(7) police: print some example text with literal font. 2001-07-04 10:59:30 +00:00
ru
e3d8945908 mdoc(7) police: fixed bugs in rev. 1.19, split section headers names. 2001-07-04 10:53:15 +00:00
ru
6ba49a5fe2 mdoc(7) police: compact VFCF_ list. 2001-07-04 10:42:03 +00:00
mjacob
c93073bc36 Make sure you don't have a file descriptor leak for the 'real'
underlying CAM device. This needs to be checked not only in
the open routine, but the device->fd has to be initialized
as well.

PR:		28688
Submitted (partially) by:	T. William Wells <bill@twwells.com>
MFC after:	2 weeks
2001-07-04 07:43:10 +00:00
dd
0317595065 Describe the condition when EACCES is returned more explicitly.
Submitted by:	bde
2001-07-04 06:29:36 +00:00
dd
d20dc39998 mdoc(7) police: fix spacing issue
Submitted by:	ru
2001-07-03 21:16:34 +00:00
yar
bbacc45e20 First, fix a leftover of the cut'n'paste from the kld* pages:
change the name of the page (.Nm) from "kldstat" to "modstat".
Second, don't claim that modstat(2) always returns 0. Actually,
it behaves as most syscalls do - returns 0 on success, or -1
on failure.

MFC after:	5 days
2001-07-03 14:56:08 +00:00
dd
2b4a46319e EACCES may be returned if write permission was denied as well.
PR:		28553
Submitted by:	Ronald F. Guilmette <rfg@monkeys.com>
2001-07-02 22:53:40 +00:00
mikeh
68aff2218c Reset errno so that subsequent TFTP requests don't fail after the
first failure.

PR:		misc/25502
MFC after:	2 weeks
2001-06-30 21:39:09 +00:00
deischen
8ca2a5a3c2 Clear the in thread scheduler flag after jumping to the start of
a signal handler from the scheduler.

MFC after:	1 week
2001-06-29 17:09:07 +00:00
dd
2832d76308 Fix a one-byte overrun.
PR:		28472
Submitted by:	David Xu <davidx@viasoft.com.cn>
Obtained from:	OpenBSD
2001-06-28 21:50:53 +00:00
dd
ffff6de4be getcwd(3) is defined by POSIX, not ISO C.
Approved by:	bde
2001-06-28 19:27:02 +00:00
dd
5c6c06824a Document the existing vfc_flags.
PR:		25837
Submitted by:	Tony Finch <dot@dotat.at>
2001-06-28 06:50:19 +00:00
dd
28088a22e6 event.h -> sys/event.h
Submitted by:	David Hill <david@phobia.ms>
2001-06-27 19:55:57 +00:00
ru
eb1ec486b2 Fixed the brain-o in rev. 1.10: the logic check was reversed.
Reported by:	Bernd Fuerwitt <bf@fuerwitt.de>
2001-06-27 14:11:25 +00:00
jasone
411db152c0 Fix a race condition in pthread_join(). All of the following must occur
atomically:

1) Search _thread_list for the thread to join.
2) Search _dead_list for the thread to join.
3) Set the running thread as the joiner.

While we're at it, fix a race in the case where multiple threads try to
join on the same thread.  POSIX says that the behavior of multiple joiners
is undefined, but the fix is cheap as a result of the other fix.
2001-06-27 11:41:15 +00:00
gshapiro
1bade14028 Typo fix: requires -> reacquires
Submitted by:	Murray S. Kucherawy <msk@sendmail.com>
MFC after:	3 days
2001-06-27 06:01:17 +00:00
chris
a856aed5fa Remove an extra word "fo" in the sentence "there is no process whose
process ID equals fo pid".

PR:		28436
Submitted by:	Gregory Bond <gnb@itga.com.au>
2001-06-27 04:21:28 +00:00
ache
3eaa0fb4d6 Return "" if reallocf() fails 2001-06-25 20:56:59 +00:00
ache
05b8fd28dd Describe success return value 2001-06-25 20:50:06 +00:00
ache
a2c49c5199 Add transition period hack allowing old locale names return proper codeset too 2001-06-25 09:03:10 +00:00
dd
9f64d8bb22 Add RETURN VALUES and ERRORS sections. 2001-06-25 01:25:01 +00:00
dd
7864491bf1 Minor cleanup: sort includes, fix name. 2001-06-25 01:21:13 +00:00
dd
8bbd4f0856 Add a link to extattr.2 (from extattr_get_file.2). The other names
are too specific and too long, and extattr.2 makes a nice point of
reference for "extattr-related syscalls".
2001-06-24 23:58:27 +00:00
dd
6ae2ffbf18 Add a manual page for extattr_string_to_namespace and
extattr_namespace_to_string.

Reviewed by:	rwatson
2001-06-24 23:54:46 +00:00
dd
5d47a5c202 mdoc(7) police: the BUGS section should go after HISTORY and AUTHORS. 2001-06-24 20:58:20 +00:00
dd
249f484d9a The fact that phk wrote this is not a bug! 2001-06-24 20:56:39 +00:00
dd
0b677720fe Reword a sentence to make it proper English. 2001-06-24 18:11:42 +00:00
dd
520fa8f9e1 Remove duplicate words. 2001-06-24 01:34:38 +00:00
iedowse
5cd46d3c2d Add a new clnt_control() request `CLSET_CONNECT' that controls
whether or not connect(2) is used for UDP client sockets. The default
is not to connect(), so existing clients will see no change in
behaviour.

The use of connect(2) for UDP clients has a number of advantages:
only replies from the intended address are received, and ICMP errors
pertaining to the connection are reported back to the application.
2001-06-23 19:43:21 +00:00
ru
4275fcc778 Document "normalizing" behavior of mktime(3).
PR:		bin/28313
Reviewed by:	bde, wollman
MFC after:	1 week
2001-06-23 08:57:40 +00:00
jlemon
35dd1d9397 Bring in fix from rev 1.32 that got lost during the conversion to kqueue.
This prevents an indefinte timeout in case the kevent call is interrupted
for some reason.

PR: 26665
MFC in: 2 weeks
2001-06-23 06:54:28 +00:00
obrien
ce6a9c9437 Fix long lines. 2001-06-21 19:17:12 +00:00
obrien
a11983e962 Add libbz2 to provide Bzip2 capabilities to the system. 2001-06-21 19:16:17 +00:00
dd
a0c5f9eadf Fix a grammar bogon. 2001-06-20 22:03:10 +00:00
wollman
5ddedc79e5 Fix spelling of `errno' and add cross-references. 2001-06-18 22:26:31 +00:00
wollman
31c1a9a3c8 Document _SC_IOV_MAX. Add cross-references to pathconf(2), confstr(3), and
getconf(1).  This document still needs to be sorted and to have other missing
parameters described.
2001-06-18 22:18:08 +00:00
wollman
147677d01b After one too many PRs on the subject, bite the bullet and define IOV_MAX
and its associated constants.  Implement _SC_IOV_MAX in the usual way.
Be a bit sloppy about the namespace question; this should get cleared up
in time for 5.0.

MFC after:	1 month
2001-06-18 20:24:54 +00:00
dwmalone
c9b2903f2e If the username we are trying to look up in the db files won't fit into
the buffer then act like it doesn't exist. The buffer is always big enough
for any valid username.

PR:		27860
Reviewed by:	nectar
2001-06-18 16:09:24 +00:00
assar
497731cb88 (cantwrite): do not allocate memory for a NULL string
PR:		misc/26044

MFC after:	1 week

Submitted by:	bde
2001-06-18 04:44:23 +00:00
assar
4f98a66fa0 revert freeing of memory that gets allocated when str == NULL
(this will be fixed in a better way)

PR:		misc/26044
2001-06-18 04:40:52 +00:00
mikeh
72fb91578e Fix typo: clnt_destroy() only takes one arg.
MFC after:	2 weeks
2001-06-18 00:45:31 +00:00
assar
40817488b6 free memory that gets allocated by vfprintf when str == NULL
PR:		misc/26044

MFC after:	1 week
2001-06-16 05:37:57 +00:00
peter
c63ece0227 Fix libpam's linker set stuff to use the new API (unbreak world), and get
rid of gensetdefs from here as well.
2001-06-14 01:13:30 +00:00
chris
9c24b707de Convert to mdoc(7). 2001-06-13 21:52:07 +00:00
schweikh
d320c13f69 Add description for the 'll' modifier for long long. In essence a copy
from the 'l' description with s/long/long long/g.

PR:		27017
Submitted by:	Guy Harris <guy@alum.mit.edu>
MFC after:	2 weeks
2001-06-13 19:05:12 +00:00
ru
9eb05f6688 Added skeleton <complex.h> (aligned with the POSIX.1-200x), mostly
to fix the "-nostdinc WARNS=X" breakage caused by broken prototypes
for cabs() and cabsl() in <math.h>.

Reimplemented cabs() and cabsl() using new complex numbers types and
moved prototypes from <math.h> to <complex.h>.
2001-06-13 15:16:30 +00:00
ru
07f854c918 Complete prototype for fts_compar. 2001-06-13 14:59:57 +00:00
peter
e0728b6faa Turn on the extra 'const' settings for various curses functions. While
this is not strictly compliant with XSI curses, it enables us to pass
const strings to many more functions that are actually const safe than
before.  This should be harmless.

Requested by:  lots of folks
2001-06-12 01:14:02 +00:00
iedowse
3ea1a25ac3 Make the non-threaded stub for pthread_sigmask() a no-op instead
of calling sigprocmask(). This matches the behaviour of thr_sigsetmask()
on Solaris; _pthread_sigmask_stub was added purely for compatibility
with Solaris (for TI-RPC), so it might as well do the same thing.

This fixes the problem where client RPC calls ignored all signals
for the complete duration of the RPC. This behaviour is currently
necessary in the threaded case due to locking issues, but was never
intended to occur in non-threaded programs.

Reviewed by:	deischen
2001-06-11 23:18:22 +00:00
jlemon
910ead8806 Fix small bogon.
Submitted by: Anton Berezin <tobez@tobez.org>
2001-06-11 18:15:31 +00:00
des
dbb579f438 Don't call _ftp_closefn() upon EOF in _ftp_readfn(); just return 0. This
fixes a bug in pkg_add(1) (which nobody noticed because of another bug).
2001-06-11 14:12:46 +00:00
ume
0a280413cc Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks
2001-06-11 12:39:29 +00:00
ache
a8b142cad8 Handle "ASCII" and "US-ASCII" aliases 2001-06-10 23:22:31 +00:00
ume
e2940c4b32 Implement EDNS0 support, as EDNS0 support will be made mandatory for
IPv6 transport-ready resolvers/DNS servers.  Need careful configuration
when enable it. (default config is not affected).
See manpage for details.

XXX visible symbol __res_opt() is added, however, it is not supposed to be
called from outside, libc minor is not bumped.

Obtained from:	KAME/NetBSD
2001-06-10 20:25:24 +00:00
sobomax
0c46f859de Fix cross-references:
xntpd.8 --> ntpd.8
acl_delete_perms.3 --> acl_delete_perm.3
getname.2 --> getsockname.2

MFC after:	1 week
2001-06-10 12:06:54 +00:00
dd
5cefbb92f6 Xref dladdr(3).
Requested by:	-hackers
2001-06-08 22:50:33 +00:00
sobomax
b009fce00b Create curs_termcap.3 --> termcap.3 MLINK, so many manpages in our tree that
reference to termcap.3 will not be pointing to nowhere.

MFC after:	1 week
2001-06-07 17:27:44 +00:00
sobomax
ce72d4ae8d Correct cross-reference:
portmap.8 --> rpcbind.8

Submitted by:	.Xr testing script
2001-06-07 16:59:19 +00:00
ru
d9614c011a s/format/byte order/ (for clarity). 2001-06-07 15:15:38 +00:00
dd
9c768350d2 urandom(4) -> random(4) in comments.
PR:		27858
Submitted by:	Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
Reviewed by:	md5(1)
Approved by:	markm
2001-06-07 02:32:18 +00:00
dd
001f69c69f urandom(4) -> random(4)
PR:		27858
Submitted by:	Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
Approved by:	markm
2001-06-07 02:31:03 +00:00
imp
3cf6d9eec0 Back out my changes describing how snprintf nul terminates. It
was from the iso standard.  Keep the sentence that says it is always
NUL terminated to make sure that people understand that.

Requested by: bde
2001-06-05 23:39:45 +00:00
wollman
f3e9e598b4 Don't mung the user's tm_sec field if we don't need to. (Belt-and-suspenders
version.)

PR:		bin/27630
Submitted by:	Arthur David Olson <ado@nci.nih.gov>
Obtained from:	Timezone mailing-list <tz@elsie.nci.nih.gov>
MFC after:	1 month
2001-06-05 20:13:28 +00:00
imp
f066b7149b I neglected to notice that the change text had already been added in a
different place. Back out what I added since the other text is better.

Noticed by: nectar
2001-06-05 16:43:51 +00:00
sobomax
96f3035fa9 Correct cross-references:
ng_bpf.8    --> ng_bpf.4
  ng_ether.8  --> ng_ether.4
  ng_iface.8  --> ng_iface.4
  ng_pppoe.8  --> ng_pppoe.4
  ng_socket.8 --> ng_socket.4
  ng_tty.8    --> ng_tty.4
  ng_{type}.4 --> /dev/null

MFC after:	1 week
2001-06-05 12:40:03 +00:00
sobomax
a4b0eda744 Fix cross-references:
ipnat.8 --> ipnat.1
  environ.5 --> environ.7
  isssetugid.2 --> issetugid.2

MFC after:	1 week
2001-06-05 12:23:22 +00:00
imp
cec18f8669 Document what happens when the real id is changed.
I may have obtained this from NetBSD, but I don't recall.  I do know that
I checked FreeBSD's implementation to make sure that it matched what I wrote.
2001-06-05 04:35:42 +00:00
imp
9bbe00c7d5 Minor improvements:
o Explain snprintf's return value better.
o Document snprintf, et al, were defined in C-99
o Warn against %n.
2001-06-05 04:22:30 +00:00
dd
a9077821e8 Add a missing word.
Obtained from:	OpenBSD
2001-06-05 00:25:18 +00:00
dd
dd60308815 Add a missing word. 2001-06-05 00:11:08 +00:00
markm
77233476e7 Big module cleanup.
Move common stuff into Makefile.inc, and tidy up all the Makefiles
as a result.

Build new modules.

Put a commented-out dependancy on libpam for the (shared) modules.
I can't bring this in just yet, as the dependancy (modules->libpam)
is reversed for the static case (libpam->modules).
2001-06-04 19:47:56 +00:00
markm
737cbfc79b Null file to bring back a file from the dead. This allows the real commit
to happen remotely. Damn CVS bugs :-(
2001-06-04 19:25:41 +00:00
markm
c544d8599d Add the "nullok" option that causes this module to succeed if the Unix
password is empty/null.
2001-06-04 19:16:57 +00:00
markm
2c97bd3512 Tidy up the options list (and make it more extendable), and add some
extra "standard" options.
2001-06-04 19:12:08 +00:00
markm
b35df77393 Add some new utility authenticators.
pam_securetty silently succeeds if the user is on a secure tty
as defined by /etc/ttys.

pam_ftp does "anonymous ftp" style authentication with options for
specifying the anonymous user(s).
2001-06-04 18:44:47 +00:00
brian
c7f4c36673 Add BSD-style copyright headers
Approved by: Charles Mott <cmott@scientech.com>
2001-06-04 15:09:51 +00:00
brian
9f3b881d27 Change to a standard BSD-style copyright
Approved by:	Atsushi Murai <amurai@spec.co.jp>
2001-06-04 14:52:17 +00:00
deischen
9acb319fb8 Properly initialize a temporary FILE that is allocated off the stack.
The change to reuse _up from FILE (to allow FILE to grow without changing
size) overlooked FILE being allocated off the stack.

Approved by:	sobomax
2001-06-04 12:36:07 +00:00
tmm
61feb98bff Change this to support the new way swap device information is exported
via sysctl, and clean up some style and (size_t != int) issues.
2001-06-01 22:57:07 +00:00
kris
ab13aa20a5 Fix another unprotected instance of chdir() by extending the
fts_safe_changedir() function and using that instead for both of the
chdir()s.

Partially submitted by:	Todd Miller <millert@OpenBSD.org>, bde
2001-06-01 21:53:50 +00:00
iedowse
245048f546 Copy the sockaddr from the netbuf data area, not from the netbuf
data pointer. This bug has been here since the ti-rpc import; it
apparently broke the clnt_control CLGET_SVC_ADDR options.

PR:		misc/27813
Submitted by:	Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
2001-06-01 15:20:45 +00:00
ru
21147a3118 Remove vestiges of MFS. 2001-06-01 10:07:28 +00:00
gshapiro
3e186c29bb Correct the documentation for snprintf() and vsprintf() which actually
return the number of characters that would have been in the new string.

Obtained from:	OpenBSD
MFC after:	3 days
2001-05-30 23:47:14 +00:00
kris
4c5a7a4c38 When doing the chdir("..") in the !FTS_NOCHDIR case, stat() after we get
there and compare the inode and device numbers to the values we remember,
to guard against the directory having been moved around in the meantime.

Reported by:	Nick Cleaton <nick@cleaton.net>
2001-05-30 20:35:44 +00:00
ru
1c15b88da9 Add an integer field to keep protocol-specific flags with links.
For FTP control connection, keep the CRLF end-of-line termination
status in there.

Fixed the bug when the first FTP command in a session was ignored.

PR:		24048
MFC after:	1 week
2001-05-30 14:24:35 +00:00
sos
d961fb67cb Dont free a hard code array.
PR 20569
2001-05-30 07:51:56 +00:00
msmith
8a90fb059e Correct the returned UDP datagram length. See the PR for a more comprehensive
description of the fix.

PR:		misc/25503
Submitted by:	Jim Browne <jbrowne@jbrowne.com>
MFC after:	1 week
2001-05-28 22:27:06 +00:00
msmith
47c7b2f211 The shortest valid TFTP packet is 4 bytes, not 8.
PR:		misc/25503
Submitted by:	Jim Browne <jbrowne@jbrowne.com>
MFC after:	1 week
2001-05-28 22:25:44 +00:00
des
012a472bf5 Implement a HTTP_USER_AGENT environment variable.
PR:		27669
Submitted by:	Eoin Lawless <eoin@maths.tcd.ie>
2001-05-27 11:00:36 +00:00
des
f21716e726 Document the authentication callback interface.
Update RFC references (should have done that ages ago...)
2001-05-26 19:38:34 +00:00
des
d4a0e8a5aa Bump major number. 2001-05-26 19:37:26 +00:00
des
6ebe7713d6 Add rudimentary support for an authentication callback function. 2001-05-26 19:37:15 +00:00
des
f74bd9ef7f MAXPATHLEN -> PATH_MAX 2001-05-26 19:36:49 +00:00
des
613c2fe91b Plug memory leak.
PR:		27506
2001-05-26 17:23:38 +00:00
ru
f94bdbba2f - sys/n[tw]fs moved to sys/fs/n[tw]fs
- /usr/include/n[tw]fs moved to /usr/include/fs/n[tw]fs
2001-05-26 11:57:45 +00:00
eric
083ceb5a80 Add warnings about trusting user-supplied data.
Reviewed by:	ru
Approved by:	murray
Obtained from:	OpenBSD
2001-05-25 20:42:40 +00:00
rwatson
0283388af8 o Merge contents of struct pcred into struct ucred. Specifically, add the
real uid, saved uid, real gid, and saved gid to ucred, as well as the
  pcred->pc_uidinfo, which was associated with the real uid, only rename
  it to cr_ruidinfo so as not to conflict with cr_uidinfo, which
  corresponds to the effective uid.
o Remove p_cred from struct proc; add p_ucred to struct proc, replacing
  original macro that pointed.
  p->p_ucred to p->p_cred->pc_ucred.
o Universally update code so that it makes use of ucred instead of pcred,
  p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo,
  cr_{r,sv}{u,g}id instead of p_*, etc.
o Remove pcred0 and its initialization from init_main.c; initialize
  cr_ruidinfo there.
o Restruction many credential modification chunks to always crdup while
  we figure out locking and optimizations; generally speaking, this
  means moving to a structure like this:
        newcred = crdup(oldcred);
        ...
        p->p_ucred = newcred;
        crfree(oldcred);
  It's not race-free, but better than nothing.  There are also races
  in sys_process.c, all inter-process authorization, fork, exec, and
  exit.
o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid;
  remove comments indicating that the old arrangement was a problem.
o Restructure exec1() a little to use newcred/oldcred arrangement, and
  use improved uid management primitives.
o Clean up exit1() so as to do less work in credential cleanup due to
  pcred removal.
o Clean up fork1() so as to do less work in credential cleanup and
  allocation.
o Clean up ktrcanset() to take into account changes, and move to using
  suser_xxx() instead of performing a direct uid==0 comparision.
o Improve commenting in various kern_prot.c credential modification
  calls to better document current behavior.  In a couple of places,
  current behavior is a little questionable and we need to check
  POSIX.1 to make sure it's "right".  More commenting work still
  remains to be done.
o Update credential management calls, such as crfree(), to take into
  account new ruidinfo reference.
o Modify or add the following uid and gid helper routines:
      change_euid()
      change_egid()
      change_ruid()
      change_rgid()
      change_svuid()
      change_svgid()
  In each case, the call now acts on a credential not a process, and as
  such no longer requires more complicated process locking/etc.  They
  now assume the caller will do any necessary allocation of an
  exclusive credential reference.  Each is commented to document its
  reference requirements.
o CANSIGIO() is simplified to require only credentials, not processes
  and pcreds.
o Remove lots of (p_pcred==NULL) checks.
o Add an XXX to authorization code in nfs_lock.c, since it's
  questionable, and needs to be considered carefully.
o Simplify posix4 authorization code to require only credentials, not
  processes and pcreds.  Note that this authorization, as well as
  CANSIGIO(), needs to be updated to use the p_cansignal() and
  p_cansched() centralized authorization routines, as they currently
  do not take into account some desirable restrictions that are handled
  by the centralized routines, as well as being inconsistent with other
  similar authorization instances.
o Update libkvm to take these changes into account.

Obtained from:	TrustedBSD Project
Reviewed by:	green, bde, jhb, freebsd-arch, freebsd-audit
2001-05-25 16:59:11 +00:00
markm
2692ad8b80 Add the "auth_as_self" option to the pam_unix module (there is no
reason not to add it to others later). This causes the pam_unix
module to check the user's _own_ password, not the password of the
account that the user is authenticating into. This will allow eg:
WHEELSU type behaviour from su(1).
2001-05-24 18:35:52 +00:00
obrien
4770a03553 Make the rcsid and FreeBSD IDs more sane in the wcs* and wmem* files.
Do the same for the non-wcs*/wmem* files while I'm here.
2001-05-24 08:47:42 +00:00
dillon
3c2db1e9b3 This patch implements O_DIRECT about 80% of the way. It takes a patchset
Tor created a while ago, removes the raw I/O piece (that has cache coherency
problems), and adds a buffer cache / VM freeing piece.

Essentially this patch causes O_DIRECT I/O to not be left in the cache, but
does not prevent it from going through the cache, hence the 80%.  For
the last 20% we need a method by which the I/O can be issued directly to
buffer supplied by the user process and bypass the buffer cache entirely,
but still maintain cache coherency.

I also have the code working under -stable but the changes made to sys/file.h
may not be MFCable, so an MFC is not on the table yet.

Submitted by:	tegge, dillon
2001-05-24 07:22:27 +00:00
des
77f557c36e Add some error codes that were added in RFC2616. 2001-05-23 18:52:02 +00:00
pirzyk
5b553b252b Changed the clnt_perror string in yp_all because it was saying the
error came from yp_next

PR:	bin/13254
Submitted by:	Jim Pirzyk
Reviewed by:	jkh
MFC after: 1 week
2001-05-23 15:37:10 +00:00
ru
6b1278c213 Rename (after a repo-copy) some mount(8) programs:
mount_fdesc -> mount_fdescfs
mount_null -> mount_nullfs
mount_portal -> mount_portalfs
mount_umap -> mount_umapfs
mount_union -> mount_unionfs
2001-05-23 14:58:19 +00:00
ru
40140a0298 Fix the range of the returned value.
PR:		docs/27446
Submitted by:	Tadayuki OKADA <tadayuki@mediaone.net>
2001-05-23 12:37:50 +00:00
ume
9aa02693c5 Correct error message of an example.
Obtained from:	KAME
2001-05-21 10:05:36 +00:00
jasone
fc9061ec2e Add a test for PR 24345. 2001-05-20 23:12:13 +00:00
jasone
dc406573b7 Update the verify script. 2001-05-20 23:11:54 +00:00
jasone
41a8cb1b64 Don't define _REENTRANT, since the Makefile does so. 2001-05-20 23:11:09 +00:00
jasone
cfb7910709 Fix a typo. 2001-05-20 23:10:30 +00:00
jasone
6cc04cceb5 Instead of using a join queue for each thread, use a single pointer to
keep track of a joiner.  POSIX only supports a single joiner, so this
simplification is acceptable.

At the same time, make sure to mark a joined thread as detached so that
its resources can be freed.

Reviewed by:	deischen
PR:		24345
2001-05-20 23:08:33 +00:00
ru
e4860a0920 Removed -I${.CURDIR}/../../sys from CFLAGS. 2001-05-20 12:45:53 +00:00
archie
010753bb40 Document ECONNREFUSED.
Submitted by:	Richard Hodges <rh@matriplex.com>
2001-05-20 00:12:06 +00:00
sobomax
8d1e29d68f Use CONS_GETINFO ioctl to get geometry of the current text mode instead of
TIOCGWINSZ. The former is more correct in this context.
2001-05-19 17:05:52 +00:00
obrien
a86d57ec1b Remove these libs that are the same .so version as the ones in
5-CURRENT.  These libs will not be used [sitting in /usr/lib/compat] as
the -current ones in /usr/lib will be found first by ld-elf.so.1.
2001-05-19 05:54:11 +00:00
obrien
1d11bbf07a Remove these libs that are the samed .so version as the ones in
5-CURRENT.  These libs will not be used [sitting in /usr/lib/compat] as
the -current ones in /usr/lib will be found first by ld-elf.so.1.
2001-05-19 05:53:50 +00:00
obrien
dd499026ff Update the AXP compat4x dist to the 4.3-FreeBSD libs.
There were some security issues fixed between 4.2 -> 4.3.
2001-05-19 01:32:36 +00:00
obrien
717da9e4d0 Update the i386 compat4x dist to the FreeBSD 4.3 libs.
There were some security issues fixed between 4.2 -> 4.3.
2001-05-19 01:20:02 +00:00
iedowse
c6a2d330d8 The function clnt_dg_call(), which is used for UDP RPC calls, could
accidentally clobber the server address if a stray packet arrived
at the client port. This would result in any further retransmits
going to the wrong address.

For now, fix this by not saving the source address of the reply; this
matches the pre-tirpc behaviour.
2001-05-18 19:43:18 +00:00
ru
136b4e514b Removed -I${.CURDIR}/.../sys from CFLAGS. 2001-05-18 13:41:42 +00:00
ru
1a44b91454 Fixed typo in the description.
PR:		docs/27411
Submitted by:	David Wimsey <dwimsey@rtci.com>
2001-05-18 06:56:03 +00:00
obrien
a6264bb8eb Sort. 2001-05-18 05:05:50 +00:00
obrien
4f92660dbc Add the "prompt" and "passwd_prompt" fields to /etc/login.conf,
which makes lgoin more like getty in its ability to be configured.

Submitted by:	tlambert (code only)
2001-05-18 04:55:16 +00:00
obrien
42b2dffca4 Use the correct FreeBSD definitions for wint_t and wchar_t. 2001-05-18 00:41:27 +00:00
jasone
cbe4cb8f95 Condition variable waiters are queued in descending priority order, so
there is no need to wake all waiters to assure that the highest priority
thread is run.  As the semaphore code is written, there was no correctness
problem, but the change improves sem_post() performance.

Pointed out by:	deischen
2001-05-18 00:36:05 +00:00
ru
79f6b4c4a3 Suppress compiler warning by adding a type cast. 2001-05-17 12:51:43 +00:00
peter
e5370521ae Argh. Fix a long-standing man page filter botch. See terminfo(5) for
the effect.
2001-05-17 08:48:26 +00:00
peter
e2aacb5988 Update for ncurses 5.2-20010512 import 2001-05-17 08:30:09 +00:00
ru
cf0d45ec61 ... but we do provide .St -isoC-99, and it is not required to have the
history info as:

: .Sh STANDARDS   If the command, library function or file adheres to a
:                 specific implementation such as IEEE Std 1003.2
:                 (``POSIX.2'') or ANSI X3.159-1989 (``ANSI C'') this
:                 should be noted here.  If the command does not adhere
:                 to any standard, its history should be noted in the
:                 HISTORY section.
2001-05-17 08:22:43 +00:00
jasone
3f0d8ce9f7 Mark a thread that is suspended while sleeping as interrupted. 2001-05-16 21:58:45 +00:00
ru
6113f8a162 Unbreak world; _DIAGASSERT macro is not available in FreeBSD. 2001-05-16 14:34:47 +00:00
ru
f6d873cab3 mdoc(7) police: fix markup. 2001-05-16 09:50:12 +00:00
dd
0db2bdb4c5 Introduce getprogname(3) and setprogname(3) library calls. These get
and set __progname, respectively.

Discussed on:	-arch (Feb 2001), -audit
Reviewed by:	-audit
Approved by:	kris
Obtained from:	(mostly) NetBSD
2001-05-15 23:41:01 +00:00
tshiozak
dffcea179a adapt to FreeBSD.
- enable locale-insensitive functions of wchar.h:
	wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c wcslcat.c wcslcpy.c
        wcslen.c wcsncat.c wcsncmp.c wcsncpy.c wcspbrk.c wcsrchr.c wcsspn.c
	wcsstr.c wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c
	XXX: wcswidth.c is not enabled yet.
- enable wmemchr(3) man page.
	XXX: FreeBSD lacks .St -isoC99 and .St -isoC-amd1.
2001-05-15 20:34:20 +00:00
ru
988c89f965 mdoc(7) police: sort xrefs. 2001-05-15 15:57:05 +00:00
ru
d197fc2a1d Add new, from scratch implementation of hsearch() et al that actually works.
Obtained from:	NetBSD
MFC after:	1 month
2001-05-15 07:08:20 +00:00
tshiozak
a018120564 initial import of locale insensitive wcs* and wmem* functions.
Obtained from:	NetBSD and Citrus.
2001-05-15 06:01:19 +00:00
ru
38f5df8a36 mdoc(7) police: add RETURN VALUES section.
PR:		docs/27161
Submitted by:	Kazuhiro KONDOU <k-fuji@za2.so-net.ne.jp>
2001-05-14 18:38:05 +00:00
dcs
cf1a24dc35 Replace functional bugs of ctypish functions in libstand with style
bugs.

reviewed by:	bde
MFC after:	1 week
2001-05-14 16:49:20 +00:00
markm
3248168206 Bring in a few useful PAM modules.
pam_krb5 is a Kerberos 5 (Heimdal) authentication module.

pam_nologin checks for /etc/nologin and does the "usual stuff"
	if it is found, otherwise it silently succeeds.

pam_rootok silently succeeds if the user is root, otherwise
	it fails.

pam_wheel silently succeeds if the user is a member of group
	"wheel" (or another nominated group), and fails
	otherwise.

There is an issue with kerberosIV and kerberos5 - if both are
being built, then static linking fails with duplicate symbols.
This will take a bit of work to sort out in the kerberii.
2001-05-14 11:23:58 +00:00
jkh
f235bbf938 + add u_long sector_size to struct disk (documented in libdisk.3)
+ make Open_Disk sense the sector size by trying 512, 1024 and 2048
  in this order. This makes the kernel note that
  dscheck(cd1): bio_bcount 512 is not on a sector boundary (ssize 2048)
  dscheck(cd1): bio_bcount 1024 is not on a sector boundary (ssize 2048)
  if 2048 is the sector size. If this worries anyone: the message is from
  /usr/src/sys/kern/subr_diskslice.c and shutups are to be placed there.
+ Have read_block and write_block use an additional parameter, the
  sector size.
+ replace all barfout calls with return NULL, 0, __LINE__, etc.
  Note that this does NOT emit diagnostics. More often than not,
  you don't want library functions to scribble on stderr -- it may
  not even be available. The right thing is to propagate the error
  condition to upper management. The app should take care of errors.
+ use d1->sector_size instead of 512 in various places. I've left many
  places untouched, especially those writing MBRs. I simply added
  another arg hardcoded as 512. This is because I would not know what
  I'm doing... I felt this approach would be reasonably backward
  compatible and not introduce any new bugs in critical software.
  Famous last words. Messing with MBRs might soon put me in the same
  screwup meister category as, uh, never mind.  :-)
+ bump the max no of disks from 20 to 32 (due to PR 24503).

PR:		8434 / 8436 / 24503
Submitted by:	Jens Schweikhardt <schweikh@schweikhardt.net>
2001-05-13 20:08:54 +00:00
iedowse
e25ecbb313 Extract the path from an AF_LOCAL sockaddr_un in a way that correctly
terminates the string in all cases, based on code from netstat(1).
The path in a sockaddr_un is terminated either by a '\0', or by
the end of the sockaddr as defined by sun_len.

Previously, the code could write the "safety" '\0' beyond the end
of the sockaddr (sockaddr_un's need only be large enough to store
sun_len bytes), and writing into the the supplied sockaddr is bad
anyway.
2001-05-12 20:05:26 +00:00
alex
bda46a56dc gethostbyname2() can't do AF_INET6 lookups over NIS.
getaddrinfo(3) must be used.

Submitted by:	ume
2001-05-08 11:21:15 +00:00
jedgar
1029ab931d Correct prototype (entry_p -> *entry_p)
Submitted by:	Alex Zepeda <jazepeda@pacbell.net>
2001-05-07 23:16:25 +00:00
knu
cd24ba513e Properly copy the P_ALTSTACK flag in struct proc::p_flag to the child
process on fork(2).

It is the supposed behavior stated in the manpage of sigaction(2), and
Solaris, NetBSD and FreeBSD 3-STABLE correctly do so.

The previous fix against libc_r/uthread/uthread_fork.c fixed the
problem only for the programs linked with libc_r, so back it out and
fix fork(2) itself to help those not linked with libc_r as well.

PR:		kern/26705
Submitted by:	KUROSAWA Takahiro <fwkg7679@mb.infoweb.ne.jp>
Tested by:	knu, GOTOU Yuuzou <gotoyuzo@notwork.org>,
		and some other people
Not objected by:	hackers
MFC in:		3 days
2001-05-07 18:07:29 +00:00
green
5971974891 Finish disconnecting pam_ssh from the build. 2001-05-04 20:40:53 +00:00
deischen
ab1511e172 Move the check for a pending signals to after the thread has been
placed in any scheduling queue(s).  The process of dispatching
signals to a thread can change its state which will attempt to add
or remove the thread from any scheduling queue to which it belongs.
This can break some assertions if the thread isn't in the queue(s)
implied by its state.

When adding dispatching a pending signal to a thread, be sure to
remove the signal from the threads set of pending signals.

PR:		27035
Tested by:	brian
MFC in:		1 week
2001-05-04 20:37:07 +00:00
green
900a48dd5b I've been meaning to take pam_ssh out of the base system for a while now.
Finally do it.
2001-05-04 03:53:48 +00:00
phantom
e28aa6e470 add nl_langinfo(3) 2001-05-03 15:12:52 +00:00
phantom
a5e7438be9 Eliminate BUGS section. No one of listed bugs is applicable to FreeBSD-current
anymore.
2001-05-03 15:05:16 +00:00