| Main index | Section 3 | Options |
#include <krb5.h>
Valid flags to pass into options argument are:
| KRB5_GC_CACHED | Only check the ccache, don't got out on network to fetch credential. |
| KRB5_GC_USER_USER | Request a user to user ticket. This option doesn't store the resulting user to user credential in the ccache. |
| KRB5_GC_EXPIRED_OK | |
| returns the credential even if it is expired, default behavior is trying to refetch the credential from the KDC. | |
Flags are KDCOptions, note the caller must fill in the bit-field and not use the integer associated structure.
krb5_get_credentials() works the same way as krb5_get_credentials_with_flags() except that the flags field is missing.
krb5_get_kdc_cred() does the same as the functions above, but the caller must fill in all the information andits closer to the wire protocol.
krb5_get_renewed_creds() renews a credential given by in_tkt_service (if NULL the default krbtgt) using the credential cache ccache. The result is stored in creds and should be freed using krb5_free_creds.
#include <krb5.h>int getcred(krb5_context context, krb5_ccache id, krb5_creds **creds) { krb5_error_code ret; krb5_creds in;
ret = krb5_parse_name(context, "client@EXAMPLE.COM", &in.client); if (ret) krb5_err(context, 1, ret, "krb5_parse_name");
ret = krb5_parse_name(context, "host/server.example.com@EXAMPLE.COM", &in.server); if (ret) krb5_err(context, 1, ret, "krb5_parse_name");
ret = krb5_get_credentials(context, 0, id, &in, creds); if (ret) krb5_err(context, 1, ret, "krb5_get_credentials");
return 0; }
| HEIMDAL | KRB5_GET_CREDENTIALS (3) | July 26, 2004 |
| Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | "I liken starting one's computing career with Unix, say as an undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act." | ” |
| — Ken Pier, Xerox PARC | ||