svcrpc: store gss mech in svc_cred
Store a pointer to the gss mechanism used in the rq_cred and cl_cred. This will make it easier to enforce SP4_MACH_CRED, which needs to compare the mechanism used on the exchange_id with that used on protected operations. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
@@ -1188,6 +1188,9 @@ static int copy_cred(struct svc_cred *target, struct svc_cred *source)
|
||||
target->cr_gid = source->cr_gid;
|
||||
target->cr_group_info = source->cr_group_info;
|
||||
get_group_info(target->cr_group_info);
|
||||
target->cr_gss_mech = source->cr_gss_mech;
|
||||
if (source->cr_gss_mech)
|
||||
gss_mech_get(source->cr_gss_mech);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user