summaryrefslogtreecommitdiffstats
path: root/lib/libutil
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2014-04-27 08:13:43 +0000
committersjg <sjg@FreeBSD.org>2014-04-27 08:13:43 +0000
commit0c7e03a54c8e7ddc9c3fe710f83d9ca53173692e (patch)
treeb92e741b68057a24e381faa9809f32030d65574c /lib/libutil
parentc244fcbcaa61dc2a15995e7dbdf3ae8107bc2111 (diff)
parent69c3e6933b6946c49fe99b19986f018d71621980 (diff)
downloadFreeBSD-src-0c7e03a54c8e7ddc9c3fe710f83d9ca53173692e.zip
FreeBSD-src-0c7e03a54c8e7ddc9c3fe710f83d9ca53173692e.tar.gz
Merge head
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/expand_number.33
-rw-r--r--lib/libutil/login.conf.514
-rw-r--r--lib/libutil/login_class.31
-rw-r--r--lib/libutil/login_class.c1
-rw-r--r--lib/libutil/pw_util.34
5 files changed, 17 insertions, 6 deletions
diff --git a/lib/libutil/expand_number.3 b/lib/libutil/expand_number.3
index f78223b..2f5871f 100644
--- a/lib/libutil/expand_number.3
+++ b/lib/libutil/expand_number.3
@@ -51,12 +51,13 @@ argument.
The
.Fn expand_number
function
+is case-insensitive and
follows the SI power of two convention.
.Pp
The prefixes are:
.Bl -column "Prefix" "Description" "1000000000000000000" -offset indent
.It Sy "Prefix" Ta Sy "Description" Ta Sy "Multiplier"
-.It Li k Ta No kilo Ta 1024
+.It Li K Ta No kilo Ta 1024
.It Li M Ta No mega Ta 1048576
.It Li G Ta No giga Ta 1073741824
.It Li T Ta No tera Ta 1099511627776
diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5
index a07e1f0..e780940 100644
--- a/lib/libutil/login.conf.5
+++ b/lib/libutil/login.conf.5
@@ -50,9 +50,7 @@ non-root user without a valid login class in
A user with a uid of 0 without a valid login class will use the record
"root" if it exists, or "default" if not.
.Pp
-In
-.Fx ,
-users may individually create a file called
+Users may individually create a file called
.Pa .login_conf
in their home directory using the same format, consisting of a single
entry with a record id of "me".
@@ -132,6 +130,7 @@ tag being delimited from the value by '=' instead of '#').
Whichever method is used, then all records in the database must use the
same method to allow values to be correctly overridden in interpolated
records.
+A numeric value may be infinite.
.It size
A number which expresses a size.
The default interpretation of a value is the number of bytes, but a
@@ -150,6 +149,7 @@ represents terabytes.
.El
A size value is a numeric quantity and case of the suffix is not significant.
Concatenated values are added together.
+A size value may be infinite.
.It time
A period of time, by default in seconds.
A prefix may specify a different unit:
@@ -170,8 +170,16 @@ the number of seconds.
Concatenated values are added together.
For example, 2 hours and 40 minutes may be written either as
9600s, 160m or 2h40m.
+A time value may be infinite.
.El
.Pp
+.Dq infinity ,
+.Dq inf ,
+.Dq unlimited ,
+.Dq unlimit,
+and -1
+are considered infinite values.
+.Pp
The usual convention to interpolate capability entries using the special
.Em tc=value
notation may be used.
diff --git a/lib/libutil/login_class.3 b/lib/libutil/login_class.3
index 62a65f2..75f3614 100644
--- a/lib/libutil/login_class.3
+++ b/lib/libutil/login_class.3
@@ -118,6 +118,7 @@ sbsize RLIMIT_SBSIZE
vmemoryuse RLIMIT_VMEM
pseudoterminals RLIMIT_NPTS
swapuse RLIMIT_SWAP
+kqueues RLIMIT_KQUEUES
.Ed
.It LOGIN_SETPRIORITY
Set the scheduling priority for the current process based on the
diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c
index 263044f..39cce12 100644
--- a/lib/libutil/login_class.c
+++ b/lib/libutil/login_class.c
@@ -66,6 +66,7 @@ static struct login_res {
{ "vmemoryuse", login_getcapsize, RLIMIT_VMEM },
{ "pseudoterminals", login_getcapnum, RLIMIT_NPTS },
{ "swapuse", login_getcapsize, RLIMIT_SWAP },
+ { "kqueues", login_getcapsize, RLIMIT_KQUEUES },
{ NULL, 0, 0 }
};
diff --git a/lib/libutil/pw_util.3 b/lib/libutil/pw_util.3
index 7ef0657..6c449ba 100644
--- a/lib/libutil/pw_util.3
+++ b/lib/libutil/pw_util.3
@@ -48,13 +48,13 @@
.In pwd.h
.In libutil.h
.Ft int
-.Fn pw_copy "int ffd" "int tfd" "const struct passwd *pw" "const struct passwd *oldpw"
+.Fn pw_copy "int ffd" "int tfd" "const struct passwd *pw" "struct passwd *oldpw"
.Ft "struct passwd *"
.Fn pw_dup "const struct passwd *pw"
.Ft int
.Fn pw_edit "int nosetuid"
.Ft int
-.Fn pw_equal "const struct passwd *pw1" "const struct passwd pw2"
+.Fn pw_equal "const struct passwd *pw1" "const struct passwd *pw2"
.Ft void
.Fn pw_fini "void"
.Ft int
OpenPOWER on IntegriCloud