mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Add a function which returns the correct hostname for a given
credential. Reviewed by: phk
This commit is contained in:
parent
ab2963d7f6
commit
9484d0c0e8
2 changed files with 12 additions and 0 deletions
|
|
@ -237,3 +237,14 @@ jailed(cred)
|
|||
|
||||
return (cred->cr_prison != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the correct hostname for the passed credential.
|
||||
*/
|
||||
const char *
|
||||
getcredhostname(cred)
|
||||
struct ucred *cred;
|
||||
{
|
||||
|
||||
return (jailed(cred) ? cred->cr_prison->pr_host : hostname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ extern int jail_sysvipc_allowed;
|
|||
struct ucred;
|
||||
struct sockaddr;
|
||||
int jailed __P((struct ucred *cred));
|
||||
const char *getcredhostname __P((struct ucred *cred));
|
||||
int prison_check __P((struct ucred *cred1, struct ucred *cred2));
|
||||
void prison_free __P((struct prison *pr));
|
||||
u_int32_t prison_getip __P((struct ucred *cred));
|
||||
|
|
|
|||
Loading…
Reference in a new issue