Commit Graph

8533 Commits

Author SHA1 Message Date
grehan
a87a9bae44 Enable libdisk for powerpc build. 2004-04-21 23:23:05 +00:00
grehan
b08ab3ee11 PowerPC support.
submitted by:  Suleiman Souhlal <refugee@segfaulted.com>
approved by:   phk, jhb
2004-04-21 23:21:13 +00:00
jon
eabb1158e0 Fix a bug that could result in getpw*() incorrectly returning NULL when NIS
adjunct maps are used.  One symtom of this bug is sshd saying:
	login_get_lastlog: Cannot find account for uid X
when logging in.  The problem here is caused by an incorrect reuse of the rv
variable when previous values are needed later.
2004-04-21 21:15:08 +00:00
ru
6a2d71f930 Unbreak world. 2004-04-21 09:50:52 +00:00
kientzle
82ac6716b7 More portability improvements, thanks to Juergen Lock.
High-resolution mtime/ctime/atime is not POSIX-standard, so hide
set/get of high-resolution time fields behind easily-mutable macros.
That makes it easier to change how those fields are accessed.
2004-04-21 05:13:42 +00:00
njl
854e31c5df MFdragonfly: resolver fix for timeouts on unqualified hostnames
res_search only incremented got_servfail for h_errno == TRY_AGAIN *AND*
  hp->rcode == SERVFAIL.  However, there are cases such as timeouts where
  rcode is not always set to SERVFAIL.  This leads to inconsistent nameserver
  operation during multi-domain and truncated dot searches, especially during
  booting when portions of the network are being brought up simultanious with
  dns lookups.

  This patch attempts to correct the problem by unconditionally terminating
  the search if TRY_AGAIN is returned (after res_query has gone through all
  retries and name servers) instead of trying other domain elements in the
  domain seach path.

  This patch should fix reported problems (which I can reproduce) with some
  NFS mounts failing during boot.  This occured because mount_nfs thought the
  host name lookup returned a definitive failure using a non-dotted host name
  when, in fact, it timed out on the first part (host.search.domain.name) and
  got a definitive host-not-found response on the second part (host.).

  Generally speaking, search path name server timeouts can exceed 60 seconds
  per element and most machines which consistently timeout on earlier portions
  of a search path are effectively non-operational due to the imposed delays.
  It is more important for DNS lookups to return the proper error code then
  to be able to recover a valid lookup in later portions of the search path
  in these situations.

Obtained from:	DragonFly
MFC after:	3 weeks
2004-04-21 00:56:38 +00:00
cperciva
78b8f124fe Add mention of the fact that timeouts are silently limited to 24 hours.
Observed by:	jmg
2004-04-20 21:07:43 +00:00
kientzle
980e839017 Yucky bug: Don't emit 'mkdir' commands for regular files in shar archives.
While I'm here, add some logic to avoid "mkdir ."

Reported by: Juergen Lock
2004-04-20 20:21:36 +00:00
kientzle
0039160d22 In GNU tar archives, read ctime from ctime field, not atime field.
Credit: Juergen Lock
2004-04-20 20:09:06 +00:00
kientzle
aa567357e7 Eliminate some redundant calls to archive_entry_hardlink. 2004-04-20 20:07:30 +00:00
kientzle
9163fc54bf Optimize ustar header formatting. 2004-04-19 20:16:07 +00:00
cperciva
ae156771d6 Document POSIX stupidity: Attempts to mmap zero bytes will succeed (and
have no effect), while attempts to munmap zero bytes will fail.
2004-04-18 23:36:45 +00:00
brueffer
ef47baa9fb Bring describtion of a sysctl in line with the source:
kern.acct_chkfreq is specified in seconds, not minutes.

Cluebat provided by:	kensmith
2004-04-16 22:53:51 +00:00
brueffer
e769b37f40 Remove unnecessary .Pp macro and bump document date
Submitted by:	ru
2004-04-16 22:38:54 +00:00
brueffer
b1c12d2158 List some sysctl variables that influence accounting
PR:		65070
Submitted by:	Marc Silver <marcs@draenor.org>
X-MFC after:	re approval
2004-04-16 20:32:56 +00:00
kientzle
4836a395ca Only enable the ACL restore logic on FreeBSD versions >= 5.0.
Earlier versions of FreeBSD don't support ACLs.

