summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Correct a bunch of typos.schweikh2010-01-276-9/+9
|
* Add missing return, in a rare case where we can't allocate memory inemaste2010-01-271-0/+1
| | | | | | | deallocate. Submitted by: Ryan Stone (rysto32 at gmail dot com) Approved by: jasone
* Remove pseudo-terminals from ttys(5).ed2010-01-271-36/+1
| | | | | | | | | | | | When we had utmp(5), we had to list all the psuedo-terminals in ttys(5) to make ttyslot(3) function properly. Now that pututxline(3) deals with slot allocation internally (not based on TTY names), we don't need to list all the TTYs on the system in ttys(5) to make user accounting work properly. This patch removes all the entries from the /etc/ttys files, but also the pts(4) entries that were appended implicitly, which was added in r154838.
* Add information about when nmount(2) was introduced.trasz2010-01-261-1/+5
|
* Document HTTP digest authentication support.des2010-01-261-8/+14
| | | | | | Mention some prominent past contributors: Hajimu Umemoto (ipv6), Henry Whincup (https), Jukka Ukkonen (if-modified-since) and Jean-François Dockes (digest auth)
* Correct the HISTORY section of these man pages to show when the function,gavin2010-01-2636-72/+72
| | | | | | | not the "manual page example" was introduced. Approved by: ed (mentor, implicit) MFC after: 1 week
* Bump .Dd, forgotten in r203025gavin2010-01-2617-17/+17
| | | | | Approved by: ed (mentor, implicit) MFC after: 1 week
* Correct the HISTORY section of these man pages to show when the function,gavin2010-01-2617-17/+17
| | | | | | | not the "manual page example" was introduced. Approved by: ed (mentor, implicit) MFC after: 1 week
* - style(9)gabor2010-01-251-25/+25
| | | | Approved by: delphij
* Cache failing and opened catalogs in catopen() and related functions.gabor2010-01-251-17/+131
| | | | | | | | | | | | | Continuous catopen() calls cause 4 failig stat(2) each, which means a lot of overhead. It is also a good idea to keep the opened catalogs in the memory to speed up further catopen() calls to the same catalog since these catalogs are not big at all. In this case, we count references and only free() the allocated space when the reference count reaches 0. The reads and writes to the cache are syncronized with an rwlock when these functions are called from a threaded program. Requested by: kib Approved by: delphij
* Connect smbfs related libraries and tool on sparc64.yongari2010-01-251-0/+4
| | | | Reviewed by: marius
* Commit copyright-only changes to generated files as part of thedougb2010-01-254-4/+4
| | | | 9.6.1-P3 update
* Improve the ttyname(3) manual page.ed2010-01-241-20/+5
| | | | | | - Remove unrelated references to tty(5). - Remove unneeded relation with FILE *. - Add better cross references.
* Make strsignal(3) thread-safe.ume2010-01-241-4/+48
| | | | MFC after: 2 weeks
* EMPTY records don't have a timestamp.ed2010-01-231-1/+2
|
* Reapply r201145 to lib/libc/gen/sem.cantoine2010-01-231-1/+1
|
* Just ignore the timestamps given to pututxline().ed2010-01-233-23/+12
| | | | | | | | | | | | | I've noticed many applications do a bad job at timekeeping, for several reasons: - Applications like screen(1) don't update time records when restoring the old user login record. - Many applications only set ut_tv.tv_sec, not ut_tv.tv_usec. This causes many problems for tools such as ac(8), which require the timestamps to be properly ordered. This is why I've decided to let the utmpx code obtain valid timestamps itself.
* Don't try to hardlink block or character device nodes that come outkientzle2010-01-231-2/+4
| | | | of cpio archives.
* Use a simpler memory-management strategy for the file objects.kientzle2010-01-231-46/+23
| | | | | | | Instead of trying to reference-count them and free them as soon as they are no longer needed, we now just keep them around and free them all when we release the archive object. This fixes a number of minor memory leaks, especially when reading damaged archives.
* If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can'tkientzle2010-01-231-7/+16
| | | | | | be processed any further) and a suitable error string. In particular, this improves the error-reporting when cpio -o is given a nonexistent filename.
* Initialize the allocated 'struct zip'.kientzle2010-01-231-1/+1
|
* Fix a memory leak when a filter fails to initialize.kientzle2010-01-231-16/+27
|
* English nitpicking.ed2010-01-221-1/+1
| | | | Submitted by: jmallett
* Describe why pututxline() doesn't entirely conform to standards.ed2010-01-221-2/+20
|
* Remove comments about breaking the specification.ed2010-01-221-2/+0
| | | | | | | | | | | | | | | I've discussed this issue with the Austin Group and it will be fixed in future revisions of the specification. The issue was that ut_line fields weren't supposed to be valid for LOGIN_PROCESS entries, while getutxline() would try to match these records anyway. They also agreed on our way of implementing pututxline() without getutxid() (which other operating systems also do), but unfortunately they disagreed with our way of replacing DEAD_PROCESS entries, which is a pity. The current specification allows the utmpx database to become infinitely big over time. See also: http://austingroupbugs.net/view.php?id=213#c378
* Remove stale references to utmp(5) and its corresponding filenames.ed2010-01-211-7/+2
| | | | I removed utmp and its manpage, but not other manpages referring to it.
* Remove libulog from the bootstrap again.ed2010-01-211-5/+4
| | | | | | libulog now only provides functions that are used by various packages from the ports tree, namely the libutempter ones. There is no reason to link it into the crunch/fixit binaries anymore.
* Correct comment typo.emaste2010-01-211-1/+1
|
* - Update Galician cataloggabor2010-01-211-0/+46
|
* The waitpid(2) function needs neither sys/time.h nor sys/resource.h.pjd2010-01-201-2/+2
|
* Style: reword comment.ache2010-01-201-1/+1
| | | | Submitted by: bde
* For alphasort() add reference to strcoll(3)ache2010-01-201-2/+4
|
* Style: rename internal function to opendir_compar()ache2010-01-201-2/+2
| | | | Pointed by: bde
* Style: remove extra empty line in the comment.ache2010-01-201-1/+0
| | | | Pointed by: bde
* Revert r202447 by re-exposing the old uname(3) function.ed2010-01-192-3/+4
| | | | | | | | | | | | | | | | It makes hardly any sense to expose a symbol which should only be provided for binary compatibility, but it seems we don't have a lot of choice here. There are many autoconf scripts out there that try to create a binary that links against the old symbol to see whether uname(3) is present. These scripts fail to detect uname(3) now. It should be noted that the behaviour we implement is not against the standards: | The following shall be declared as a function and may also be defined | as a macro: | | int uname(struct utsname *);
* Add missing DPADD and fix whitespace.des2010-01-191-2/+3
| | | | Submitted by: ru
* Add HTTP digest authentication.des2010-01-192-67/+819
| | | | | Submitted by: Jean-Francois Dockes <jf@dockes.org> Forgotten by: des (repeatedly)
* fix a comment typoavg2010-01-181-1/+1
| | | | MFC after: 3 days
* Double checking my commit I found that comment saying thatache2010-01-181-7/+3
| | | | | | | | POSIX 2008 and XSI 7require strcoll() for opendir() is not true. I can't find such requirement in POSIX 2008 and XSI 7. So, back out that part of my commit, returning old strcmp(), and remove this misleading comment.
* Let pam_lastlog use random ut_id's.ed2010-01-182-14/+42
| | | | | | | | | | | | | | | | | By using random values for ut_id, not based on the TTY name, it is possible to run for example login(1) multiple times on the same TTY, without overwriting any previous records. The output of w(1) will then be as follows: | 12:26PM up 2 days, 2:31, 5 users, load averages: 0.01, 0.03, 0.03 | USER TTY FROM LOGIN@ IDLE WHAT | ed pts/2 mekker.80386.nl 12:26PM - w | root pts/2 - 12:26PM - w | root pts/2 - 12:26PM - w | root pts/2 - 12:26PM - w Approved by: des
* preserve errno when processing error cases.davidxu2010-01-181-1/+3
|
* a) Use strcoll() in opendir() and alphasort() as POSIX 2008 requires.ache2010-01-182-8/+4
| | | | | | | | | | | | | | | | | It also matches now how our 'ls' works for years. b) Remove comment expressed 2 fears: 1) One just simple describe how strcoll() works in _any_ context, not for directories only. Are we plan to remove strcoll() from everything just because it is little more complex than strcmp()? I doubt, and directories give nothing different here. Moreover, strcoll() used in 'ls' for years and nobody complaints yet. 2) Plain wrong statement about undefined strcoll() behaviour. strcoll() always gives predictable results, falling back to strcmp() on any trouble, see strcoll(3). No objections from -current list discussion.
* Perform several small cleanups to the utmpx code.ed2010-01-175-60/+62
| | | | | | | | | | | | | | | | - Massively reduce BSS usage. Let futx_to_utx() dynamically allocate the structure. There is only a very small amount of applications out there that needs to use the utmpx database. Wasting 1 KB on unused structures makes little sense. - Just let getutxid() search for matching ut_id's for any *PROCESS-type. This makes the code a bit more future-proof. - Fix a POSIX-mistake: when reading POSIX and the OpenSolaris implementation, getutxline() must return USER_PROCESS and LOGIN_PROCESS records whose ut_lines match. When reading POSIX, it seems LOGIN_PROCESS should not use ut_line at the first place. I have reported this issue.
* Add forgotten break; keyword to getutxid().ed2010-01-171-0/+2
| | | | | We should not fall through to the ut_id comparison. Only ut_type should be compared when using OLD_TIME, NEW_TIME, BOOT_TIME or SHUTDOWN_TIME.
* Unbreak builds with _FREEFALL_CONFIG=yes, by forcing a lower WARNSmarcel2010-01-171-0/+1
| | | | level in that case.
* Fix a regression that was introduced in r191882.ed2010-01-171-1/+1
| | | | | | | | | | | | | I changed login_tty() to only work when the application is not a session leader yet. This works fine for applications in the base system, but it turns out various applications call this function after daemonizing, which means they already use their own session. If setsid() fails, just call tcsetsid() on the current session. tcsetsid() will already perform proper security checks. Reported by: Oliver Lehmann MFC after: 1 week
* Simplify ttyslot(3).ed2010-01-171-25/+1
| | | | | | | | | | | After comparing how other systems deal with utmp/utmpx, I noticed many systems don't even care about ttyslot(3) anymore, since utmpx doesn't use TTY slots anyway. We don't provide any tools to access old utmp files anymore, so there is no use in letting applications write to a proper offset within the utmp file. Just let ttyslot(3) always return 0, which seems to be the default behaviour on operating systems like Linux as well.
* Correct a typo (when we talk about offset, it shoulddelphij2010-01-171-1/+1
| | | | | | be offset, not size). Submitted by: pluknet at gmail com
* Expose stripe offset and stripe size through libgeom and geom(8) userlanddelphij2010-01-174-1/+55
| | | | | | utilities. Reviewed by: pjd, mav (earlier version)
* Unexpose the old uname(3) function.ed2010-01-162-4/+3
| | | | | | Nowadays uname(3) is an inline function around __xuname(3). Prevent linkage of new binaries against this compatibility function, similar to what I did with ttyslot(3).
OpenPOWER on IntegriCloud