diff options
| author | Tom Yu <tlyu@mit.edu> | 2006-10-05 22:58:41 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2006-10-05 22:58:41 +0000 |
| commit | 0899feef5ea10df79ded4e215d8f5cfcf75e9451 (patch) | |
| tree | 970f54323b1b32c1307150b373ede9409a977ef3 /src/lib/krb5/os | |
| parent | c057a3a60883e465526d86acde15bcd2e53e92f9 (diff) | |
| download | krb5-0899feef5ea10df79ded4e215d8f5cfcf75e9451.tar.gz krb5-0899feef5ea10df79ded4e215d8f5cfcf75e9451.tar.xz krb5-0899feef5ea10df79ded4e215d8f5cfcf75e9451.zip | |
cursor for iterating over ccaches
Some ccache back ends need per-type cursors implemented.
* src/include/k5-int.h: Declare krb5_cc_ptcursor. Update
krb5_cc_ops vector to include functions for ptcursor and some
not-yet-implemented functionality.
* src/include/krb5/krb5.hin: Prototype krb5_cccol_cursor_new,
krb5_cccol_cursor_next, krb5_cccol_cursor_free.
* src/lib/krb5/ccache/Makefile.in: Compile cccursor.c. Build
t_cccursor.
* src/lib/krb5/ccache/cccursor.c: Implementation of cursor for
iterating over ccaches.
* src/lib/krb5/ccache/ccbase.c: Add typecursor functionality for
iteration over registered ccache types.
* src/lib/krb5/ccache/cc_memory.c: Implmement per-type ccache
cursor functionality.
* src/lib/krb5/ccache/cc_mslsa.c:
* src/lib/krb5/ccache/cc_file.c:
* src/lib/krb5/ccache/ccapi/stdcc.c: Add place-holder ops vector
entries.
* src/lib/krb5/ccache/t_cccursor.c: New test of ccache cursor
functionality.
* src/lib/krb5/os/ccdefname.c (krb5int_cc_os_default_name): New
function to return the OS-specific default ccache name.
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18651 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/os')
| -rw-r--r-- | src/lib/krb5/os/ccdefname.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/krb5/os/ccdefname.c b/src/lib/krb5/os/ccdefname.c index f9ddecce4..4a9d184cd 100644 --- a/src/lib/krb5/os/ccdefname.c +++ b/src/lib/krb5/os/ccdefname.c @@ -297,3 +297,22 @@ krb5_cc_default_name(krb5_context context) return err ? NULL : os_ctx->default_ccname; } + +/* + * caller must free name + */ +krb5_error_code +krb5int_cc_os_default_name(krb5_context context, char **name) +{ + krb5_error_code retval = 0; + char *tmpname = NULL; + + *name = NULL; + tmpname = malloc(BUFSIZ); + if (tmpname == NULL) + return ENOMEM; + + retval = get_from_os(tmpname, BUFSIZ); + *name = tmpname; + return retval; +} |