Note that the ACL support code in archive_entry is standalone code and
unaffected by this.  (In particular, it should be possible to
manipulate archives containing ACLs even if the ACLs cannot be
restored on the current system.)
2004-04-16 01:20:58 +00:00
harti
19b40f8d6f Use a MANFILTER to patch the man pages to point to the right path.
Noted by: phk
2004-04-14 16:31:54 +00:00
harti
486eb15cdb Bump the shared library version number for the bsnmp v1.6 import
because of incompatible interface changes.
2004-04-14 16:29:46 +00:00
harti
456eb4bccf Put the name of the module first in the list of all .Nm calls with
argument. This makes the output of calling .Nm without an argument
more senseful later on.
2004-04-14 16:11:05 +00:00
harti
3de9067328 Compare with 0 if comparing an integer, not with NULL. 2004-04-14 16:09:20 +00:00
harti
d118fb2a86 Move the SNMP MIBs and tree definitions from /usr/share/bsnmp to
/usr/share/snmp. This mirrors the use of /usr/local/share/snmp and
makes also more sense when non-bsnmp-specific MIBs go in.
2004-04-14 16:06:19 +00:00
kientzle
26ef2c45c1 * Plug a buffer overrun in ACL parsing. (archive_entry.c)
* Re-use a single buffer for shar output formatting rather
   than hammering the heap. (archive_write_set_format_shar.c)
 * Fix a handful of minor memory leaks and clean up some of the
   memory-management code.
2004-04-13 23:45:37 +00:00
tjr
a0dcfbc296 Perform some basic validation of multibyte conversion state objects. 2004-04-12 13:09:18 +00:00
tjr
9dc0e81495 Remove a nonsensical remark about byte order markers in UTF-8 streams. 2004-04-12 12:58:41 +00:00
kientzle
2789997419 More work on ACLs: fix error in archive_entry's ACL parsing code,
try to set ACLs even if fflag restore fails, first cut at reading
  Solaris tar ACLs

Code improvement: merge gnu tar read support into main tar reader;
  this eliminates a lot of duplicate code and generalizes the tar
  reader to handle formats with GNU-like extensions.

Style: Makefile cleanup, eliminate 'dmalloc' references, remove 'tartype'
  from archive_entry (this makes archive_entry more format-agnostic)

Thanks to: David Magda for providing Solaris tar test files
2004-04-12 01:16:16 +00:00
mux
0cd4d27003 Belatedly remove the getvfsent(3) API. All the consumers have been
updated to use getvfsbyname(3) or the vfs.conflist sysctl since a
long time, except mount_smbfs(8) which has just been fixed.
2004-04-11 21:36:31 +00:00
tjr
0058102b2d Document the meaning of the zero return value. 2004-04-11 05:19:19 +00:00
davidxu
83be4fcddd Fix a typo. I was locked out for two days from my machine. 2004-04-10 14:36:57 +00:00
tjr
c29bd99207 Don't cast away const qualifiers.
Spotted by:	bde
2004-04-10 00:27:52 +00:00
emax
6f0f3b3fa7 Make sure Bluetooth stuff can be compiled on amd64
Submitted by:	ps
2004-04-09 23:01:42 +00:00
tjr
f4b3cc2cea Terminate execl()'s argument list with a null pointer instead of a
null pointer constant. (The latter may be an integer constant, which
is not correct here.)

Submitted by:	Stefan Farfeleder
2004-04-09 11:32:32 +00:00
deischen
2fba20f0d1 After forking and initializing the library to single-threaded
mode (where the forked thread is the one and only thread and
is marked as system scope), set the system scope flag before
initializing the signal mask.  This prevents trying to use
internal locks that haven't yet been initialized.

