HomeFreeBSD

Place hostnames and similar information fully under the prison system.
rS193066Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Place hostnames and similar information fully under the prison system.
The system hostname is now stored in prison0, and the global variable
"hostname" has been removed, as has the hostname_mtx mutex. Jails may
have their own host information, or they may inherit it from the
parent/system. The proper way to read the hostname is via
getcredhostname(), which will copy either the hostname associated with
the passed cred, or the system hostname if you pass NULL. The system
hostname can still be accessed directly (and without locking) at
prison0.pr_host, but that should be avoided where possible.

The "similar information" referred to is domainname, hostid, and
hostuuid, which have also become prison parameters and had their
associated global variables removed.

Approved by: bz (mentor)

Details

Provenance
jamieAuthored on
Parents
rS193065: Fix some inaccuracies in the extensible parameter addition.
Branches
Unknown
Tags
Unknown

Event Timeline