From: Jeffrey Altman Date: Wed, 20 Aug 2008 20:44:56 +0000 (+0000) Subject: windows-list-symlink-20080820 X-Git-Tag: openafs-devel-1_5_61~879 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a00f706eb67c257af9892557cfb6ad35594144cf;p=packages%2Fo%2Fopenafs.git windows-list-symlink-20080820 LICENSE MIT Another casaulty of the Unicode transition, the return value of the ListLink operation was not being convered from wchar to char before it was copied into the output buffer. --- diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index 531a203e4..a161f90b3 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -1959,16 +1959,20 @@ cm_IoctlListlink(struct cm_ioctl *ioctlp, struct cm_user *userp, cm_scache_t *ds code = cm_AssembleLink(scp, "", &newRootScp, &spacep, userp, reqp); cm_ReleaseSCache(scp); if (code == 0) { + char * linkstr; cp = ioctlp->outDatap; if (newRootScp != NULL) { StringCbCopyA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), cm_mountRoot); StringCbCatA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), "/"); cp += strlen(cp); } - StringCbCopyA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), spacep->data); + + linkstr = cm_ClientStringToFsStringAlloc(spacep->wdata, -1, NULL); + StringCbCopyA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), linkstr); cp += strlen(cp) + 1; ioctlp->outDatap = cp; cm_FreeSpace(spacep); + free(linkstr); if (newRootScp != NULL) cm_ReleaseSCache(newRootScp); code = 0;