]> git.cameronkatri.com Git - pw-darwin.git/log
pw-darwin.git
13 years agoIFC @ r227804
Peter Grehan [Tue, 22 Nov 2011 02:27:59 +0000 (02:27 +0000)]
IFC @ r227804

Pull in the virtio drivers from head.

13 years agoMark the structure fields as const.
Ed Schouten [Sun, 6 Nov 2011 17:20:44 +0000 (17:20 +0000)]
Mark the structure fields as const.

This allows us to simply place these strings as constants in the table
itself, letting the compiler decide to simply merge duplicate strings.

13 years agoIFC @ r225592
Peter Grehan [Thu, 15 Sep 2011 22:14:35 +0000 (22:14 +0000)]
IFC @ r225592

sys/dev/bvm/bvm_console.c - move up to the new alt-break order.

13 years agoBackout r223115 which potentially caused a POLA violation, by restoring
Xin LI [Sun, 31 Jul 2011 03:00:00 +0000 (03:00 +0000)]
Backout r223115 which potentially caused a POLA violation, by restoring
historic behavior (create the default base directory in pw.conf) before
I came up with a better fix for this.

Requested by: nwhitehorn
Approved by: re (kib)

13 years agoIFC @ r222830
Peter Grehan [Tue, 28 Jun 2011 06:26:03 +0000 (06:26 +0000)]
IFC @ r222830

13 years agoDon't attempt to create the base directory when -d is specified.
Xin LI [Wed, 15 Jun 2011 19:09:58 +0000 (19:09 +0000)]
Don't attempt to create the base directory when -d is specified.

MFC after: 1 month

13 years agoFirst cut to port bhyve, vmmctl, and libvmmapi to HEAD.
John Baldwin [Sun, 15 May 2011 04:03:11 +0000 (04:03 +0000)]
First cut to port bhyve, vmmctl, and libvmmapi to HEAD.

13 years agoFirst cut at porting the kernel portions of 221828 and 221905 from the
John Baldwin [Sat, 14 May 2011 20:35:01 +0000 (20:35 +0000)]
First cut at porting the kernel portions of 221828 and 221905 from the
BHyVe reference branch to HEAD.

