mirror of
https://github.com/samba-team/samba.git
synced 2025-12-10 04:23:50 +03:00
r1685: Add the ability to lookup RPC auth types for the RPC-MGMT torture test.
Andrew Bartlett
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
43fd611593
commit
0e4e3647e8
@@ -212,6 +212,17 @@ NTSTATUS gensec_start_mech_by_authtype(struct gensec_security *gensec_security,
|
|||||||
return gensec_start_mech(gensec_security);
|
return gensec_start_mech(gensec_security);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *gensec_get_name_by_authtype(uint8_t authtype)
|
||||||
|
{
|
||||||
|
const struct gensec_security_ops *ops;
|
||||||
|
ops = gensec_security_by_authtype(authtype);
|
||||||
|
if (ops) {
|
||||||
|
return ops->name;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a GENSEC sub-mechanism by OID, used in SPNEGO
|
* Start a GENSEC sub-mechanism by OID, used in SPNEGO
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -109,11 +109,17 @@ static BOOL test_inq_princ_name(struct dcerpc_pipe *p,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (W_ERROR_IS_OK(r.out.result)) {
|
if (W_ERROR_IS_OK(r.out.result)) {
|
||||||
|
const char *name = gensec_get_name_by_authtype(i);
|
||||||
ret = True;
|
ret = True;
|
||||||
|
if (name) {
|
||||||
|
printf("\tprinciple name for proto %u (%s) is '%s'\n",
|
||||||
|
i, name, r.out.princ_name);
|
||||||
|
} else {
|
||||||
printf("\tprinciple name for proto %u is '%s'\n",
|
printf("\tprinciple name for proto %u is '%s'\n",
|
||||||
i, r.out.princ_name);
|
i, r.out.princ_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
printf("\tno principle names?\n");
|
printf("\tno principle names?\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user