summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Markup nit.ru2004-04-271-1/+1
|
* Update file flag handling.kientzle2004-04-269-82/+506
| | | | | | | | | | | | | | | | The new fflags support in archive_entry supports Linux and FreeBSD file flags and is a bit more gracious about unrecognized flag names than strtofflags(3). This involves some minor API breakage. The default tar format ("restricted pax") now enables pax extensions when archiving files that have flags. In particular, copying dir heirarchies with 'bsdtar cf - -C src . | bsdtar xpf - -C dest' now preserves file flags. (Note the "p" on extract!) While I'm here, fill in some additional explanation in the archive_entry.3 manpage, fill in some missing MLINKS, mark some overlooked internal functions 'static', and make a few minor style fixes.
* Rewrite split_lines() to operate safelyache2004-04-251-3/+7
| | | | | PR: 62694 Submitted by: moulin p <moulin.p@calyopea.com>
* Make sure that symbols are declared in math.h iff the appropriatedas2004-04-251-65/+68
| | | | | | | | | | | | | | namespaces are visible. Previously, math.h failed to hide some C99-, XSI-, and BSD-specific symbols in certain compilation environments. The referenced PR has a nice listing of the appropriate conditions for making symbols visible in math.h. The only non-stylistic difference between the patch in the PR and this commit is that I superfluously test for __BSD_VISIBLE in a few places to be more explicit about which symbols have historically been part of the FreeBSD environment. PR: 65939 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
* Remove a stale comment referring to values.h, which has never beendas2004-04-251-6/+1
| | | | | | part of FreeBSD. PR: 65939
* Unconditionaly initialize any spin lock passed to pthread_spin_init(). Whilemtm2004-04-241-4/+0
| | | | | | makeing sure the spinlock isn't already in use might be a nice feature to have in theory, it's hard to implement in practice since the passed in pointer may not be NULL, but still be an invalid value (i.e. 1..2..3.. etc).
* Make clone more aggressive about copying strings to the new entry.kientzle2004-04-231-9/+9
| | | | | | | | | The original might have pointers to user-specified strings; copying the string (instead of just the pointer) protects against the client re-using their own buffers. I'm trying hard to avoid dumping all of the 'set' string functions in favor of slower, but more predictable 'copy' semantics.
* Set the 'dump' flag for shardump format.kientzle2004-04-231-0/+4
| | | | | Credit Juergen Lock. Pointy hat to me for deleting this somewhere along the way.
* Correct spelling of == so that file flags are correctly restored.kientzle2004-04-231-1/+1
| | | | Credit to Juergen Lock.
* Use the correct size to allocate, copy and clear argument type tablestjr2004-04-222-12/+18
| | | | | | | | | | after their change from an array of char to an array of enum. This fixes problems that occurred when using positional arguments in format strings, particularly with more than STATIC_ARG_TBL_SIZE (8) of them. PR: 65841 Submitted by: Steven Smith (mostly)
* Enable libdisk for powerpc build.grehan2004-04-211-5/+1
|
* PowerPC support.grehan2004-04-216-4/+125
| | | | | submitted by: Suleiman Souhlal <refugee@segfaulted.com> approved by: phk, jhb
* Fix a bug that could result in getpw*() incorrectly returning NULL when NISjon2004-04-211-0/+1
| | | | | | | 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.
* Unbreak world.ru2004-04-211-3/+2
|
* More portability improvements, thanks to Juergen Lock.kientzle2004-04-215-44/+82
| | | | | | 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.
* MFdragonfly: resolver fix for timeouts on unqualified hostnamesnjl2004-04-211-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add mention of the fact that timeouts are silently limited to 24 hours.cperciva2004-04-201-0/+5
| | | | Observed by: jmg
* Yucky bug: Don't emit 'mkdir' commands for regular files in shar archives.kientzle2004-04-201-15/+27
| | | | | | While I'm here, add some logic to avoid "mkdir ." Reported by: Juergen Lock
* In GNU tar archives, read ctime from ctime field, not atime field.kientzle2004-04-201-1/+1
| | | | Credit: Juergen Lock
* Eliminate some redundant calls to archive_entry_hardlink.kientzle2004-04-202-8/+15
|
* Optimize ustar header formatting.kientzle2004-04-191-89/+79
|
* Document POSIX stupidity: Attempts to mmap zero bytes will succeed (andcperciva2004-04-181-0/+7
| | | | have no effect), while attempts to munmap zero bytes will fail.
* Bring describtion of a sysctl in line with the source:brueffer2004-04-161-1/+1
| | | | | | kern.acct_chkfreq is specified in seconds, not minutes. Cluebat provided by: kensmith
* Remove unnecessary .Pp macro and bump document datebrueffer2004-04-161-2/+1
| | | | Submitted by: ru
* List some sysctl variables that influence accountingbrueffer2004-04-161-0/+16
| | | | | | PR: 65070 Submitted by: Marc Silver <marcs@draenor.org> X-MFC after: re approval
* Only enable the ACL restore logic on FreeBSD versions >= 5.0.kientzle2004-04-161-0/+3
| | | | | | | | | 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.)
* Use a MANFILTER to patch the man pages to point to the right path.harti2004-04-141-0/+4
| | | | Noted by: phk
* Bump the shared library version number for the bsnmp v1.6 importharti2004-04-141-1/+1
| | | | because of incompatible interface changes.
* Put the name of the module first in the list of all .Nm calls withharti2004-04-141-0/+1
| | | | | argument. This makes the output of calling .Nm without an argument more senseful later on.
* Compare with 0 if comparing an integer, not with NULL.harti2004-04-141-1/+1
|
* Move the SNMP MIBs and tree definitions from /usr/share/bsnmp toharti2004-04-141-2/+2
| | | | | /usr/share/snmp. This mirrors the use of /usr/local/share/snmp and makes also more sense when non-bsnmp-specific MIBs go in.
* * Plug a buffer overrun in ACL parsing. (archive_entry.c)kientzle2004-04-1312-51/+99
| | | | | | | * 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.
* Perform some basic validation of multibyte conversion state objects.tjr2004-04-128-16/+116
|
* Remove a nonsensical remark about byte order markers in UTF-8 streams.tjr2004-04-121-6/+1
|
* More work on ACLs: fix error in archive_entry's ACL parsing code,kientzle2004-04-1236-933/+396
| | | | | | | | | | | | | | 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
* Belatedly remove the getvfsent(3) API. All the consumers have beenmux2004-04-113-342/+2
| | | | | updated to use getvfsbyname(3) or the vfs.conflist sysctl since a long time, except mount_smbfs(8) which has just been fixed.
* Document the meaning of the zero return value.tjr2004-04-112-6/+11
|
* Fix a typo. I was locked out for two days from my machine.davidxu2004-04-101-1/+1
|
* Don't cast away const qualifiers.tjr2004-04-108-8/+8
| | | | Spotted by: bde
* Make sure Bluetooth stuff can be compiled on amd64emax2004-04-091-2/+2
| | | | Submitted by: ps
* Terminate execl()'s argument list with a null pointer instead of atjr2004-04-091-1/+1
| | | | | | | null pointer constant. (The latter may be an integer constant, which is not correct here.) Submitted by: Stefan Farfeleder
* After forking and initializing the library to single-threadeddeischen2004-04-082-4/+6
| | | | | | | | | | 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
* Update manual pages for change to C99 mbrtowc() semantics.tjr2004-04-0812-134/+143
|
* Linux still uses 32-bit off_t by default. Ask for 64-bit off_t onkientzle2004-04-071-0/+1
| | | | Linux.
* Allow partial multibyte characters to accumulate in conversion statetjr2004-04-0712-89/+350
| | | | | objects passed to mbrtowc(), mbsrtowcs(), and mbrlen(), as required by C99.
* Prepare to handle trivial state-dependent encodings. Full support fortjr2004-04-079-21/+61
| | | | | state-dependent encodings with locking shifts will come later if there is demand for it.
* Begin conversions for sgetrune() and sputrune() in the initialtjr2004-04-071-3/+12
| | | | conversion state.
* Prepare to handle state-dependent encodings. This mainly involves nottjr2004-04-076-21/+38
| | | | | taking shortcuts when it comes to storing and passing around conversion states.
* Begin in the initial shift state in mbstowcs() and wcstombs().tjr2004-04-072-2/+6
| | | | (This change is non-functional since nothing uses states yet.)
* Fix some issues with ACL handling:kientzle2004-04-065-53/+89
| | | | | | | | | | * 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.
OpenPOWER on IntegriCloud