~ubuntu-branches/ubuntu/precise/krb5/precise-updates

« back to all changes in this revision

Viewing changes to doc/doxy_examples/cc_unique.c

  • Committer: Package Import Robot
  • Author(s): Sam Hartman
  • Date: 2011-12-01 19:34:41 UTC
  • mfrom: (28.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20111201193441-9tipg3aru1jsidyv
Tags: 1.10+dfsg~alpha1-6
* Fix segfault with unknown hostnames in krb5_sname_to_principal,
  Closes: #650671
* Indicate that this library breaks libsmbclient versions that depend on
  krb5_locate_kdc, Closes: #650603, #650611

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @example  cc_unique.c
 
2
 *
 
3
 *  Usage example for krb5_cc_new_unique function
 
4
 */
 
5
#include "k5-int.h"
 
6
 
 
7
krb5_error_code
 
8
func(krb5_context context)
 
9
{
 
10
    krb5_error_code ret;
 
11
    krb5_ccache ccache = NULL;
 
12
 
 
13
    ret = krb5_cc_new_unique(context, "MEMORY", NULL, &ccache);
 
14
    if (ret){
 
15
        ccache = NULL; 
 
16
        return ret;
 
17
    }
 
18
    /* do something */
 
19
    if (ccache)
 
20
        (void)krb5_cc_destroy(context, ccache);
 
21
    return 0;
 
22
}
 
23