}
if (targ_name != NULL) {
- major = gss_duplciate_name(minor, ctx->acceptorName, targ_name);
+ major = gss_duplicate_name(minor, ctx->acceptorName, targ_name);
if (GSS_ERROR(major))
goto cleanup;
}
if (lifetime_rec != NULL) {
time_t now = time(NULL);
- time_t lifetime = now - ctx->expiryTime;
+ time_t lifetime;
+
+ if (ctx->expiryTime == ~0)
+ lifetime = GSS_C_INDEFINITE;
+ else
+ lifetime = now - ctx->expiryTime;
if (lifetime < 0)
lifetime = 0;