Commit Graph

9913 Commits

Author SHA1 Message Date
ru
2d942f188d Commenting out WARNS actually brought it up to 4. 2005-09-28 14:36:16 +00:00
des
6e08585cef Comment out WARNS, the OpenSSL headers don't compile cleanly on some platforms. 2005-09-28 06:23:47 +00:00
des
95277118f4 Increase WARNS. 2005-09-26 20:34:09 +00:00
des
343777dab2 Correct the logic for determining whether the user has already entered
a password.  Also, work around some harmless type pun warnings.

MFC after:	3 days
2005-09-26 20:33:53 +00:00
keramida
5b312e287b minor style.Makefile(5) fixes:
- WARNS before CFLAGS
- CFLAGS -DXXX before -IXXX

Approved by:	ru
2005-09-26 06:23:43 +00:00
kientzle
7326792e21 signed/unsigned fixes (thanks to GCC4) and a few related minor style corrections. 2005-09-24 21:15:00 +00:00
brian
07adfc3d98 Modify the code path of the ifdef NOTYET part of _kse_single_thread():
o  Don't reinitialise the atfork() handler list in the child.  We
   are meant to call the child handler, and on subsequent fork()s
   should call all three functions as normal.
o  Don't reinitialise the thread specific keyed data in the
   child after a fork.  Applications may require this for context.
o  Reinitialise curthread->tlflags after removing ourselves from
   (and reinitialising) the various internal thread lists.
o  Reinitialise __malloc_lock in the child after fork() (to balance
   our explicitly taking the lock prior to the fork()).

With these changes, it is possible to enable the NOTYET code in
thr_kern.c to allow the use of non-async-safe functions after
fork()ing from a threaded program.

Reviewed by:	Daniel Eischen <deischen@freebsd.org>
[_malloc_lock reinitialisation has since been moved to avoid polluting the
!NOTYET code]
2005-09-24 01:19:53 +00:00
des
01dcf64138 Do not use passphraseless keys for authentication unless the nullok
option was specified.

PR:		bin/81231
Submitted by:	"Daniel O'Connor" <doconnor@gsoft.com.au>
MFC after:	3 days
2005-09-22 05:35:24 +00:00
des
4ee54de329 Narrow the use of user credentials.
Fix one case where openpam_restore_cred() might be called twice in a row.

MFC after:	3 days
2005-09-21 16:08:40 +00:00
kientzle
0fd9f664d7 In archive_read_open(), do not set the internal archive state to
"HEADER" unless the open is successful.  Instead, leave the state as
"NEW."  In particular, if archive_read_open() fails, a subsequent call
to archive_read_next_header() will now cause an explicit assertion
failure instead of a silent segmentation fault.

This may need a little more work to fully realize the intention: If
archive_read_open() fails, you should be able to call it again on the
same archive handle to open a different archive (or the same archive
using a different mechanism).
2005-09-21 04:48:52 +00:00
kientzle
dcb8de96ab Add a lot of error checks, based on the patches provided by Dan Lukes.
Also fixes a memory leak reported by Andrew Turner.

PR: bin/83476
Thanks to: Dan Lukes, Andrew Turner
2005-09-21 04:25:06 +00:00
kientzle
3876bcf2d0 Correct the documentation for archive_read_data_into_buffer()
Thanks to: Marcus Alves Grando
PR: docs/85854
MFC after: 7 days
2005-09-20 17:48:57 +00:00
cperciva
a257862d4b When (re)allocating space for an array of pointers to char, use
sizeof(*list), not sizeof(**list).  (i.e., sizeof(pointer) rather than
sizeof(char)).

It is possible that this buffer overflow is exploitable, but it was
added after RELENG_5 forked and hasn't been MFCed, so this will not
receive an advisory.

Submitted by:	Vitezslav Novy
MFC after:	1 day
2005-09-19 18:43:11 +00:00
bde
41d865435a Fixed aliasing bugs in TRUNC() by using the fdlibm macros for access
to doubles as bits.  fdlibm-1.1 had similar aliasing bugs, but these
were fixed by NetBSD or Cygnus before a modified version of fdlibm was
imported in 1994.  TRUNC() is only used by tgamma() and some
implementation-detail functions.  The aliasing bugs were detected by
compiling with gcc -O2 but don't seem to have broken tgamma() on i386's
or amd64's.  They broke my modified version of tgamma().

