summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Simplify expand_number() by combining the (unrolled) loop with theDag-Erling Smørgrav2010-08-141-1/+1
| | | | | | | 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
* mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to theUlrich Spörlein2010-05-131-3/+3
| | | | | | | | | | | bottom of the manpages and order them consistently. GNU groff doesn't care about the ordering, and doesn't even mention CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put them. Found by: mdocml lint run Reviewed by: ru
* mdoc: remove stray andUlrich Spörlein2010-05-111-1/+0
| | | | | Found via: mdocml Reviewed by: brueffer
* Final update to current version of head in preparation for reintegration.Kirk McKusick2010-05-061-0/+2
|\
| * Restore historical behaviour of only executing chflags on files that exist.Ed Maste2010-05-041-0/+2
| | | | | | | | | | This eliminates cosmetic errors of the form "chflags: ...: No such file or directory" during an installworld to an empty destination.
* | Update to current version of head.Kirk McKusick2010-04-281-1/+1
|\|
| * Let the afterinstall target ignore failures from running chflags. ThisScott Long2010-03-041-1/+1
| | | | | | | | | | | | | | allows it to work over NFS, and puts it back into conformance with other 'schg' utlitilties in the system. Reviewed by: ed
* | IFH@204581Dag-Erling Smørgrav2010-03-048-28/+46
|\|
| * Fix a few whitespace issues and comment typos that I found while readingJoel Dahl2010-01-141-11/+9
| | | | | | | | through this file.
| * The group field is called `gid', not `group'.Ed Schouten2010-01-141-1/+1
| |
| * Remove login(3), logout(3) and logwtmp(3) from libutil.Ed Schouten2010-01-131-4/+0
| | | | | | | | | | | | | | | | | | | | 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.
| * The last big commit: let usr.sbin/ use WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| |
| * Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | | | | | Also add some missing $FreeBSD$ to keep svn happy.
| * Remove a dead store.Sean Farley2009-12-121-2/+2
| | | | | | | | MFC after: 5 days
| * Make pw(8) build without <utmp.h>.Ed Schouten2009-12-061-5/+0
| | | | | | | | | | | | The size of the username record in utmp files should not influence the maximum username length. Right now ut_user/ut_name is big enough, so in this case it's dead code anyway.
| * Make <libutil.h> work when included by itself.Ed Schouten2009-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.Konstantin Belousov2009-11-261-4/+4
| | | | | | | | | | | | Replace it to avoid conflict. MFC after: 3 weeks
* | Add and document the quota_convert function which converts between theKirk McKusick2009-12-281-0/+1
| | | | | | | | old 32-bit and the new 64-bit formats.
* | Add and document new quoat_on and quota_off functions.Kirk McKusick2009-11-161-1/+3
| |
* | Add quota_maxid which returns the maximum user (or group) identifierKirk McKusick2009-10-201-0/+1
| | | | | | | | | | | | in an associated quotafile. Needed by repquota. Bug fix in quota_read.
* | Further extend the quotafile API.Dag-Erling Smørgrav2009-09-261-1/+4
| |
* | Merge from headDag-Erling Smørgrav2009-09-173-18/+27
|\|
| * It is believed the last subsystem that limited ID sizes to somethingKen Smith2009-07-221-7/+18
| | | | | | | | | | | | | | | | | | | | other than the current system-wide size (32-bits) has been updated so for now just cautiously turn the check off. While here fix the check for IDs being too large which doesn't work due to type mis-matches. Reviewed by: jhb (previous version) Approved by: re (kib) MFC after: 1 month (type mis-match fixes only)
| * Make the chpass Makefile honour NO_FSCHG.Ed Schouten2009-06-151-3/+4
| | | | | | | | | | | | | | | | | | | | The chpass Makefile tried to set the fschg flag on the binaries, even if NO_FSCHG was passed to the installworld. This meant that if I installed FreeBSD into a Jail, I couldn't installworld from within the Jail anymore. Now that it listens to NO_FSCHG, we can just make it bail out when it fails, just like PRECIOUSPROG does.
| * Revert (once again, and hopefully for the last time) to flock(2) locks.Dag-Erling Smørgrav2009-06-061-8/+5
| | | | | | | | | | | | 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.
* | Merge from head up to r188941 (last revision before the USB stack switch)Dag-Erling Smørgrav2009-09-170-0/+0
|\|
| * Merge support for CVSMode (aka. mirror mode) into csup. This means csup can nowUlf Lilleengen2009-01-050-0/+0
| |\ | | | | | | | | | | | | | | | fetch a complete CVS repository. Support for rsync update of regular files are also included, but are not yet enabled. The change should not have an impact on existing csup usage, as little of the existing code has changed.
| | * - Import the Makefile from HEAD for building csup.Ulf Lilleengen2008-10-190-0/+0
| | |\
| | * | - Import the HEAD csup code which is the basis for the cvsmode work.Ulf Lilleengen2008-10-1948-12922/+0
| | |/
* | | Update the quotafile library to manage both active quotas via theKirk McKusick2009-02-141-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.Kirk McKusick2009-02-131-1/+1
| | |
* | | Move hasquota() function to libutil.Kirk McKusick2009-02-131-0/+2
| | |
* | | WIPDag-Erling Smørgrav2009-01-301-0/+9
| | |
* | | integrate from head@185615Dag-Erling Smørgrav2008-12-042-86/+108
|\| |
| * | Merge user/peter/kinfo branch as of r185547 into head.Peter Wemm2008-12-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes struct kinfo_filedesc and kinfo_vmentry such that they are same on both 32 and 64 bit platforms like i386/amd64 and won't require sysctl wrapping. Two new OIDs are assigned. The old ones are available under COMPAT_FREEBSD7 - but it isn't that simple. The superceded interface was never actually released on 7.x. The other main change is to pack the data passed to userland via the sysctl. kf_structsize and kve_structsize are reduced for the copyout. If you have a process with 100,000+ sockets open, the unpacked records require a 132MB+ copyout. With packing, it is "only" ~35MB. (Still seriously unpleasant, but not quite as devastating). A similar problem exists for the vmentry structure - have lots and lots of shared libraries and small mmaps and its copyout gets expensive too. My immediate problem is valgrind. It traditionally achieves this functionality by parsing procfs output, in a packed format. Secondly, when tracing 32 bit binaries on amd64 under valgrind, it uses a cross compiled 32 bit binary which ran directly into the differing data structures in 32 vs 64 bit mode. (valgrind uses this to track file descriptor operations and this therefore affected every single 32 bit binary) I've added two utility functions to libutil to unpack the structures into a fixed record length and to make it a little more convenient to use.
| * | Fixed style issues with variable ordering and naming, spacing andSean Farley2008-11-231-75/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parentheses. Fixed alignment issue in gr_dup() in its assignment of gr_mem using a struct to force alignment without performing alignment mathematics. This was noticed recently with libutil was built with WARNS=6 on platform such as sparc64. Added checks to gr_dup(), gr_equal() and gr_make() to prevent segfaults when examining struct group's with the struct members pointing to NULL's. With fix of alignment issue, restore WARNS?=6. Reviewed by: des MFC after: 1 week
| * | style(9) fixes.Sean Farley2008-11-111-20/+14
| | | | | | | | | | | | MFC after: 1 week
* | | MFH (r184638): build at WARNS level 6Dag-Erling Smørgrav2008-11-040-0/+0
|\| |
| * | Avoid assigning a const char * to a char *.Dag-Erling Smørgrav2008-11-041-4/+5
| | | | | | | | | | | | MFC after: 3 weeks
* | | MFH (r184633, r184635): build at WARNS level 6Dag-Erling Smørgrav2008-11-041-4/+5
| | |
* | | Committed to wrong branch.Dag-Erling Smørgrav2008-11-041-5/+4
| | |
* | | Avoid assigning a const char * to a char *.Dag-Erling Smørgrav2008-11-041-4/+5
|/ / | | | | | | MFC after: 3 weeks
* | Diff reduction against Varnish, including one important fix: use a sharedDag-Erling Smørgrav2008-10-201-12/+12
| | | | | | | | lock if the file is opened with O_RDONLY.
* | Reimplement flopen(3) using fcntl(2) locks instead of flock(2) locks.Dag-Erling Smørgrav2008-10-201-5/+7
| |
* | Since in_lt() and in_lts() are not static, assume that they are intended toDag-Erling Smørgrav2008-10-201-0/+2
| | | | | | | | be part of the public API. Accordingly, add prototypes and document them.
* | Since setclasscpumask() is not static, assume that it is intended to beDag-Erling Smørgrav2008-10-201-0/+1
| | | | | | | | part of the public API. Accordingly, add a prototype and document it.
* | Style and whitespace.Dag-Erling Smørgrav2008-10-201-15/+19
|/
* Use arc4random_uniform() to avoid "modulo bias"Andrey A. Chernov2008-08-161-55/+2
| | | | | | Remove pw_getrand() unneded now: arc4random_uniform() is stronger then pw_getrand()'s MD5 tricks (inactive) and its active version, mixing arc4random() bytes in one, not make things better at all.
* The original adduser/rmuser scripts in Perl used to modify the PATHJohn Baldwin2008-07-301-2/+3
| | | | | | | | | | | setting. When the scripts were converted to Bourne shell, this was removed. The adduser script was changed to use an explicit path for the pw(8) command so that /usr/sbin did not have to be in the user's PATH. The rmuser script continued to assume that /usr/sbin was in the user's path, however. This fixes the rmuser script to use an explicit path for pw(8) similar to adduser. MFC after: 2 weeks
* Add support for a new login capability, cpumask which allows loginBrooks Davis2008-07-251-1/+2
| | | | sessions to be pinned to cpus by login class.