From: Tom Yu Date: Wed, 11 Jun 2003 20:32:22 +0000 (+0000) Subject: Don't escape rcache filename characters with backslash X-Git-Tag: krb5-1.4-beta1~855 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=acd06d06713d8b37480631a5d6584bd52814eaf8;p=krb5.git Don't escape rcache filename characters with backslash * srv_rcache.c (krb5_get_server_rcache): Octal escapes begin with hyphen now, since backslash is a pathname separator on DOS. ticket: new target_version: 1.3 component: krb5-libs tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15609 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index a0106c0d9..3b5287f0c 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,8 @@ +2003-06-11 Tom Yu + + * srv_rcache.c (krb5_get_server_rcache): Octal escapes begin with + hyphen now, since backslash is a pathname separator on DOS. + 2003-06-06 Sam Hartman * get_in_tkt.c (krb5_get_init_creds): Mask out renewable_ok if the diff --git a/src/lib/krb5/krb/srv_rcache.c b/src/lib/krb5/krb/srv_rcache.c index e2e5ed690..e66d2d366 100644 --- a/src/lib/krb5/krb/srv_rcache.c +++ b/src/lib/krb5/krb/srv_rcache.c @@ -61,7 +61,7 @@ krb5_get_server_rcache(krb5_context context, const krb5_data *piece, krb5_rcache len = piece->length + 3 + 1; for (i = 0; i < piece->length; i++) { - if (piece->data[i] == '\\') + if (piece->data[i] == '-') len++; else if (!isvalidrcname((int) piece->data[i])) len += 3; @@ -81,14 +81,14 @@ krb5_get_server_rcache(krb5_context context, const krb5_data *piece, krb5_rcache strcpy(cachename, "rc_"); p = 3; for (i = 0; i < piece->length; i++) { - if (piece->data[i] == '\\') { - cachename[p++] = '\\'; - cachename[p++] = '\\'; + if (piece->data[i] == '-') { + cachename[p++] = '-'; + cachename[p++] = '-'; continue; } if (!isvalidrcname((int) piece->data[i])) { sprintf(tmp, "%03o", piece->data[i]); - cachename[p++] = '\\'; + cachename[p++] = '-'; cachename[p++] = tmp[0]; cachename[p++] = tmp[1]; cachename[p++] = tmp[2];