Moved the definition of TRUNC() to mathimpl.h so that it can be fixed
in one place, although the general version is even slower than necessary
because it has to operate on pointers to volatiles to handle its arg
sometimes being volatile.  Inefficiency of the fdlibm macros slows
down libm generally, and tgamma() is a relatively unimportant part of
libm.  The macros act as if on 32-bit words in memory, so they are
hard to optimize to direct actions on 64-bit double registers for
(non-i386) machines where this is possible.  The optimization is too
hard for gcc on amd64's, and declaring variables as volatile makes it
impossible.
2005-09-19 11:28:19 +00:00
imura
7b4e5c25c9 Connect smbfs build on powerpc. 2005-09-19 08:13:43 +00:00
ache
470e1e4236 Just by allocating size*2 bytes we can't be sure that new size will be enough,
so change two
	if (size not enough) {
		reallocf(size*2);
	}
into
	while (size not enough) {
		reallocf(size*2);
	}
2005-09-18 17:50:58 +00:00
brueffer
b3810218d9 Use the correct function name as .Nm argument.
PR:		86169
Submitted by:	Toby Peterson <toby@apple.com>
MFC after:	3 days
2005-09-18 15:40:03 +00:00
pjd
c71407b589 Pidfiles should be created with permission preventing users from opening
them for reading. When user can open file for reading, he can also
flock(2) it, which can lead to confusions.

Pointed out by:	green
2005-09-16 11:24:28 +00:00
ache
64235b259f Cosmetic fixes to prev. commit.
Change first MAXPATHLEN to more standard PATH_MAX
Change second MAXPATHLEN to 1024 (it is temp buffer not related)
Change comment to reflect that.

Suggested by:   bde
2005-09-15 17:25:52 +00:00
ache
662afafc67 Remove any hardcoded assumptions about malloc's way of allocating,
just use MAXPATHLEN. It prevents potential buffer overflow with other
malloc implementations.
(this change based on submitted patch)

PR:             86135
Submitted by:   Trevor Blackwell <tlb@tlb.org>
2005-09-14 20:35:46 +00:00
ache
973ad4fc35 Don't reuse *pl to skip [], it is already used for {} parts in the loop above
(submitted patch slightly modified)

PR:             86038
Submitted by:   Gerd Rausch <gerd@juniper.net>
2005-09-14 19:14:32 +00:00
pjd
6a97e501a6 Correct type.
OK'ed by:	cperciva
2005-09-14 10:42:51 +00:00
das
665ea151e9 Add a missing ldexpf() alias for amd64.
Noticed by:	bz@, tjr@
2005-09-12 20:54:00 +00:00
stefanf
f9e069084c Include a couple of headers to ensure consistency between the prototype and
the function definition.
2005-09-12 19:52:42 +00:00
stefanf
7368122bb1 - Add prototypes for __cmpdi2() and __ucmpdi2().
- Remove GCC 1 stuff.
2005-09-12 16:16:12 +00:00
stefanf
fa7406b7f9 Use prototypes for CHIN1() and CHIN(). 2005-09-12 16:02:54 +00:00
stefanf
56b9efc0f3 Move the declaration of __cleanup to libc_private.h as it is used in both
stdio/ and stdlib/.  Don't define __cleanup twice.
2005-09-12 13:46:32 +00:00
stefanf
6a3ff0e038 Add a couple of missing MLINKS. 2005-09-11 20:59:52 +00:00
stefanf
2e6261bb2b The arguments for time2posix() and posix2time() are time_t values, not
pointers.
2005-09-11 17:09:50 +00:00
kientzle
9d88c7f7b7 Style issue: Don't include <wchar.h> where it is not actually needed.
(wchar_t is defined in stddef.h, and only two files need more than that.)

