/* get_tickets() */
krb5_ccache ccache; /* Credentials cache which we'll be using */
krb5_creds my_creds; /* My credentials */
-int my_seq_num; /* Sequence number to use for connection */
-int his_seq_num; /* Remote sequence number */
+krb5_int32 my_seq_num; /* Sequence number to use for connection */
+krb5_int32 his_seq_num; /* Remote sequence number */
krb5_address sender_addr;
krb5_address receiver_addr;
krb5_ap_rep_enc_part *rep_result;
struct timeval mytime;
- /*
- * Generate a random key to use as a sequence number
- */
- gettimeofday(&mytime, NULL);
- srandom(mytime.tv_usec ^ mytime.tv_sec ^ (9 * getpid()));
- my_seq_num = random();
-
if (retval = krb5_sendauth(fd, kprop_version, me, my_creds.server,
- AP_OPTS_MUTUAL_REQUIRED, my_seq_num, NULL,
+ AP_OPTS_MUTUAL_REQUIRED, &my_seq_num, NULL,
NULL, &my_creds, NULL, &error,
&rep_result)) {
com_err(progname, retval, "while authenticating to server");
char *kerb_database = KPROPD_DEFAULT_KRB_DB;
int database_fd;
-int my_seq_num; /* Sequence number */
-int his_seq_num; /* The remote's sequence number */
+krb5_int32 my_seq_num; /* Sequence number */
+krb5_int32 his_seq_num; /* The remote's sequence number */
krb5_address sender_addr;
krb5_address receiver_addr;
if (debug)
printf("Connection from %s\n", hp->h_name);
}
- /*
- * Create a random number for my sequence number.
- */
- gettimeofday(&my_time, NULL);
- srandom(my_time.tv_usec ^ my_time.tv_sec ^ (9 * getpid()));
- my_seq_num = random();
+
/*
* Now do the authentication
*/
sizeof(r_sin.sin_addr));
if (retval = krb5_recvauth(fd, kprop_version, server, &sender_addr,
- kerb_keytab, NULL, NULL, my_seq_num,
+ kerb_keytab, NULL, NULL, &my_seq_num,
"dfl", clientp, &ticket, &authent)) {
syslog(LOG_ERR, "Error in krb5_recvauth: %s",
error_message(retval));