Add functions used the bridge and tap interfaces.

This commit is contained in:
Chris Johns 2016-06-27 13:07:54 +10:00
parent c991d65d8d
commit a0e49f9ae9

View File

@ -307,6 +307,27 @@ prison_check_af(struct ucred *cred, int af)
return 0;
}
/*
* Return the correct hostname (domainname, et al) for the passed credential.
*/
void
getcredhostname(struct ucred *cred, char *buf, size_t size)
{
gethostname(buf, size);
}
void
getcreddomainname(struct ucred *cred, char *buf, size_t size)
{
getdomainname(buf, size);
}
void
getcredhostid(struct ucred *cred, unsigned long *hostid)
{
*hostid = 0;
}
/*
* Return 1 if the passed credential is in a jail, otherwise 0.
*/