13 years ago- Commit work from libprocstat project. These patches add support for runtime
Stanislav Sedov [Thu, 12 May 2011 10:11:39 +0000 (10:11 +0000)]
- Commit work from libprocstat project.  These patches add support for runtime
  file and processes information retrieval from the running kernel via sysctl
  in the form of new library, libprocstat.  The library also supports KVM backend
  for analyzing memory crash dumps.  Both procstat(1) and fstat(1) utilities have
  been modified to take advantage of the library (as the bonus point the fstat(1)
  utility no longer need superuser privileges to operate), and the procstat(1)
  utility is now able to display information from memory dumps as well.

  The newly introduced fuser(1) utility also uses this library and able to operate
  via sysctl and kvm backends.

  The library is by no means complete (e.g. KVM backend is missing vnode name
  resolution routines, and there're no manpages for the library itself) so I
  plan to improve it further.  I'm commiting it so it will get wider exposure
  and review.

  We won't be able to MFC this work as it relies on changes in HEAD, which
  was introduced some time ago, that break kernel ABI.  OTOH we may be able
  to merge the library with KVM backend if we really need it there.

Discussed with: rwatson

13 years agoDon't duplicate define the stdint types.
David E. O'Brien [Thu, 5 May 2011 14:45:24 +0000 (14:45 +0000)]
Don't duplicate define the stdint types.

13 years agoAdd support for IEE/IEC (and now also SI) power of two notions of
Xin LI [Tue, 12 Apr 2011 22:48:03 +0000 (22:48 +0000)]
Add support for IEE/IEC (and now also SI) power of two notions of
prefixes (Ki, Mi, Gi...) for humanize_number(3).

Note that applications has to pass HN_IEC_PREFIXES to use this
feature for backward compatibility reasons.

Reviewed by: arundel
MFC after: 2 weeks

13 years agoMerge svn+ssh://svn.freebsd.org/base/head@219553
Marcel Moolenaar [Sat, 12 Mar 2011 01:26:04 +0000 (01:26 +0000)]
Merge svn+ssh://svn.freebsd.org/base/head@219553

13 years agoStop hard-coding default directory mode as 0777.
Jung-uk Kim [Tue, 8 Mar 2011 20:13:29 +0000 (20:13 +0000)]
Stop hard-coding default directory mode as 0777.

13 years agoexpand_number() needs uint64_t, declare it here if not already declared.
Pawel Jakub Dawidek [Sun, 6 Mar 2011 17:46:06 +0000 (17:46 +0000)]
expand_number() needs uint64_t, declare it here if not already declared.

MFC after: 3 days

13 years agoAdd two new system calls, setloginclass(2) and getloginclass(2). This makes
Edward Tomasz Napierala [Sat, 5 Mar 2011 12:40:35 +0000 (12:40 +0000)]
Add two new system calls, setloginclass(2) and getloginclass(2).  This makes
it possible for the kernel to track login class the process is assigned to,
which is required for RCTL.  This change also make setusercontext(3) call
setloginclass(2) and makes it possible to retrieve current login class using
id(1).

Reviewed by: kib (as part of a larger patch)

13 years agoMerge svn+ssh://svn.freebsd.org/base/head@218816
Marcel Moolenaar [Fri, 18 Feb 2011 21:39:09 +0000 (21:39 +0000)]
Merge svn+ssh://svn.freebsd.org/base/head@218816

13 years agoDo not let pw.conf(5) or -M option affect creation of basehome, e.g., /home.
Jung-uk Kim [Fri, 4 Feb 2011 19:49:02 +0000 (19:49 +0000)]
Do not let pw.conf(5) or -M option affect creation of basehome, e.g., /home.
When the basehome does not exist, it creates all intermediate directories as
required, which is logically equivalent to mkdir(1) with -m and -p options.
However, it modifies all intermediate directories, not just the final home
directory unlike mkdir.  This problem was introduced in two revisions, i.e.,
r1.59 (SVN r167919) and r1.60 (SVN r168044).

MFC after: 1 month

14 years agoRemove the advertising clause from UCB copyrighted files in usr.bin. This
Joel Dahl [Sat, 11 Dec 2010 08:32:16 +0000 (08:32 +0000)]
Remove the advertising clause from UCB copyrighted files in usr.bin.  This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson

14 years agoMerge svn+ssh://svn.freebsd.org/base/head@214309
Marcel Moolenaar [Tue, 26 Oct 2010 02:34:47 +0000 (02:34 +0000)]
Merge svn+ssh://svn.freebsd.org/base/head@214309

14 years agomdoc: drop redundant .Pp and .LP calls
Ulrich Spörlein [Fri, 8 Oct 2010 12:40:16 +0000 (12:40 +0000)]
mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd

14 years agoRevert the unrelated patch crept in the previous commit.
Jung-uk Kim [Tue, 5 Oct 2010 18:47:51 +0000 (18:47 +0000)]
Revert the unrelated patch crept in the previous commit.

14 years agoPrefer pmap_unmapbios() over pmap_unmapdev(). The binary does not change
Jung-uk Kim [Tue, 5 Oct 2010 18:38:23 +0000 (18:38 +0000)]
Prefer pmap_unmapbios() over pmap_unmapdev().  The binary does not change
after this because pmap_unmapbios() is a macro for pmap_unmapdev() on amd64.

14 years agoOld patch I had lying around: clean up and use stpcpy(3) instead of
Dag-Erling Smørgrav [Mon, 16 Aug 2010 11:22:12 +0000 (11:22 +0000)]
Old patch I had lying around: clean up and use stpcpy(3) instead of
sprintf(3).

14 years agoMerge svn+ssh://svn.freebsd.org/base/head@211344
Marcel Moolenaar [Sun, 15 Aug 2010 22:09:43 +0000 (22:09 +0000)]
Merge svn+ssh://svn.freebsd.org/base/head@211344

14 years agoSimplify expand_number() by combining the (unrolled) loop with the
Dag-Erling Smørgrav [Sat, 14 Aug 2010 14:34:36 +0000 (14:34 +0000)]
Simplify expand_number() by combining the (unrolled) loop with the
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

14 years agoMerge svn+ssh://svn.freebsd.org/base/head@208557
Marcel Moolenaar [Wed, 26 May 2010 04:14:29 +0000 (04:14 +0000)]
Merge svn+ssh://svn.freebsd.org/base/head@208557

14 years agomdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
Ulrich Spörlein [Thu, 13 May 2010 12:07:55 +0000 (12:07 +0000)]
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
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

14 years agomdoc: remove stray and
Ulrich Spörlein [Tue, 11 May 2010 23:08:22 +0000 (23:08 +0000)]
mdoc: remove stray and

Found via: mdocml
Reviewed by: brueffer

14 years agoMerge svn+ssh://svn.freebsd.org/base/head@207793
Marcel Moolenaar [Sat, 8 May 2010 20:08:01 +0000 (20:08 +0000)]
Merge svn+ssh://svn.freebsd.org/base/head@207793

14 years agoFinal update to current version of head in preparation for reintegration.
Kirk McKusick [Thu, 6 May 2010 17:37:23 +0000 (17:37 +0000)]
Final update to current version of head in preparation for reintegration.

14 years agoRestore historical behaviour of only executing chflags on files that exist.
Ed Maste [Tue, 4 May 2010 11:34:13 +0000 (11:34 +0000)]
Restore historical behaviour of only executing chflags on files that exist.
This eliminates cosmetic errors of the form "chflags: ...: No such file or
directory" during an installworld to an empty destination.

14 years agoUpdate to current version of head.
Kirk McKusick [Wed, 28 Apr 2010 05:33:59 +0000 (05:33 +0000)]
Update to current version of head.

14 years agoMerge svn+ssh://svn.freebsd.org/base/head@205454
Marcel Moolenaar [Mon, 22 Mar 2010 18:51:56 +0000 (18:51 +0000)]
Merge svn+ssh://svn.freebsd.org/base/head@205454

14 years agoCreate the altix project branch. The altix project will add support
Marcel Moolenaar [Wed, 10 Mar 2010 02:16:04 +0000 (02:16 +0000)]
Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.

14 years agoIFH@204581
Dag-Erling Smørgrav [Thu, 4 Mar 2010 13:35:57 +0000 (13:35 +0000)]
IFH@204581

14 years agoLet the afterinstall target ignore failures from running chflags. This
Scott Long [Thu, 4 Mar 2010 12:35:20 +0000 (12:35 +0000)]
Let the afterinstall target ignore failures from running chflags.  This
allows it to work over NFS, and puts it back into conformance with other
'schg' utlitilties in the system.

Reviewed by: ed

15 years agoFix a few whitespace issues and comment typos that I found while reading
Joel Dahl [Thu, 14 Jan 2010 22:04:08 +0000 (22:04 +0000)]
Fix a few whitespace issues and comment typos that I found while reading
through this file.

15 years agoThe group field is called `gid', not `group'.
Ed Schouten [Thu, 14 Jan 2010 11:03:26 +0000 (11:03 +0000)]
The group field is called `gid', not `group'.

15 years agoRemove login(3), logout(3) and logwtmp(3) from libutil.
Ed Schouten [Wed, 13 Jan 2010 18:59:51 +0000 (18:59 +0000)]
Remove login(3), logout(3) and logwtmp(3) from libutil.

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.

15 years agoThe last big commit: let usr.sbin/ use WARNS=6 by default.
Ed Schouten [Sat, 2 Jan 2010 11:07:44 +0000 (11:07 +0000)]
The last big commit: let usr.sbin/ use WARNS=6 by default.

15 years agoBuild usr.bin/ with WARNS=6 by default.
Ed Schouten [Sat, 2 Jan 2010 10:27:05 +0000 (10:27 +0000)]
Build usr.bin/ with WARNS=6 by default.

Also add some missing $FreeBSD$ to keep svn happy.

15 years agoAdd and document the quota_convert function which converts between the
Kirk McKusick [Mon, 28 Dec 2009 22:44:19 +0000 (22:44 +0000)]
Add and document the quota_convert function which converts between the
old 32-bit and the new 64-bit formats.

15 years agoMerge from head to stable/8:
Sean Farley [Fri, 18 Dec 2009 20:05:10 +0000 (20:05 +0000)]
Merge from head to stable/8:

r200423:
Remove a dead store.

15 years agoMFC r199826:
Konstantin Belousov [Thu, 17 Dec 2009 18:56:52 +0000 (18:56 +0000)]
MFC r199826:
sigset() is the name of function specified by SUSv4.
Replace it to avoid conflict.

15 years agoRemove a dead store.
Sean Farley [Sat, 12 Dec 2009 00:11:40 +0000 (00:11 +0000)]
Remove a dead store.

MFC after: 5 days

15 years agoMake pw(8) build without <utmp.h>.
Ed Schouten [Sun, 6 Dec 2009 01:27:28 +0000 (01:27 +0000)]
Make pw(8) build without <utmp.h>.

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.

15 years agoMake <libutil.h> work when included by itself.
Ed Schouten [Wed, 2 Dec 2009 15:56:18 +0000 (15:56 +0000)]
Make <libutil.h> work when included by itself.

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.

15 years agosigset() is the name of function specified by SUSv4.
Konstantin Belousov [Thu, 26 Nov 2009 13:41:15 +0000 (13:41 +0000)]
sigset() is the name of function specified by SUSv4.
Replace it to avoid conflict.

MFC after: 3 weeks

15 years agoAdd and document new quoat_on and quota_off functions.
Kirk McKusick [Mon, 16 Nov 2009 18:59:04 +0000 (18:59 +0000)]
Add and document new quoat_on and quota_off functions.

15 years agoAdd quota_maxid which returns the maximum user (or group) identifier
Kirk McKusick [Tue, 20 Oct 2009 05:37:54 +0000 (05:37 +0000)]
Add quota_maxid which returns the maximum user (or group) identifier
in an associated quotafile. Needed by repquota.

Bug fix in quota_read.

15 years agoFurther extend the quotafile API.
Dag-Erling Smørgrav [Sat, 26 Sep 2009 23:16:06 +0000 (23:16 +0000)]
Further extend the quotafile API.

15 years agoMerge from head
Dag-Erling Smørgrav [Thu, 17 Sep 2009 16:16:44 +0000 (16:16 +0000)]
Merge from head

15 years agoMerge from head up to r188941 (last revision before the USB stack switch)
Dag-Erling Smørgrav [Thu, 17 Sep 2009 13:31:39 +0000 (13:31 +0000)]
Merge from head up to r188941 (last revision before the USB stack switch)

15 years agoIt is believed the last subsystem that limited ID sizes to something
Ken Smith [Wed, 22 Jul 2009 20:46:17 +0000 (20:46 +0000)]
It is believed the last subsystem that limited ID sizes to something
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)

