summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Assorted spelling, punctuation and mdoc fixes.brueffer2007-09-255-36/+39
| | | | Approved by: re (blanket)
* The precision for a string argument in a call to warnx() needs to be castscf2007-09-221-1/+2
| | | | | | | | | to an int to remove the warning from using a size_t variable on 64-bit platforms. Submitted by: Xin LI <delphij@FreeBSD.org> Approved by: wes Approved by: re (kensmith)
* Translate partitions of type "PART" to chunks of the same typemarcel2007-09-211-4/+15
| | | | | | | | as they would have been translated from partitions of type "GPT". This fixes sysinstall, now that geom_part has taken over from geom_gpt. Approved by: re (kensmith)
* On PowerPC, geom_part has taken over the partitioning from geom_apple.marcel2007-09-211-2/+7
| | | | | | | Translate partitions of type "PART" to chunks of type "apple" on PowerPC. This fixes sysinstall. Approved by: re (kensmith)
* Add FreeBSD history.obrien2007-09-211-1/+3
| | | | Approved by: re(ken)
* Fix the archive_write_data() function so it always returnskientzle2007-09-212-4/+86
| | | | | | | | | | | | | number of bytes written, even when used to write files to disk. Extend the test suite to verify the correct return values for archive_write_data() and archive_write_data_block(). Thanks to: Bruce Mah, for stepping in promptly to back out the earlier broken version of this fix Thanks to: Colin Percival, for pointing out the correct fix MFC after: 5 days Approved by: re (ksmith) Pointy hat: \me
* - When using kvm use the new conversion method to derive swtime.jeff2007-09-211-3/+16
| | | | Approved by: re
* Fix some improper handling of malloc failuresmatteo2007-09-205-30/+53
| | | | | | | PR: bin/83344 , kern/81987 Reviewed by: alfred Approved by: re (kensmith) MFC after: 1 week
* - Fix description to say "receive" instead of "send"gabor2007-09-201-2/+2
| | | | | | PR: docs/115466 Submitted by: Bruce Cran <bruce@cran.org.uk> Approved by: re (bmah)
* Fill in a missing 'e'kientzle2007-09-191-1/+1
| | | | | | Thanks to: Kai Wang, for pointing this out Approved by: re (bmah) MFC after: 3 days
* Revert the last commit to libarchive. It introduced some regresssions,bmah2007-09-182-33/+5
| | | | | | | | | | | most noticably the incorrect extraction of files by bsdtar. This commit reverts: src/lib/libarchive/archive_write_disk.c 1.15 src/lib/libarchive/test/test_write_disk.c 1.4 Approved by: re (implicitly)
* Correct the return value from archive_write_data()kientzle2007-09-182-5/+33
| | | | | | | | | | | (when used to restore files to disk) to match: * The documentation * The return values of this function when used to write files into an archive. Approved by: re (bmah) Pointy hat: \me MFC after: 5 days
* - Move all of the PS_ flags into either p_flag or td_flags.jeff2007-09-171-2/+2
| | | | | | | | | | | | | | - p_sflag was mostly protected by PROC_LOCK rather than the PROC_SLOCK or previously the sched_lock. These bugs have existed for some time. - Allow swapout to try each thread in a process individually and then swapin the whole process if any of these fail. This allows us to move most scheduler related swap flags into td_flags. - Keep ki_sflag for backwards compat but change all in source tools to use the new and more correct location of P_INMEM. Reported by: pho Reviewed by: attilio, kib Approved by: re (kensmith)
* Skip rebuilding environ in setenv() only upon reuse of an active variable;scf2007-09-151-2/+2
| | | | | | | | | | | inactive variables should cause a rebuild of environ, otherwise, exec()'d processes will be missing a variable in environ that has been unset then set. Submitted by: Taku Yamamoto <taku@tackymt.homeip.net> Reviewed by: ache Approved by: wes (mentor) Approved by: re (kensmith)
* Use better manuals for these ntp system calls. These were replaced byimp2007-09-153-201/+258
| | | | | | | the netbsd versions, and tweaked by me with suggestions from phk. Reviewed by: phk Approved by: re@
* Do not generate unneeded initializers.jkoshy2007-09-091-5/+4
| | | | Approved by: re (bmah)
* Fix a bug that prevented applications from laying out ELF objectsjkoshy2007-09-082-19/+51
| | | | | | | | | | | | | with section header tables residing in between other sections. Introduce additional checks for overlaps between section data and the section header table when the application is performing section layout. Document additional error returns. Reported by: Kai Wang <kaiw27 at gmail dot com> Approved by: re (rwatson)
* We've been able to support EVFILT_VNODE filtering on non-UFSru2007-09-071-6/+1
| | | | | | | | file systems since 2005. Submitted by: Igor Sysoev Approved by: re (bmah) MFC after: 3 days
* ensure the head entry of addrinfo chain has non-NULL ai_canonname to bejinmei2007-09-051-2/+19
| | | | | | | | | compliant with RFC3493. PR: standards/114910 Approved by: ume (mentor) Approved by: re MFC after: 1 week
* - Fix strange for loop.pjd2007-09-051-6/+16
| | | | | | | | | Reported by: phk - While here, check the unit before calculating the actually number. This way we can return EINVAL for invalid unit instead of ERANGE. Approved by: re (kensmith)
* Point expand_number(3) at humanize_number(3) and nive versa.pjd2007-09-052-0/+4
| | | | | Suggested by: trhodes Approved by: re (kensmith)
* Implement expand_number(3), which is the opposite of humanize_number(3), ie.pjd2007-09-014-3/+177
| | | | | | | | | | a number in human-readable form is converted to int64_t, for example: 123b -> 123 10k -> 10240 16G -> 17179869184 First version submitted by: Eric Anderson <anderson@freebsd.org> Approved by: re (bmah)
* Add thr_kill2 syscall.davidxu2007-08-221-0/+3
| | | | | Submitted by: Tijl Coosemans tijl at ulyssis dot org Approved by: re (kensmith)
* This commit updates libarchive to be compatible withkientzle2007-08-182-183/+600
| | | | | | | | | | | | | | | | | | | | | | | | | GNU tar 1.17's implementation of --posix --sparse, at the cost of losing compatibility with GNU tar 1.16. Fortunately, the 1.17 implementation actually makes sense, so the libarchive code is now a bit more straightforward than before. Background: GNU tar 1.16 defined a new way to store sparse files in --posix archives. Unfortunately, the implementation incorrectly inserted several blocks of null padding after each such entry. As a result, non-GNU tar implementations saw the archive as truncated after any sparse entry. This was fixed in GNU tar 1.17 at the cost of losing compatibility with GNU tar 1.16 for this new format (which is not the default, so hopefully rarely used). Libarchive recently gained support for reading the GNU tar 1.16 formats; this commit updates it to read the GNU tar 1.17 variant instead. Approved by: re (ksmith for libarchive portion) Approved by: re (blanket for libarchive_test portion) MFC after: 5 days
* Make suid/sgid restore be "opportunistic" ifkientzle2007-08-122-16/+82
| | | | | | | | | | | | | | | | | | | | | | | | owner restore is not requested. If you ask for permissions to be restored but not owner, you will now get no error if suid/sgid bits cannot be set. (It's a security hole to restore suid/sgid bits if the owner/group aren't restored.) This fixes an obscure problem where a simple "tar -xf" with no other options will sometimes fail gratuitously because of suid/sgid bits. This is causing occasional problems for people using bsdtar as a drop-in replacement for "that other tar program." ;-) Note: If you do ask for owner restore, then suid/sgid restore failures still issue an error. This only suppresses the error in the case where an suid/sgid bit restore fails because of an owner mismatch and owner restore was not requested. Approved by: re (bmah) MFC after: 7 days
* Update the tests for reading the various GNU tar sparse formats.kientzle2007-08-121-75/+267
| | | | | | | | | | | | | | | In particular: * Include a second entry in all of the test archives (to catch errors with intermediate padding) * Test the GNU tar 1.17 version of "posix sparse format 1.0" instead of the GNU tar 1.16 version (the latter is no longer supported by GNU tar). Right now, libarchive fails this test because I originally implemented the GNU tar 1.16 version of "posix sparse format 1.0". I'll fix libarchive shortly. Approved by: re (blanket, libarchive testing)
* Output error message to STDERR_FILENO.davidxu2007-08-071-1/+1
| | | | Approved by: re (bmah)
* Improve error handling in libdisk while parsing the kern.geom.conftxt sysctl.rink2007-08-051-19/+38
| | | | | | | | | | | | | | | | | | | | | | | | Previously, any parse error will result in the calling program exiting with an unpleasant message. This change will cause libdisk to issue a warning and ignore lines it cannot parse instead of bluntly terminating the unfortunate enough program. This change will allow you to use sysinstall if you have a NTFS parition with a space in the name (such as 'Win Xp'). In such a case, a line like the following will appear in the kern.geom.conftxt output: 2 LABEL ntfs/Win Xp 209818635264 512 i 0 o 0 As the fields are space-separated, libdisk would go beserk and exit the program. This would happen if using FreeBSD 7.0 snapshot images (as GEOM_LABEL is in the installation kernel as well), thus making it impossible to install FreeBSD without renaming your NTFS paritions. Reported by: Dwight Berendse <dwight at berendse dot org> Nod from: phk Reviewed by: imp Approved by: re (bmah), imp (mentor) MFC after: 1 month
* Back out previous commit until I figure out why my regression test fails.des2007-08-033-23/+17
| | | | Approved by: re (kensmith)
* Use fcntl(2)-style locks instead of less-portable flock(2)-style locks.des2007-08-033-17/+23
| | | | Approved by: re (kensmith)
* - Getipnodebyname() and getipnodebyaddr() reimplemented throughbushman2007-07-311-1387/+72
| | | | | | gethostbyname() and gethostbyaddr() accordingly Approved by: re (kensmith), brooks (mentor)
* Two minor nits:kientzle2007-07-311-0/+7
| | | | | | | | * Allow libarchive_test to compile on Interix again. * Track the test name (not just line number) when counting skipped tests. Thanks to: Joerg Sonnenberger Approved by: re (blanket; libarchive testing)
* Cross-reference the correct manual page.jkoshy2007-07-282-2/+2
| | | | Approved by: re (bmah)
* - take out a needless panic under invariants for sctp_output.crrs2007-07-241-6/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix addrs's error checking of sctp_sendx(3) when addrcnt is less than SCTP_SMALL_IOVEC_SIZE - re-add back inpcb_bind local address check bypass capability - Fix it so sctp_opt_info is independant of assoc_id postion. - Fix cookie life set to use MSEC_TO_TICKS() macro. - asconf changes o More comment changes/clarifications related to the old local address "not" list which is now an explicit restricted list. o Rename some functions for clarity: - sctp_add/del_local_addr_assoc to xxx_local_addr_restricted() - asconf related iterator functions to sctp_asconf_iterator_xxx() o Fix bug when the same address is deleted and added (and removed from the asconf queue) where the ifa is "freed" twice refcount wise, possibly freeing it completely. o Fix bug in output where the first ASCONF would not go out after the last address is changed (e.g. only goes out when retransmitted). o Fix bug where multiple ASCONFs can be bundled in the same packet with the and with the same serial numbers. o Fix asconf stcb iterator to not send ASCONF until after all work queue entries have been processed. o Change behavior so that when the last address is deleted (auto asconf on a bound all endpoint) no action is taken until an address is added; at that time, an ASCONF add+delete is sent (if the assoc is still up). o Fix local address counting so that address scoping is taken into account. o #ifdef SCTP_TIMER_BASED_ASCONF the old timer triggered sending of ASCONF (after an RTO). The default now is to send ASCONF immediately (except for the case of changing/deleting the last usable address). Approved by: re(ken smith)@freebsd.org
* Set timeout for all NIS RPC requests to 1 second and not just forsimon2007-07-241-8/+8
| | | | | | | | | | | | yp_next as revision 1.50 did. This should fix, or at least very much reduce the risk of, NIS timing out due to UDP packet loss for NIS functions. See also revision 1.50 for more details about the general problem. Tested by: nosedive, freefall, hub, mx1, brooks MFC after: 1 week Approved by: re (mux)
* Apply the same error checks to PAM_TTY in pam_sm_close_session() as indes2007-07-221-1/+9
| | | | | | | | pam_sm_open_session(), avoiding false negatives when no tty is present. Submitted by: Todd C. Miller <millert@courtesan.com> Approved by: re (rwatson) MFC after: 2 weeks
* Whitespace cleanupdes2007-07-221-6/+6
| | | | Approved by: re (rwatson)
* - Correctly substitute variables like @NCURSES_MAJOR@ in manual pagesrafan2007-07-212-2/+10
| | | | | | | PR: doc/114711 Submitted by: Yuri Pankov <yuri at darklight.org.ru> Approved by: re (bmah) MFC after: 3 days
* Added environ-replacement detection. For programs that "clean" (i.e., su)scf2007-07-201-78/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | or replace (i.e., zdump) the environment after a call to setenv(), putenv() or unsetenv() has been made, a few changes were made. - getenv() will return the value from the new environ array. - setenv() was split into two functions: __setenv() which is most of the previous setenv() without checks on the name and setenv() which contains the checks before calling __setenv(). - setenv(), putenv() and unsetenv() will unset all previous values and call __setenv() on all entries in the new environ array which in turn adds them to the end of the envVars array. Calling __setenv() instead of setenv() is done to avoid the temporary replacement of the '=' in a string with a NUL byte. Some strings may be read-only data. Added more regression checks for clearing the environment array. Replaced gettimeofday() with getrusage() in timing regression check for better accuracy. Fixed an off-by-one bug in __remove_putenv() in the use of memmove(). This went unnoticed due to the allocation of double the number of environ entries when building envVars. Fixed a few spelling mistakes in the comments. Reviewed by: ache Approved by: wes Approved by: re (kensmith)
* Fix a strict aliasing warning from GCC 4.1.kientzle2007-07-201-1/+4
| | | | | | Thanks to: Joerg Sonnenberger Approved by: re (hrs) MFC after: 3 days
* archive_string_ensure() used to call exit(3) if itkientzle2007-07-155-10/+27
| | | | | | | | | | couldn't allocate more memory for a string. Change this so it returns NULL in that case, and update all of its callers to handle the error. Some of those callers can now return errors back to the client instead of calling exit(3). Approved by: re (bmah)
* Add archive_entry_copy_gname() and archive_entry_copy_uname()kientzle2007-07-154-0/+22
| | | | | | | functions. Approved by: re (bmah) MFC after: 3 days
* Clarify one test.kientzle2007-07-151-1/+1
| | | | Approved by: re (blanket, libarchive testing)
* Disconnect netatm from the build as it is not MPSAFE and relies onrwatson2007-07-141-1/+2
| | | | | | | | | | | | | | | | | | | | NET_NEEDS_GIANT, which will shortly be removed. This is done in a away that it may be easily reattached to the build before 7.1 if appropriate locking is added. Specifics: - Don't install netatm include files - Disconnect netatm command line management tools - Don't build libatm - Don't include ATM parts in rescue or sysinstall - Don't install sample configuration files and documents - Don't build kernel support as a module or in NOTES - Don't build netgraph wrapper nodes for netatm This removes the last remaining consumer of NET_NEEDS_GIANT. Reviewed by: harti Discussed with: bz, bms Approved by: re (kensmith)
* Take a sentence into the present by removing a reference to FreeBSD 3.0.brueffer2007-07-141-4/+2
| | | | | Approved by: re (blanket) MFC after: 3 days
* Use an uncompressed test archive for gtar sparse format 1.0 format,kientzle2007-07-141-20/+6
| | | | | | | as that better exercises some internal read-combining logic than the compressed archive. Approved by: re (blanket, libarchive testing)
* Report each failed test once, but keep a count and report that countkientzle2007-07-143-22/+111
| | | | | | | if there was more than one. In particular, this simplifies test_tar_filenames.c, which has a tendency to be very noisy otherwise. Approved by: re (blanket, libarchive testing)
* - Modular congestion control, with RFC2581 being the default.rrs2007-07-141-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | - CMT_PF states added (w/sysctl to turn the PF version on) - sctp_input.c had a missing incr of cookie case when the auth was bad. This meant a free was called without an increment to refcnt, added increment like rest of code. - There was a case, unlikely, when the scope of the destination changed (this is a TSNH case). In that case, it would not free the alloc'ed asoc (in sctp_input.c). - When listed addresses found a colliding cookie/Init, then the collided upon tcb was not unlocked in sctp_pcb.c - Add error checking on arguments of sctp_sendx(3) to prevent it from referencing a NULL pointer. - Fix an error return of sctp_sendx(3), it was returing ENOMEM not -1. - Get assoc id was changed to use the sanctified socket api method for getting a assoc id (PEER_ADDR_INFO instead of PEER_ADDR_PARAMS). - Fix it so a peeled off socket will get a proper error return if it trys to send to a different address then it is connected to. - Fix so that select_a_stream can avoid an endless loop that could hang a caller. - time_entered (state set time) was not being set in all cases to the time we went established. Approved by: re(ken smith)
* Restore the 'break' that was inadvertently removed in 1.57 of this file.kientzle2007-07-141-0/+1
| | | | | | | Without this, hardlinks get returned as symlinks. Approved by: re (Ken Smith) MFC after: 2 days
* Extend the basic tar reading test to exercise most types ofkientzle2007-07-141-49/+388
| | | | | | entries. This doesn't cover everything yet, but it's a big improvement. Approved by: re (blanket, libarchive testing)
OpenPOWER on IntegriCloud