+Thu Nov 7 16:42:38 1996 Barry Jaspan <bjaspan@mit.edu>
+
+ * svr_iters.c (glob_to_regexp): a principal glob with no @
+ defaults to @*, not @LOCAL.REAM [krb5-admin/161]
+
Wed Nov 6 10:45:12 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* server_init.c (kadm5_init): Use a more fined grained error
* regexp is filled in with allocated memory contained a regular
* expression to be used with re_comp/compile that matches what the
* shell-style glob would match. If glob does not contain an "@"
- * character and realm is not NULL, "@<realm>" is appended to the regexp.
+ * character and realm is not NULL, "@*" is appended to the regexp.
*
* Conversion algorithm:
*
/* and trailing null. If glob has no @, also allocate space for */
/* the realm. */
append_realm = (realm != NULL) && (strchr(glob, '@') == NULL);
- p = (char *) malloc(strlen(glob)*2+ 3 +
- (append_realm ? (strlen(realm)+1) : 0));
+ p = (char *) malloc(strlen(glob)*2+ 3 + (append_realm ? 2 : 0));
if (p == NULL)
return ENOMEM;
*regexp = p;
if (append_realm) {
*p++ = '@';
- strcpy(p, realm);
- p += strlen(realm);
+ *p++ = '*';
}
*p++ = '$';