Fri Oct 18 13:47:01 1996 Barry Jaspan <bjaspan@mit.edu>
+ * kadmin.c (kadmin_addprinc): use a studly temporary password when
+ creating a principal with a random key (no, the security of this
+ operation does not depend on the secrecy of the password)
+ [krb5-admin/115]
+
* getdate.y: remove military timezones and plain integeres as part
of date specifications, to reduce confusion by redundancy
[krb5-admin/15]
kadm5_principal_ent_rec princ;
kadm5_policy_ent_rec defpol;
long mask;
- int randkey = 0;
+ int randkey = 0, i;
char *pass, *canon;
krb5_error_code retval;
- static char newpw[1024];
+ static char newpw[1024], dummybuf[256];
static char prompt1[1024], prompt2[1024];
+
+ if (dummybuf[0] == 0) {
+ for (i = 0; i < 256; i++)
+ dummybuf[i] = (i+1) % 256;
+ }
/* Zero all fields in request structure */
memset(&princ, 0, sizeof(princ));
if (randkey) { /* do special stuff if -randkey specified */
princ.attributes |= KRB5_KDB_DISALLOW_ALL_TIX; /* set notix */
mask |= KADM5_ATTRIBUTES;
- pass = "dummy";
+ pass = dummybuf;
} else if (pass == NULL) {
int i = sizeof (newpw) - 1;