switch to krb5_set_error_message

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23273 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-06-23 03:25:00 +00:00
parent 4a3e5bf152
commit 854ef9a202
9 changed files with 245 additions and 135 deletions

View File

@@ -83,7 +83,7 @@ acl_parse_format(krb5_context context,
for(p = format; *p != '\0'; p++) {
tmp = malloc(sizeof(*tmp));
if(tmp == NULL) {
krb5_set_error_string(context, "malloc: out of memory");
krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
acl_free_list(acl, 0);
return ENOMEM;
}
@@ -98,8 +98,8 @@ acl_parse_format(krb5_context context,
tmp->u.retv = va_arg(ap, char **);
*tmp->u.retv = NULL;
} else {
krb5_set_error_string(context, "acl_parse_format: "
"unknown format specifier %c", *p);
krb5_set_error_message(context, EINVAL, "acl_parse_format: "
"unknown format specifier %c", *p);
acl_free_list(acl, 0);
free(tmp);
return EINVAL;
@@ -220,7 +220,7 @@ krb5_acl_match_string(krb5_context context,
if (found) {
return 0;
} else {
krb5_set_error_string(context, "ACL did not match");
krb5_set_error_message(context, EACCES, "ACL did not match");
return EACCES;
}
}
@@ -258,8 +258,9 @@ krb5_acl_match_file(krb5_context context,
if(f == NULL) {
int save_errno = errno;
krb5_set_error_string(context, "open(%s): %s", file,
strerror(save_errno));
krb5_set_error_message(context, save_errno,
"open(%s): %s", file,
strerror(save_errno));
return save_errno;
}
@@ -287,7 +288,7 @@ krb5_acl_match_file(krb5_context context,
if (found) {
return 0;
} else {
krb5_set_error_string(context, "ACL did not match");
krb5_set_error_message(context, EACCES, "ACL did not match");
return EACCES;
}
}