15 years agoMake the chpass Makefile honour NO_FSCHG.
Ed Schouten [Mon, 15 Jun 2009 21:05:00 +0000 (21:05 +0000)]
Make the chpass Makefile honour NO_FSCHG.

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.

15 years agoRevert (once again, and hopefully for the last time) to flock(2) locks.
Dag-Erling Smørgrav [Sat, 6 Jun 2009 18:47:03 +0000 (18:47 +0000)]
Revert (once again, and hopefully for the last time) to flock(2) locks.
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.

15 years agoUpdate the quotafile library to manage both active quotas via the
Kirk McKusick [Sat, 14 Feb 2009 08:08:08 +0000 (08:08 +0000)]
Update the quotafile library to manage both active quotas via the
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.

15 years agoMake hasquota thread safe.
Kirk McKusick [Fri, 13 Feb 2009 19:56:59 +0000 (19:56 +0000)]
Make hasquota thread safe.

15 years agoMove hasquota() function to libutil.
Kirk McKusick [Fri, 13 Feb 2009 06:12:15 +0000 (06:12 +0000)]
Move hasquota() function to libutil.

15 years agoWIP
Dag-Erling Smørgrav [Fri, 30 Jan 2009 13:54:03 +0000 (13:54 +0000)]
WIP

16 years agoMerge support for CVSMode (aka. mirror mode) into csup. This means csup can now
Ulf Lilleengen [Mon, 5 Jan 2009 15:18:16 +0000 (15:18 +0000)]
Merge support for CVSMode (aka. mirror mode) into csup. This means csup can now
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.

