Page MenuHomeFreeBSD
Paste P256

Masterwork From Distant Lands
ActivePublic

Authored by ngie on May 2 2019, 3:13 PM.
Index: crypto/heimdal/kdc/digest.c
===================================================================
--- crypto/heimdal/kdc/digest.c (revision 347012)
+++ crypto/heimdal/kdc/digest.c (working copy)
@@ -605,7 +605,7 @@
}
t = p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
- if (abs((kdc_time & 0xffffffff) - t) > context->max_skew) {
+ if (labs((kdc_time & 0xffffffff) - t) > context->max_skew) {
ret = EINVAL;
krb5_set_error_message(context, ret, "time screw in server nonce ");
goto out;
Index: crypto/heimdal/kdc/kerberos5.c
===================================================================
--- crypto/heimdal/kdc/kerberos5.c (revision 347012)
+++ crypto/heimdal/kdc/kerberos5.c (working copy)
@@ -1296,7 +1296,7 @@
continue;
}
free_PA_ENC_TS_ENC(&p);
- if (abs(kdc_time - p.patimestamp) > context->max_skew) {
+ if (labs(kdc_time - p.patimestamp) > context->max_skew) {
char client_time[100];
krb5_format_time(context, p.patimestamp,
@@ -1307,7 +1307,7 @@
"Too large time skew, "
"client time %s is out by %u > %u seconds -- %s",
client_time,
- (unsigned)abs(kdc_time - p.patimestamp),
+ (unsigned)labs(kdc_time - p.patimestamp),
context->max_skew,
client_name);
Index: crypto/heimdal/kdc/pkinit.c
===================================================================
--- crypto/heimdal/kdc/pkinit.c (revision 347012)
+++ crypto/heimdal/kdc/pkinit.c (working copy)
@@ -101,7 +101,7 @@
krb5_timeofday (context, &now);
/* XXX cusec */
- if (a->ctime == 0 || abs(a->ctime - now) > context->max_skew) {
+ if (a->ctime == 0 || labs(a->ctime - now) > context->max_skew) {
krb5_clear_error_message(context);
return KRB5KRB_AP_ERR_SKEW;
}
@@ -123,7 +123,7 @@
krb5_timeofday (context, &now);
/* XXX cusec */
- if (a->ctime == 0 || abs(a->ctime - now) > context->max_skew) {
+ if (a->ctime == 0 || labs(a->ctime - now) > context->max_skew) {
krb5_clear_error_message(context);
return KRB5KRB_AP_ERR_SKEW;
}
Index: crypto/heimdal/kuser/kinit.c
===================================================================
--- crypto/heimdal/kuser/kinit.c (revision 347012)
+++ crypto/heimdal/kuser/kinit.c (working copy)
@@ -580,7 +580,7 @@
}
if(ticket_life != 0) {
- if(abs(cred.times.endtime - cred.times.starttime - ticket_life) > 30) {
+ if(labs(cred.times.endtime - cred.times.starttime - ticket_life) > 30) {
char life[64];
unparse_time_approx(cred.times.endtime - cred.times.starttime,
life, sizeof(life));
@@ -588,7 +588,7 @@
}
}
if(renew_life) {
- if(abs(cred.times.renew_till - cred.times.starttime - renew) > 30) {
+ if(labs(cred.times.renew_till - cred.times.starttime - renew) > 30) {
char life[64];
unparse_time_approx(cred.times.renew_till - cred.times.starttime,
life, sizeof(life));
Index: crypto/heimdal/lib/krb5/init_creds_pw.c
===================================================================
--- crypto/heimdal/lib/krb5/init_creds_pw.c (revision 347012)
+++ crypto/heimdal/lib/krb5/init_creds_pw.c (working copy)
@@ -311,7 +311,7 @@
for (i = 0; i < lr->len; ++i) {
if (lr->val[i].lr_value <= t) {
- switch (abs(lr->val[i].lr_type)) {
+ switch (labs(lr->val[i].lr_type)) {
case LR_PW_EXPTIME :
report_expiration(context, ctx->prompter,
ctx->prompter_data,
Index: crypto/heimdal/lib/krb5/rd_cred.c
===================================================================
--- crypto/heimdal/lib/krb5/rd_cred.c (revision 347012)
+++ crypto/heimdal/lib/krb5/rd_cred.c (working copy)
@@ -222,7 +222,7 @@
if (enc_krb_cred_part.timestamp == NULL ||
enc_krb_cred_part.usec == NULL ||
- abs(*enc_krb_cred_part.timestamp - sec)
+ labs(*enc_krb_cred_part.timestamp - sec)
> context->max_skew) {
krb5_clear_error_message (context);
ret = KRB5KRB_AP_ERR_SKEW;
Index: crypto/heimdal/lib/krb5/rd_priv.c
===================================================================
--- crypto/heimdal/lib/krb5/rd_priv.c (revision 347012)
+++ crypto/heimdal/lib/krb5/rd_priv.c (working copy)
@@ -136,7 +136,7 @@
krb5_timeofday (context, &sec);
if (part.timestamp == NULL ||
part.usec == NULL ||
- abs(*part.timestamp - sec) > context->max_skew) {
+ labs(*part.timestamp - sec) > context->max_skew) {
krb5_clear_error_message (context);
ret = KRB5KRB_AP_ERR_SKEW;
goto failure_part;
Index: crypto/heimdal/lib/krb5/rd_req.c
===================================================================
--- crypto/heimdal/lib/krb5/rd_req.c (revision 347012)
+++ crypto/heimdal/lib/krb5/rd_req.c (working copy)
@@ -441,7 +441,7 @@
krb5_timeofday (context, &now);
- if (abs(ac->authenticator->ctime - now) > context->max_skew) {
+ if (labs(ac->authenticator->ctime - now) > context->max_skew) {
ret = KRB5KRB_AP_ERR_SKEW;
krb5_clear_error_message (context);
goto out;
Index: crypto/heimdal/lib/krb5/rd_safe.c
===================================================================
--- crypto/heimdal/lib/krb5/rd_safe.c (revision 347012)
+++ crypto/heimdal/lib/krb5/rd_safe.c (working copy)
@@ -159,7 +159,7 @@
if (safe.safe_body.timestamp == NULL ||
safe.safe_body.usec == NULL ||
- abs(*safe.safe_body.timestamp - sec) > context->max_skew) {
+ labs(*safe.safe_body.timestamp - sec) > context->max_skew) {
ret = KRB5KRB_AP_ERR_SKEW;
krb5_clear_error_message (context);
goto failure;
Index: crypto/heimdal/lib/krb5/test_time.c
===================================================================
--- crypto/heimdal/lib/krb5/test_time.c (revision 347012)
+++ crypto/heimdal/lib/krb5/test_time.c (working copy)
@@ -54,11 +54,11 @@
if (ret)
krb5_err(context, 1, ret, "krb5_us_timeofday");
- diff2 = abs(sec - tv.tv_sec);
+ diff2 = labs(sec - tv.tv_sec);
if (diff2 < 9 || diff > 11)
krb5_errx(context, 1, "set time error: diff: %d",
- abs(sec - tv.tv_sec));
+ labs(sec - tv.tv_sec));
}
Index: crypto/heimdal/lib/krb5/ticket.c
===================================================================
--- crypto/heimdal/lib/krb5/ticket.c (revision 347012)
+++ crypto/heimdal/lib/krb5/ticket.c (working copy)
@@ -776,11 +776,11 @@
tmp_time = rep->enc_part.authtime;
if (creds->times.starttime == 0
- && abs(tmp_time - sec_now) > context->max_skew) {
+ && labs(tmp_time - sec_now) > context->max_skew) {
ret = KRB5KRB_AP_ERR_SKEW;
krb5_set_error_message (context, ret,
N_("time skew (%d) larger than max (%d)", ""),
- abs(tmp_time - sec_now),
+ labs(tmp_time - sec_now),
(int)context->max_skew);
goto out;
}
Index: crypto/heimdal/lib/ntlm/ntlm.c
===================================================================
--- crypto/heimdal/lib/ntlm/ntlm.c (revision 347012)
+++ crypto/heimdal/lib/ntlm/ntlm.c (working copy)
@@ -1661,7 +1661,7 @@
authtime = nt2unixtime(t);
- if (abs((int)(authtime - now)) > authtimediff) {
+ if (labs((int)(authtime - now)) > authtimediff) {
ret = HNTLM_ERR_TIME_SKEW;
goto out;
}

Event Timeline

ngie edited the content of this paste. (Show Details)May 2 2019, 3:13 PM
ngie changed the title of this paste from untitled to Masterwork From Distant Lands.