diff options
| author | John Kohl <jtkohl@mit.edu> | 1990-02-01 15:14:13 +0000 |
|---|---|---|
| committer | John Kohl <jtkohl@mit.edu> | 1990-02-01 15:14:13 +0000 |
| commit | aff4a6805928a04db9a7afba79ec2475dbe749f8 (patch) | |
| tree | 23e5e5c2444e8a4e0fed4e0f3d2d7c39c2921b50 /src/lib | |
| parent | 5660f036b40ad8d75dcd7c1199ea9de43ed59942 (diff) | |
| download | krb5-aff4a6805928a04db9a7afba79ec2475dbe749f8.tar.gz krb5-aff4a6805928a04db9a7afba79ec2475dbe749f8.tar.xz krb5-aff4a6805928a04db9a7afba79ec2475dbe749f8.zip | |
*** empty log message ***
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@224 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/krb/rd_error.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/lib/krb5/krb/rd_error.c b/src/lib/krb5/krb/rd_error.c new file mode 100644 index 000000000..2c73fb193 --- /dev/null +++ b/src/lib/krb5/krb/rd_error.c @@ -0,0 +1,47 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * <krb5/mit-copyright.h>. + * + * krb5_rd_error() routine + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_rd_error_c[] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include <krb5/copyright.h> + +#include <krb5/krb5.h> +#include <krb5/asn1.h> + +#include <krb5/ext-proto.h> + +/* + Parses an error message from enc_errbuf and fills in the contents of estruct. + + Upon return dec_error->client,server,text, if non-NULL, point to allocated + storage which the caller should free when finished. + + returns system errors + */ + +krb5_error_code +krb5_rd_error( krb5_data *enc_errbuf, + krb5_error *dec_error ) +{ + krb5_error_code retval; + krb5_error *new_dec_error; + + if (retval = decode_krb5_error(enc_errbuf, &new_dec_error)) + return(retval); + *dec_error = *new_dec_error; + (void)free((char *)new_dec_error); + return 0; +} + |