16 years agointegrate from head@185615
Dag-Erling Smørgrav [Thu, 4 Dec 2008 18:48:08 +0000 (18:48 +0000)]
integrate from head@185615

16 years agoMerge user/peter/kinfo branch as of r185547 into head.
Peter Wemm [Tue, 2 Dec 2008 06:50:26 +0000 (06:50 +0000)]
Merge user/peter/kinfo branch as of r185547 into head.

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.

16 years agoFixed style issues with variable ordering and naming, spacing and
Sean Farley [Sun, 23 Nov 2008 23:26:12 +0000 (23:26 +0000)]
Fixed style issues with variable ordering and naming, spacing and
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

16 years agostyle(9) fixes.
Sean Farley [Tue, 11 Nov 2008 00:32:55 +0000 (00:32 +0000)]
style(9) fixes.

MFC after: 1 week

16 years agoMFH (r184638): build at WARNS level 6
Dag-Erling Smørgrav [Tue, 4 Nov 2008 14:20:08 +0000 (14:20 +0000)]
MFH (r184638): build at WARNS level 6

16 years agoMFH (r184633, r184635): build at WARNS level 6
Dag-Erling Smørgrav [Tue, 4 Nov 2008 13:54:07 +0000 (13:54 +0000)]
MFH (r184633, r184635): build at WARNS level 6

