mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
sunrpc: Add comment defining gssd upcall API keywords
During review, it was found that the target, service, and srchost keywords are easily conflated. Add an explainer. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
a26dd64f54
commit
108b833cde
1 changed files with 17 additions and 0 deletions
|
@ -461,12 +461,28 @@ static int gss_encode_v1_msg(struct gss_upcall_msg *gss_msg,
|
|||
buflen -= len;
|
||||
p += len;
|
||||
gss_msg->msg.len = len;
|
||||
|
||||
/*
|
||||
* target= is a full service principal that names the remote
|
||||
* identity that we are authenticating to.
|
||||
*/
|
||||
if (target_name) {
|
||||
len = scnprintf(p, buflen, "target=%s ", target_name);
|
||||
buflen -= len;
|
||||
p += len;
|
||||
gss_msg->msg.len += len;
|
||||
}
|
||||
|
||||
/*
|
||||
* gssd uses service= and srchost= to select a matching key from
|
||||
* the system's keytab to use as the source principal.
|
||||
*
|
||||
* service= is the service name part of the source principal,
|
||||
* or "*" (meaning choose any).
|
||||
*
|
||||
* srchost= is the hostname part of the source principal. When
|
||||
* not provided, gssd uses the local hostname.
|
||||
*/
|
||||
if (service_name) {
|
||||
char *c = strchr(service_name, '@');
|
||||
|
||||
|
@ -482,6 +498,7 @@ static int gss_encode_v1_msg(struct gss_upcall_msg *gss_msg,
|
|||
p += len;
|
||||
gss_msg->msg.len += len;
|
||||
}
|
||||
|
||||
if (mech->gm_upcall_enctypes) {
|
||||
len = scnprintf(p, buflen, "enctypes=%s ",
|
||||
mech->gm_upcall_enctypes);
|
||||
|
|
Loading…
Reference in a new issue