|
NAMEkrb5_verify_user ,
krb5_verify_user_lrealm ,
krb5_verify_user_opt ,
krb5_verify_opt_init ,
krb5_verify_opt_alloc ,
krb5_verify_opt_free ,
krb5_verify_opt_set_ccache ,
krb5_verify_opt_set_flags ,
krb5_verify_opt_set_service ,
krb5_verify_opt_set_secure ,
krb5_verify_opt_set_keytab —
Heimdal password verifying functions
LIBRARYKerberos 5 Library (libkrb5, -lkrb5)SYNOPSIS#include <krb5.h>
krb5_error_code
krb5_error_code
void
void
void
void
void
void
void
void
krb5_error_code
DESCRIPTIONThekrb5_verify_user function verifies the password
supplied by a user. The principal whose password will be verified is specified
in principal. New tickets will be obtained as a
side-effect and stored in ccache (if
NULL , the default ccache is used).
krb5_verify_user () will call
krb5_cc_initialize () on the given
ccache, so ccache must only
initialized with krb5_cc_resolve () or
krb5_cc_gen_new (). If the password is not supplied in
password (and is given as NULL )
the user will be prompted for it. If secure the ticket
will be verified against the locally stored service key
service (by default
‘host ’ if given as
NULL ).
The
None of the krb5_verify_opt_set function makes a copy of the data
structure that they are called with. It's up the caller to free them after
the
EXAMPLESHere is a example program that verifies a password. it uses the ‘host/`hostname` ’ service principal in
krb5.keytab.
#include <krb5.h> int main(int argc, char **argv) { char *user; krb5_error_code error; krb5_principal princ; krb5_context context; if (argc != 2) errx(1, "usage: verify_passwd <principal-name>"); user = argv[1]; if (krb5_init_context(&context) < 0) errx(1, "krb5_init_context"); if ((error = krb5_parse_name(context, user, &princ)) != 0) krb5_err(context, 1, error, "krb5_parse_name"); error = krb5_verify_user(context, princ, NULL, NULL, TRUE, NULL); if (error) krb5_err(context, 1, error, "krb5_verify_user"); return 0; } SEE ALSOkrb5_cc_gen_new(3), krb5_cc_initialize(3), krb5_cc_resolve(3), krb5_err(3), krb5_free_principal(3), krb5_init_context(3), krb5_kt_default(3), krb5.conf(5)
Visit the GSP FreeBSD Man Page Interface. |