summaryrefslogtreecommitdiffstats
path: root/lib/libutil
Commit message (Collapse)AuthorAgeFilesLines
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-082-2/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* UTFize my name.des2010-08-221-1/+1
|
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-161-2/+2
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* In setusercontext(), do not apply user settings unless running as thedes2010-08-161-1/+1
| | | | | | | | user in question (usually but not necessarily because we were called with LOGIN_SETUSER). This plugs a hole where users could raise their resource limits and expand their CPU mask. MFC after: 3 weeks
* Old patch I had lying around: clean up and use stpcpy(3) instead ofdes2010-08-161-27/+34
| | | | sprintf(3).
* Further simplify the code, and update the manpage.des2010-08-152-26/+27
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
* no-op commit to note that the example given in the previous commit isdes2010-08-151-1/+1
| | | | | | | | | a very bad one, since the shift does not actually overflow. This is a better example (assuming uint64_t = unsigned long long): ~0LLU >> 9 = 0x7fffffffffffffLLU ~0LLU >> 9 << 10 = 0xfffffffffffffc00LLU ~0LLU >> 9 << 10 >> 10 = 0x3fffffffffffffLLU
* Fix the overflow test. It is possible for the result of andes2010-08-151-1/+1
| | | | | | | overflowing shift to be larger than the original value, e.g. (uint64_t)1 << 53 = 0x20000000000000 ((uint64_t)1 << 53) << 10 = 0x8000000000000000
* Simplify expand_number() by combining the (unrolled) loop with thedes2010-08-142-27/+27
| | | | | | | switch. Since expand_number() does not accept negative numbers, switch from int64_t to uint64_t; this makes it easier to check for overflow. MFC after: 3 weeks
* Fix typos and spelling mistakes.joel2010-08-061-1/+1
|
* Spelling fixes.joel2010-08-033-3/+3
|
* Update to current version of head.mckusick2010-04-2819-25/+18
|\
| * mdoc: order prologue macros consistently by Dd/Dt/Osuqs2010-04-1418-18/+18
| | | | | | | | | | | | | | | | Although groff_mdoc(7) gives another impression, this is the ordering most widely used and also required by mdocml/mandoc. Reviewed by: ru Approved by: philip, ed (mentors)
| * The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-021-7/+0
| | | | | | | | | | | | their software. Obtained from: NetBSD
* | Debugging nits found while testing the new 64-bit quota code.mckusick2010-03-161-16/+18
| |
* | IFH@204581des2010-03-0411-469/+40
|\ \ | |/
| * 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
| * Remove login(3), logout(3) and logwtmp(3) from libutil.ed2010-01-138-459/+4
| | | | | | | | | | | | | | | | | | | | These functions only apply to utmp(5). They cannot be kept intact when moving towards utmpx. The login(3) function would break, because its argument is an utmp structure. The logout(3) and logwtmp(3) functions cannot be used, since they provide a functionality which partially overlaps. Increment SHLIB_MAJOR to 9 to indicate the removal.
| * Build lib/ with WARNS=6 by default.ed2010-01-021-2/+0
| | | | | | | | | | | | | | | | | | Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway.
| * Remove a dead store.scf2009-12-121-2/+2
| | | | | | | | MFC after: 5 days
| * Make <libutil.h> work when included by itself.ed2009-12-021-0/+28
| | | | | | | | | | | | | | There are several reasons why it didn't work: - It was missing <sys/cdefs.h> for __BEGIN_DECLS. - It uses various primitive types that were not declared.
| * sigset() is the name of function specified by SUSv4.kib2009-11-261-4/+4
| | | | | | | | | | | | Replace it to avoid conflict. MFC after: 3 weeks
* | Add and document the quota_convert function which converts between themckusick2009-12-283-10/+124
| | | | | | | | old 32-bit and the new 64-bit formats.
* | Minor bugs turned up during conversion of quotacheck.mckusick2009-12-271-6/+7
| |
* | Add and document new quoat_on and quota_off functions.mckusick2009-11-163-49/+104
| |
* | Add quota_maxid which returns the maximum user (or group) identifiermckusick2009-10-203-5/+36
| | | | | | | | | | | | in an associated quotafile. Needed by repquota. Bug fix in quota_read.
* | Further extend the quotafile API.des2009-09-264-42/+137
| |
* | Styledes2009-09-251-6/+6
| |
* | Merge from headdes2009-09-179-41/+41
|\ \ | |/
| * Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-191-1/+1
| | | | | | | | | | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson)
| * Fix copy-and-paste-o's from kinfo_getfile.3 in kinfo_getvmmap.3.rwatson2009-06-241-2/+2
| | | | | | | | MFC after: 3 days
| * Merge NetBSD revision 1.14: humanize_number.c is now 2-clause BSD licensed.delphij2009-06-231-8/+1
| | | | | | | | | | | | | | (humanize_number.3 intentionally hold back until I make sure why we didn't merged dehumanize_number(3)). Obtained from: NetBSD
| * Usermode portion of the support for swap allocation accounting:kib2009-06-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | - update for getrlimit(2) manpage; - support for setting RLIMIT_SWAP in login class; - addition to the limits(1) and sh and csh limit-setting builtins; - tuning(7) documentation on the sysctls controlling overcommit. In collaboration with: pho Reviewed by: alc Approved by: re (kensmith)
| * Note that the structures are defined in <sys/user.h> in the text (usingjhb2009-06-152-4/+4
| | | | | | | | | | | | language from stat(2)) rather than in the synopsis. Requested by: bde
| * - Note that these interfaces require <sys/user.h> for the structurejhb2009-06-122-2/+12
| | | | | | | | | | | | | | definitions. - Note that these functions return NULL on failure. MFC after: 3 days
| * Revert (once again, and hopefully for the last time) to flock(2) locks.des2009-06-062-23/+14
| | | | | | | | | | | | The problem with fcntl(2) locks is that they are not inherited by child processes. This breaks pidfile(3), where the common idiom is to open and lock the PID file before daemonizing.
| * Add missing .Ppdes2009-06-061-0/+1
| |
| * Add tcsetsid(3).ed2009-05-071-3/+7
| | | | | | | | | | | | | | | | | | | | | | The entire world seems to use the non-standard TIOCSCTTY ioctl to make a TTY a controlling terminal of a session. Even though tcsetsid(3) is also non-standard, I think it's a lot better to use in our own source code, mainly because it's similar to tcsetpgrp(), tcgetpgrp() and tcgetsid(). I stole the idea from QNX. They do it the other way around; their TIOCSCTTY is just a wrapper around tcsetsid(). tcsetsid() then calls into an IPC framework.
* | Merge from head up to r188941 (last revision before the USB stack switch)des2009-09-175-11/+161
|\ \ | |/
| * Include param.h instead of types.h when using user.h. Otherwise there isrwatson2008-12-272-2/+2
| | | | | | | | | | | | | | a dependence on ucred.h including audit.h including param.h, which we would like to eliminate. MFC after: 3 weeks
| * Initialize the cntp pointer to 0 prior to doing any work so that callersmarcus2008-12-192-8/+10
| | | | | | | | | | | | | | | | don't try to iterate through garbage or NULL memory. Additionally, return NULL instead of 0 on error. Reviewed by: peter Approved by: peter
| * Add filler man pages for the kinfo functions I added recently.peter2008-12-073-1/+149
| | | | | | | | While here, hook up the hexdump(3) man page which wasn't being installed.
* | Update the quotafile library to manage both active quotas via themckusick2009-02-143-103/+304
| | | | | | | | | | | | | | | | quotactl(2) interface and inactive quotas by accessing the quota files directly. Update the edquota program to use this new interface as proof of concept.
* | Make hasquota thread safe.mckusick2009-02-132-10/+9
| |
* | Move hasquota() function to libutil.mckusick2009-02-131-0/+2
| |
* | Move hasquota() function to libutil.mckusick2009-02-132-2/+56
| |
* | Bug fixes found from using these functions in edquota.mckusick2009-02-102-4/+4
| |
* | WIPdes2009-01-304-3/+357
|/
* Attempt a quick bandaid for arm build breakage. I went to the trouble ofpeter2008-12-022-4/+4
| | | | maintaining alignment, but I'm not sure how to tell gcc this.
* Add experimental front ends to the kinfo_vmentry and kinfo_filedescpeter2008-11-304-1/+152
| | | | sysctls.
OpenPOWER on IntegriCloud