16 years agoAvoid assigning a const char * to a char *.
Dag-Erling Smørgrav [Tue, 4 Nov 2008 13:49:53 +0000 (13:49 +0000)]
Avoid assigning a const char * to a char *.

MFC after: 3 weeks

16 years agoCommitted to wrong branch.
Dag-Erling Smørgrav [Tue, 4 Nov 2008 13:49:18 +0000 (13:49 +0000)]
Committed to wrong branch.

16 years agoAvoid assigning a const char * to a char *.
Dag-Erling Smørgrav [Tue, 4 Nov 2008 13:44:43 +0000 (13:44 +0000)]
Avoid assigning a const char * to a char *.

MFC after: 3 weeks

16 years agoDiff reduction against Varnish, including one important fix: use a shared
Dag-Erling Smørgrav [Mon, 20 Oct 2008 18:11:30 +0000 (18:11 +0000)]
Diff reduction against Varnish, including one important fix: use a shared
lock if the file is opened with O_RDONLY.

16 years agoReimplement flopen(3) using fcntl(2) locks instead of flock(2) locks.
Dag-Erling Smørgrav [Mon, 20 Oct 2008 18:02:16 +0000 (18:02 +0000)]
Reimplement flopen(3) using fcntl(2) locks instead of flock(2) locks.

16 years agoSince in_lt() and in_lts() are not static, assume that they are intended to
Dag-Erling Smørgrav [Mon, 20 Oct 2008 17:17:58 +0000 (17:17 +0000)]
Since in_lt() and in_lts() are not static, assume that they are intended to
be part of the public API.  Accordingly, add prototypes and document them.

16 years agoSince setclasscpumask() is not static, assume that it is intended to be
Dag-Erling Smørgrav [Mon, 20 Oct 2008 17:03:05 +0000 (17:03 +0000)]
Since setclasscpumask() is not static, assume that it is intended to be
part of the public API.  Accordingly, add a prototype and document it.

16 years agoStyle and whitespace.
Dag-Erling Smørgrav [Mon, 20 Oct 2008 16:54:53 +0000 (16:54 +0000)]
Style and whitespace.

