remove calls to abort()
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4861 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -83,11 +83,8 @@ gss_decode(void *app_data, void *buf, int len, int level)
|
|||||||
&output,
|
&output,
|
||||||
&conf_state,
|
&conf_state,
|
||||||
&qop_state);
|
&qop_state);
|
||||||
if(GSS_ERROR(maj_stat)) {
|
if(GSS_ERROR(maj_stat))
|
||||||
printf("Error unwrapping GSS packet: %x, %d, len = %d.\n",
|
return -1;
|
||||||
maj_stat, min_stat, len);
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
memmove(buf, output.value, output.length);
|
memmove(buf, output.value, output.length);
|
||||||
return output.length;
|
return output.length;
|
||||||
}
|
}
|
||||||
@@ -270,8 +267,11 @@ gss_auth(void *app_data, char *host)
|
|||||||
&output_token,
|
&output_token,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
if (GSS_ERROR(maj_stat))
|
if (GSS_ERROR(maj_stat)) {
|
||||||
abort ();
|
printf("Error initializing security context: %x.%d\n",
|
||||||
|
maj_stat, min_stat);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
gss_release_buffer(&min_stat, &input);
|
gss_release_buffer(&min_stat, &input);
|
||||||
if (output_token.length != 0) {
|
if (output_token.length != 0) {
|
||||||
base64_encode(output_token.value, output_token.length, &p);
|
base64_encode(output_token.value, output_token.length, &p);
|
||||||
@@ -289,15 +289,18 @@ gss_auth(void *app_data, char *host)
|
|||||||
if (maj_stat & GSS_S_CONTINUE_NEEDED) {
|
if (maj_stat & GSS_S_CONTINUE_NEEDED) {
|
||||||
p = strstr(reply_string, "ADAT=");
|
p = strstr(reply_string, "ADAT=");
|
||||||
if(p == NULL){
|
if(p == NULL){
|
||||||
abort();
|
printf("Error: expected ADAT in reply.\n");
|
||||||
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
p+=5;
|
p+=5;
|
||||||
input.value = malloc(strlen(p));
|
input.value = malloc(strlen(p));
|
||||||
input.length = base64_decode(p, input.value);
|
input.length = base64_decode(p, input.value);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(code != 235)
|
if(code != 235) {
|
||||||
abort();
|
printf("Unrecognized response code: %d\n", code);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
context_established = 1;
|
context_established = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user