Skip to content

Commit

Permalink
Fix compile bug if LIBKRB5 is not found/used
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <[email protected]>
  • Loading branch information
sahlberg committed Aug 14, 2024
1 parent e0be691 commit 29fe800
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@ int rpc_process_pdu(struct rpc_context *rpc, char *buf, int size)
return ret;
}

#ifdef HAVE_LIBKRB5
/*
* For KRB5P and iovectors, i.e. NFS[34]READ we
* need to use a ZDR that hangs off the PDU so we can
Expand All @@ -1083,11 +1084,12 @@ int rpc_process_pdu(struct rpc_context *rpc, char *buf, int size)
if (rpc_process_reply(rpc, &rpc->pdu->zdr) != 0) {
rpc_set_error(rpc, "rpc_procdess_reply failed (for krb5 read)");
}
} else {
} else
#endif /* HAVE_LIBKRB5 */
if (rpc_process_reply(rpc, &zdr) != 0) {
rpc_set_error(rpc, "rpc_procdess_reply failed");
}
}

if (rpc->fragments == NULL && rpc->pdu && rpc->pdu->in.base) {
memcpy(&rpc->pdu->zdr, &zdr, sizeof(zdr));
rpc->pdu->free_zdr = 1;
Expand Down

0 comments on commit 29fe800

Please sign in to comment.