use krb5_set_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23316 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -177,14 +177,15 @@ krb5_kdc_save_request(krb5_context context,
|
||||
|
||||
fd = open(fn, O_WRONLY|O_CREAT|O_APPEND, 0600);
|
||||
if (fd < 0) {
|
||||
krb5_set_error_string(context, "Failed to open: %s", fn);
|
||||
return errno;
|
||||
int saved_errno = errno;
|
||||
krb5_set_error_message(context, saved_errno, "Failed to open: %s", fn);
|
||||
return saved_errno;
|
||||
}
|
||||
|
||||
sp = krb5_storage_from_fd(fd);
|
||||
close(fd);
|
||||
if (sp == NULL) {
|
||||
krb5_set_error_string(context, "Storage failed to open fd");
|
||||
krb5_set_error_message(context, ENOMEM, "Storage failed to open fd");
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user