From: Jeffrey Altman Date: Tue, 12 Aug 2008 00:54:48 +0000 (+0000) Subject: windows-fs-mkmount-20080811 X-Git-Tag: openafs-devel-1_5_61~903 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1f6c7ca14a10ec476dc6720c264a004bc2c9d955;p=packages%2Fo%2Fopenafs.git windows-fs-mkmount-20080811 LICENSE MIT fix volume name validity test. strip trailing '.' from volume name --- diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index 5e7cfbd98..531a203e4 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -1766,6 +1766,7 @@ cm_IoctlCreateMountPoint(struct cm_ioctl *ioctlp, struct cm_user *userp, cm_scac clientchar_t *cell = NULL; cm_volume_t *volp = NULL; cm_cell_t *cellp = NULL; + size_t len; /* * The fs command allows the user to specify partial cell names on NT. These must @@ -1802,6 +1803,11 @@ cm_IoctlCreateMountPoint(struct cm_ioctl *ioctlp, struct cm_user *userp, cm_scac cellp = cm_FindCellByID(dscp->fid.cell, CM_FLAG_NOPROBE); } + /* remove the trailing dot if it is present */ + len = strlen(fsvolume); + if (len > 1 && fsvolume[len-1] == '.') + fsvolume[len-1] = '\0'; + /* validate the target info */ if (cm_VolNameIsID(fsvolume)) { code = cm_FindVolumeByID(cellp, atoi(fsvolume), userp, reqp,