HomeFreeBSD

Standardize the various prison_foo_ip[46] functions and prison_if to

Description

Standardize the various prison_foo_ip[46] functions and prison_if to
return zero on success and an error code otherwise. The possible errors
are EADDRNOTAVAIL if an address being checked for doesn't match the
prison, and EAFNOSUPPORT if the prison doesn't have any addresses in
that address family. For most callers of these functions, use the
returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or
EINVAL.

Always include a jailed() check in these functions, where a non-jailed
cred always returns success (and makes no changes). Remove the explicit
jailed() checks that preceded many of the function calls.

Approved by: bz (mentor)

Details

Provenance
jamieAuthored on Feb 5 2009, 2:06 PM
Parents
rG9719301922b4: Use the correct creds when reconnecting so that we have enough privilege to
Branches
Unknown
Tags
Unknown

Event Timeline