Portability:  Since the wchar requirements are really quite modest,
it's easy to define basic replacements for wcslen, wcscmp, wcscpy,
etc, for use on systems that lack <wchar.h>.  In particular, this allows
libarchive to be used on older OpenBSD systems.
2005-09-10 22:58:06 +00:00
rwatson
c79382b4d0 Add mkfifo(2) to the man page SEE ALSO list for umask(2) -- it's
mentioned in the description.

MFC after:	2 days
2005-09-10 20:47:02 +00:00
kientzle
c0445100a7 Fix some errors in archive_read_data that caused failures in bsdtar's
pass-through filtering.

Thanks to: Bjoern Koenigönig
PR: bin/82878
2005-09-10 18:05:54 +00:00
stefanf
35fe4fa9a9 Add an MLINK for devname_r(). 2005-09-10 14:09:37 +00:00
stefanf
ce921f2c55 The header and the man page say that sethostid() returns void, so make the
definition match.  Include <unistd.h>.
2005-09-10 13:54:42 +00:00
stefanf
30206fef60 Fix parameter types of close and get members in DB. 2005-09-10 12:40:51 +00:00
yar
3972ed5032 Fix fallout from the previous commit:
We shouldn't call chmod() if we've just used
fchmod() OK on the same file.

Approved by:	kientzle
2005-09-09 19:02:03 +00:00
kientzle
0dbebe5f5d Terminate metadata restore early only on failure, not success.
In particular, this bug was preventing the restore of fflags.
2005-09-05 10:23:55 +00:00
tjr
95970c2863 Remove references to nonexistent "FreeBSD Security Architecture" document. 2005-09-05 09:49:33 +00:00
stefanf
be47cc4f82 Include needed headers that were obtained through <pthread.h>. Sort headers
while here.
2005-09-01 15:21:23 +00:00
rodrigc
caed8dde2c Add __BEGIN_DECLS/__END_DECLS so that this header can be included in C++
programs.  Also, add include guards.

PR:		bin/44277
Submitted by:	Alex Zepeda <freebsd at blarf dot homeip dot net>
MFC after:	1 day
2005-08-31 14:57:39 +00:00
jmallett
ae452b72d8 Remove getino(3) manpage. It doesn't document what is here, what is here should
not get documented, and what it does document isn't going to come to CVS any
time in the immediate future.

Patience of a saint:	trhodes
2005-08-31 08:36:05 +00:00
trhodes
2fefdd26d1 Disconnect getino.3 and remove MLINK I added.
Discussed with:	jmallett
2005-08-31 07:44:45 +00:00
deischen
91ca27dcf8 Allocate a thread's tcb last so it is easier to handle failures to
malloc() siginfo.

PR:	85468
2005-08-30 12:42:00 +00:00
garys
48a5274239 Added a sentence to explain what "span" means.
PR:             docs/84850
Submitted by:   garys
MFC after:      3 days
Approved by:    keramida
2005-08-29 20:41:58 +00:00
deischen
64b6610e61 Handle failure to malloc() part of the thread structure.
PR:	83457
2005-08-29 13:49:18 +00:00
deischen
edebe2a2bd Don't attempt to initialize the rtld lock if it can't be malloc()'d.
PR:	83452
2005-08-29 13:47:42 +00:00
glebius
b87dfd9adc - Document the fact that the real length of listen queue is 1.5 more
than the value of backlog argument.
- Document the fact that a subsequent listen(2) calls on the listening
  socket change the backlog argument.
- Note that current listen queue lengths can be queried using netstat(1).

Submitted by:	Igor Sysoev <is rambler-co.ru>
Wording by:	gnn
2005-08-29 10:23:46 +00:00
andre
45fd598f49 Add the function memmem(3) as found in glibc and others.
It is the binary equivalent to strstr(3).

 void *memmem(const void *big, size_t big_len,
	const void *little, size_t little_len);

Submitted by:	Pascal Gloor <pascal.gloor at spale.com>
MFC after:	3 days
2005-08-25 18:26:58 +00:00
trhodes
bd7fc84c8f Hook getino.3 up to the build and link it to putino.3.
PR:	83820
2005-08-25 10:22:29 +00:00
pjd
a5fe3401b9 Add a family of functions for reliable pidfiles handling.
Idea from:	jmg
Discussed on:	arch@
2005-08-24 17:21:38 +00:00