16 years ago- Import the Makefile from HEAD for building csup.
Ulf Lilleengen [Sun, 19 Oct 2008 08:43:16 +0000 (08:43 +0000)]
- Import the Makefile from HEAD for building csup.

16 years ago- Import the HEAD csup code which is the basis for the cvsmode work.
Ulf Lilleengen [Sun, 19 Oct 2008 08:41:10 +0000 (08:41 +0000)]
- Import the HEAD csup code which is the basis for the cvsmode work.

16 years agoUse arc4random_uniform() to avoid "modulo bias"
Andrey A. Chernov [Sat, 16 Aug 2008 15:41:03 +0000 (15:41 +0000)]
Use arc4random_uniform() to avoid "modulo bias"

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.

16 years agoThe original adduser/rmuser scripts in Perl used to modify the PATH
John Baldwin [Wed, 30 Jul 2008 18:37:21 +0000 (18:37 +0000)]
The original adduser/rmuser scripts in Perl used to modify the PATH
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

16 years agoAdd support for a new login capability, cpumask which allows login
Brooks Davis [Fri, 25 Jul 2008 19:58:14 +0000 (19:58 +0000)]
Add support for a new login capability, cpumask which allows login
sessions to be pinned to cpus by login class.

16 years agoBefore updating the password database, the pw(8) utility first performs a
John Baldwin [Thu, 17 Jul 2008 13:47:59 +0000 (13:47 +0000)]
Before updating the password database, the pw(8) utility first performs a
sanity check by invoking "pwd_mkdb -C".  However, if this failed it
silently returned success.  Fix this so it fails the update operation
instead.

MFC after: 1 week

16 years agoMerge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing
John Baldwin [Tue, 1 Jul 2008 22:30:57 +0000 (22:30 +0000)]
Merge hexdump(9) to userland as hexdump(3) in libutil.  I'm tired of doing
this by hand in userland utilities.

MFC after: 1 month

16 years ago- Increase the size of the salt in pw(8) from 8 to 32 (same as in pam_unix(8)).
Antoine Brodin [Tue, 27 May 2008 19:04:31 +0000 (19:04 +0000)]
- Increase the size of the salt in pw(8) from 8 to 32 (same as in pam_unix(8)).
 This makes blowfish password hashes look normal when set using
pw(8)/adduser(8). [1]
- Make it possible to have a '/' in the salt.

PR: 121146 [1]
Submitted by: Jaakko Heinonen [1]
Approved by: rwatson (mentor)
MFC after: 1 month

16 years agoAdd four utility functions related to struct grp processing modeled in-part
Sean Farley [Wed, 23 Apr 2008 00:49:13 +0000 (00:49 +0000)]
Add four utility functions related to struct grp processing modeled in-part
after similar calls related to struct pwd in libutil/pw_util.c:
  - gr_equal()
    Perform a deep comparison of two struct grp's.  It does a thorough, yet
    unoptimized comparison of all the members regardless of order.

  - gr_make()
    Create a string (see group(5)) from a struct grp.

  - gr_dup()
    Duplicate a struct grp.  Returns a value that is a single contiguous
    block of memory.

  - gr_scan()
    Create a struct grp from a string (as produced by gr_make()).

MFC after: 3 weeks

16 years agoIn the description of the password field, -w was meant, not the
Christian Brueffer [Sun, 16 Mar 2008 21:36:05 +0000 (21:36 +0000)]
In the description of the password field, -w was meant, not the
nonexistant -p flag.

PR: 120122
Submitted by: Andy Kosela <andy.kosela@gmail.com>
MFC after: 3 days

16 years agoAdd the groupmod '-d' option to pw to allow the deletion of existing users
Sean Farley [Sat, 23 Feb 2008 01:25:22 +0000 (01:25 +0000)]
Add the groupmod '-d' option to pw to allow the deletion of existing users
from a group without the need to perform the same operation by replacing
the existing list via the '-M' option.  The '-M' option requires someone
to fetch the existing members with pw, deleting the undesired members from
the list and sending the altered list back to pw.

Approved by: wes (mentor)
MFC after: 5 days

