large strc{py,at}_truncate -> strlc{py,at} replacement

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6984 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-09-16 20:41:57 +00:00
parent 8e441f1158
commit bf75fac82a
42 changed files with 176 additions and 171 deletions

View File

@@ -85,7 +85,7 @@ store_ticket(KTEXT cip)
return(INTK_BADPW);
/* extract server's name */
strcpy_truncate(sp.name, ptr, sizeof(sp.name));
strlcpy(sp.name, ptr, sizeof(sp.name));
ptr += len + 1;
left -= len + 1;
@@ -94,7 +94,7 @@ store_ticket(KTEXT cip)
return(INTK_BADPW);
/* extract server's instance */
strcpy_truncate(sp.instance, ptr, sizeof(sp.instance));
strlcpy(sp.instance, ptr, sizeof(sp.instance));
ptr += len + 1;
left -= len + 1;
@@ -103,7 +103,7 @@ store_ticket(KTEXT cip)
return(INTK_BADPW);
/* extract server's realm */
strcpy_truncate(sp.realm, ptr, sizeof(sp.realm));
strlcpy(sp.realm, ptr, sizeof(sp.realm));
ptr += len + 1;
left -= len + 1;
@@ -304,12 +304,12 @@ klist(void)
" Issued", " Expires", " Principal (kvno)");
header = 0;
}
strcpy_truncate(buf1, short_date(c.issue_date), sizeof(buf1));
strlcpy(buf1, short_date(c.issue_date), sizeof(buf1));
c.issue_date = krb_life_to_time(c.issue_date, c.lifetime);
if (time(0) < (unsigned long) c.issue_date)
strcpy_truncate(buf2, short_date(c.issue_date), sizeof(buf2));
strlcpy(buf2, short_date(c.issue_date), sizeof(buf2));
else
strcpy_truncate(buf2, ">>> Expired <<< ", sizeof(buf2));
strlcpy(buf2, ">>> Expired <<< ", sizeof(buf2));
lreply(200, "%s %s %s (%d)", buf1, buf2,
krb_unparse_name_long(c.service, c.instance, c.realm), c.kvno);
}