Reported by:	Dan Nelson <dnelson at allantgroup.com>
Reviewed by:	davidxu
2004-04-08 23:16:21 +00:00
tjr
5eea6226ab Update manual pages for change to C99 mbrtowc() semantics. 2004-04-08 09:59:02 +00:00
kientzle
8881673f41 Linux still uses 32-bit off_t by default. Ask for 64-bit off_t on
Linux.
2004-04-07 17:47:06 +00:00
tjr
dc1e42aa23 Allow partial multibyte characters to accumulate in conversion state
objects passed to mbrtowc(), mbsrtowcs(), and mbrlen(), as required
by C99.
2004-04-07 10:48:19 +00:00
tjr
c62549d93e Prepare to handle trivial state-dependent encodings. Full support for
state-dependent encodings with locking shifts will come later if there
is demand for it.
2004-04-07 09:55:05 +00:00
tjr
8dc503ed37 Begin conversions for sgetrune() and sputrune() in the initial
conversion state.
2004-04-07 09:49:10 +00:00
tjr
a1c21ea40b Prepare to handle state-dependent encodings. This mainly involves not
taking shortcuts when it comes to storing and passing around conversion
states.
2004-04-07 09:47:56 +00:00
tjr
4cf47be978 Begin in the initial shift state in mbstowcs() and wcstombs().
(This change is non-functional since nothing uses states yet.)
2004-04-07 08:33:23 +00:00
kientzle
500e933b1b Fix some issues with ACL handling:
* ACL storage is no longer erased before a group of entries are added.
  * ACL text creation no longer tries to skip over non-existent text.
  * UTF8 encoder no longer blows up on invalid wide characters.
  * Fixed ACL state management for default ACLs.
Also, publicize function for obtaining text-format ACL in various
formats.  The interface is now extensible through a "flags" argument
that allows you to select a variant format.
2004-04-06 23:16:50 +00:00
tjr
43d5b14825 Prepare to handle state-dependent encodings. This mainly involves not
taking shortcuts when it comes to storing and passing around conversion
states.
2004-04-06 13:14:03 +00:00
pb
c2281f92ca Add a missing "*errp = h_errno" forgotten in rev 1.36. 2004-04-06 09:31:22 +00:00
dfr
e30e38c174 Update .Dd value.
Reminded by: ru
2004-04-06 09:06:45 +00:00
kientzle
9f6817f183 Overhauled ACL support. This makes us compatible
with 'star' ACL handling, though there's still a
bit more work needed in this area.

Added 'write_open_fd' and 'read_open_fd' to simplify, e.g.,
tar's u and r modes.  Eliminated old 'write_open_file_position'
as a bad idea.  (It required closing/reopening files to
do updates, which led to unpleasant implications.)

Various other minor fixes, API tweaks, etc.
2004-04-05 21:12:29 +00:00
pb
9e3d168bf7 Fix _dns_ghbyname() to return NS_TRYAGAIN instead of NS_NOTFOUND
on temporary nameserver failure. This is necessary to get
getipnodebyname(3) to correctly return h_errno=TRY_AGAIN instead
of HOST_NOT_FOUND.

Reviewed by:	green, thomas
MFC after:	1 week
2004-04-05 20:18:48 +00:00
dfr
a44b0c1e0b Document lgetfh(2). 2004-04-05 10:17:56 +00:00
tjr
40b832e1a2 Remove support for emulating mbrtowc() and wcrtomb() in terms of the
old rune interface now that it is no longer needed.
2004-04-04 11:31:29 +00:00
tjr
db1c6c90ce Reimplement the GB18030 encoding method using the new-style (mbrtowc()/
wcrtomb()) interface.
2004-04-04 11:00:42 +00:00
tjr
6be517ebf8 Reimplement the deprecated UTF2 encoding method using the UTF-8 code
as a base. mbrtowc() and wcrtomb() are now implemented directly
instead of being emulatedi with sgetrune() and sputrune().
2004-04-04 10:49:45 +00:00
deischen
61ab102676 Unbreak natd.
Reported and submitted by:	Sean McNeil (sean at mcneil.com)
2004-04-02 17:57:57 +00:00