16 years agostyle(9) (verified no object changes)
Sean Farley [Sat, 23 Feb 2008 01:17:42 +0000 (01:17 +0000)]
style(9) (verified no object changes)

Approved by: wes (mentor)
MFC after: 5 days

16 years agoAdd the -M command-line option, which will set home directory permissions.
Mike Makonnen [Sun, 27 Jan 2008 10:15:36 +0000 (10:15 +0000)]
Add the -M command-line option, which will set home directory permissions.
Works both in interactive or batch mode. This is a heavily modified version
of the patch submitted in the PR.

PR: bin/105060
MFC after: 1 week

16 years agoClarify in what formats the grouplist for the '-G' switch may be accepted.
Mike Makonnen [Fri, 25 Jan 2008 15:54:14 +0000 (15:54 +0000)]
Clarify in what formats the grouplist for the '-G' switch may be accepted.

Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>

17 years agoConstify the first argument to expand_number() so that it can
John Birrell [Sun, 18 Nov 2007 02:20:02 +0000 (02:20 +0000)]
Constify the first argument to expand_number() so that it can
be called with a const without the compiler grisling.

17 years agoAllow adding a user(s) to additional groups in batch mode as well.
Mike Makonnen [Sat, 20 Oct 2007 00:45:31 +0000 (00:45 +0000)]
Allow adding a user(s) to additional groups in batch mode as well.

Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> (modulo minor changes)
MFC after: 2 weeks

17 years agoThe POP daemon's temporary mail file has a leading dot ('.'). This was
Mike Makonnen [Fri, 19 Oct 2007 07:18:56 +0000 (07:18 +0000)]
The POP daemon's temporary mail file has a leading dot ('.'). This was
lost in the shell script rewrite of the rmuser command.

Submitted by: Ian Smith <smithi@nimnet.asn.au>

17 years agoImplement expand_number(3), which is the opposite of humanize_number(3), ie.
Pawel Jakub Dawidek [Sat, 1 Sep 2007 06:19:11 +0000 (06:19 +0000)]
Implement expand_number(3), which is the opposite of humanize_number(3), ie.
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)

17 years agoBack out previous commit until I figure out why my regression test fails.
Dag-Erling Smørgrav [Fri, 3 Aug 2007 09:20:28 +0000 (09:20 +0000)]
Back out previous commit until I figure out why my regression test fails.

Approved by: re (kensmith)

17 years agoUse fcntl(2)-style locks instead of less-portable flock(2)-style locks.
Dag-Erling Smørgrav [Fri, 3 Aug 2007 06:32:45 +0000 (06:32 +0000)]
Use fcntl(2)-style locks instead of less-portable flock(2)-style locks.

Approved by: re (kensmith)

17 years agoUpdate some comments, mostly regarding LOGIN_MECLASS and ~/.login_conf.
Yaroslav Tykhiy [Thu, 14 Jun 2007 06:42:49 +0000 (06:42 +0000)]
Update some comments, mostly regarding LOGIN_MECLASS and ~/.login_conf.

17 years agoNit: avoid shadowing truncate(2) with a local variable.
Dag-Erling Smørgrav [Wed, 23 May 2007 12:09:33 +0000 (12:09 +0000)]
Nit: avoid shadowing truncate(2) with a local variable.

17 years agoFix stupid braino in previous commit.
Dag-Erling Smørgrav [Wed, 23 May 2007 10:06:03 +0000 (10:06 +0000)]
Fix stupid braino in previous commit.

17 years agoIf (flags & O_TRUNC), don't truncate the file until we've successfully
Dag-Erling Smørgrav [Wed, 23 May 2007 08:12:34 +0000 (08:12 +0000)]
If (flags & O_TRUNC), don't truncate the file until we've successfully
locked it.

MFC after: 3 weeks

17 years agoWell gag me with a spoon... I'm so used to working at high WARNS levels
Dag-Erling Smørgrav [Thu, 10 May 2007 15:01:42 +0000 (15:01 +0000)]
Well gag me with a spoon...   I'm so used to working at high WARNS levels
that I make stupid fundamental mistakes like this when I don't.