<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libutil, branch releng/13.5</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F13.5</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F13.5'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2024-02-01T21:24:30Z</updated>
<entry>
<title>login_cap.h: Remove LOGIN_DEFPRI</title>
<updated>2024-02-01T21:24:30Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce@FreeBSD.org</email>
</author>
<published>2024-01-25T22:25:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=634f86a3c47ffc8dfe7699ea599ab34c88b25324'/>
<id>urn:sha1:634f86a3c47ffc8dfe7699ea599ab34c88b25324</id>
<content type='text'>
This is an implementation detail which is likely to become irrelevant in
the future, as we move to not resetting the priority if the
corresponding capability is not present in the configuration file
('/etc/login.conf').

GitHub's code search and Google show no use of this public constant, and
it doesn't exist in OpenBSD and NetBSD.

So, remove this definition and its sole use in-tree.

PR:                     276570 (exp-run)
Reviewed by:            emaste
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D43609

(cherry picked from commit c7e645269f1c7e9872a7ccf6b72f045c55a66793)

Approved by:            markj (mentor)
</content>
</entry>
<entry>
<title>login_cap.h: Remove LOGIN_DEFUMASK</title>
<updated>2024-02-01T21:24:22Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce@FreeBSD.org</email>
</author>
<published>2024-01-25T22:10:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=943af0501107f88312a98b217b6956f3d0f2fa76'/>
<id>urn:sha1:943af0501107f88312a98b217b6956f3d0f2fa76</id>
<content type='text'>
This public constant has not been used in-tree since 1997 (this was
noticed while working on previous commit "setusercontext(): umask: Set
it only once (in the common case)").

Since it was an implementation detail and GitHub's code search and
Google show no use of this symbol today, simply remove it.

PR:                     276570 (exp-run)
Reviewed by:            emaste, kib (earlier version, then part of D40344)
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D43608

(cherry picked from commit e3a396eb2a029e5dc9161469735aa3f7f16845d1)

Approved by:            markj (mentor)
</content>
</entry>
<entry>
<title>setusercontext(): Set priority from '~/.login_conf' as well</title>
<updated>2024-02-01T21:24:13Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce.freebsd@certner.fr</email>
</author>
<published>2023-05-30T15:14:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8b359002747a3ce84414fb64a9b89eab20ab7c25'/>
<id>urn:sha1:8b359002747a3ce84414fb64a9b89eab20ab7c25</id>
<content type='text'>
Setting the process priority is done only when the current process'
effective UID corresponds to that for which context is to be set.
Consequently, setting priority is done with appropriate credentials and
will fail if the target user tries to raise it unduly via his
'~/.login_conf'.

PR:                     271751
Reviewed by:            kib, Andrew Gierth &lt;andrew_tao173.riddles.org.uk&gt;
Approved by:            emaste (mentor)
MFC after:              3 days
Relnotes:               yes
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40352

(cherry picked from commit f2a0277d3e51a6a839151eef17f466d0db2b7300)

Approved by:            markj (mentor)
</content>
</entry>
<entry>
<title>login.conf(5): Document priority's special value 'inherit'</title>
<updated>2024-02-01T21:24:06Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce.freebsd@certner.fr</email>
</author>
<published>2023-06-21T08:39:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d836f951d9fee1d8cd7b77b4b87fb13c54d8cf15'/>
<id>urn:sha1:d836f951d9fee1d8cd7b77b4b87fb13c54d8cf15</id>
<content type='text'>
Reviewed by:            emaste, yuripv (older version)
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40691

(cherry picked from commit 33d4ce5496efe96bbaa7663e298876395b1db62c)

Approved by:            markj (mentor)
</content>
</entry>
<entry>
<title>setclasspriority(): New possible value 'inherit'</title>
<updated>2024-02-01T21:23:59Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce.freebsd@certner.fr</email>
</author>
<published>2023-06-21T08:53:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e074746fec21fbc4a66e936408e3b585f89b73bd'/>
<id>urn:sha1:e074746fec21fbc4a66e936408e3b585f89b73bd</id>
<content type='text'>
It indicates to the login.conf machinery (setusercontext() /
setclasscontext()) to leave priority alone, effectively inheriting it
from the parent process.

PR:                     271749
Reviewed by:            emaste, yuripv
Approved by:            emaste (mentor)
MFC after:              3 days
Relnotes:               yes
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40690

(cherry picked from commit d162d7e2ad327ceada4102c5d6779f9ecd809502)

Approved by:            markj (mentor)
</content>
</entry>
<entry>
<title>setusercontext(): Move priority setting in new setclasspriority()</title>
<updated>2024-02-01T21:23:52Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce.freebsd@certner.fr</email>
</author>
<published>2023-05-29T17:09:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3fc149c302ab7287e063e7fdd0a0d7031947e3fb'/>
<id>urn:sha1:3fc149c302ab7287e063e7fdd0a0d7031947e3fb</id>
<content type='text'>
In preparation for setting priorities from '~/.login_conf' and to ease
reading of setusercontext().

No functional change.

Reviewed by:            emaste
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40350

(cherry picked from commit 7b94ec550ef6e7b75d608e125e9b78478197d4e7)

Approved by:            markj (mentor)
</content>
</entry>
<entry>
<title>login.conf(5): Document priority's default and possible values</title>
<updated>2024-02-01T21:23:45Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce.freebsd@certner.fr</email>
</author>
<published>2023-06-21T08:39:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=72d463479fcc72435c75c5f8643e53e1a54fa799'/>
<id>urn:sha1:72d463479fcc72435c75c5f8643e53e1a54fa799</id>
<content type='text'>
Priority is reset to 0 if not explicitly specified.

While here, be more explicit about what "Initial priority (nice) level"
means and document that it is possible to set real-time or idle class'
priorities with this capability.

Reviewed by:            emaste
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40689

(cherry picked from commit aa96945e71b0f724e6ce673194d23f58d2d637d3)

Approved by:            markj (mentor)
</content>
</entry>
<entry>
<title>setusercontext(): Better error messages when priority is not set correctly</title>
<updated>2024-02-01T21:23:37Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce.freebsd@certner.fr</email>
</author>
<published>2023-05-29T16:39:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0a366bb44e65efeed9568b47c673ddc648a4d7e2'/>
<id>urn:sha1:0a366bb44e65efeed9568b47c673ddc648a4d7e2</id>
<content type='text'>
Polish the syslog messages to contain readily useful information.

Behavior of capability 'priority' is inconsistent with what is done for
all other contexts: 'umask', 'cpumask', resource limits, etc., where an
absence of capability means to inherit the value.  It is currently
preserved for compatibility, but is subject to change on a future major
release.

Reviewed by:            emaste, kib (older version)
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40349

(cherry picked from commit d988621b0c25209866ed5a98b1a8b20269935761)

Approved by:            markj (mentor)
</content>
</entry>
<entry>
<title>login.conf(5): Default values: Rename column, elaborate on absence of such</title>
<updated>2024-02-01T21:23:30Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce.freebsd@certner.fr</email>
</author>
<published>2023-05-29T14:06:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8f4c3ef048e3cc6df1d1648b431ccb6b383b3bb3'/>
<id>urn:sha1:8f4c3ef048e3cc6df1d1648b431ccb6b383b3bb3</id>
<content type='text'>
Column "Notes" in fact only contains default values for capabilities, so
make this clear by renaming it to "Default".

Add a small introductory text mentioning it, and what an absence of
default value means (inheritance).

PR:                     271748
Reviewed by:            emaste
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40347

(cherry picked from commit 92b2c4358f57ef84f161efd8370ba4832bd9261a)

Approved by:            markj (mentor)
</content>
</entry>
<entry>
<title>setlogincontext(): Comply to style(9)</title>
<updated>2024-02-01T21:23:23Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce.freebsd@certner.fr</email>
</author>
<published>2023-05-25T14:29:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6843f1c2ef08822dab352101decb69f9f6e1cae8'/>
<id>urn:sha1:6843f1c2ef08822dab352101decb69f9f6e1cae8</id>
<content type='text'>
Remove indentation by inverting the big 'if (lc)' and using 'return'.
Use explicit binary operators to produce booleans.

Reviewed by:            emaste, kib, dchagin
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40346

(cherry picked from commit 771d5c93ab5a3fb1701d9706df2ce87d6a9da6f3)

Approved by:            markj (mentor)
</content>
</entry>
</feed>
