changeset 2665 | 7b208a92357b |
parent 2199 | 712a788c2dfd |
child 2857 | 0375a3ea725e |
--- a/usr/src/common/zfs/zfs_namecheck.c Fri Sep 01 15:58:43 2006 -0700 +++ b/usr/src/common/zfs/zfs_namecheck.c Fri Sep 01 17:46:14 2006 -0700 @@ -186,6 +186,16 @@ found_snapshot = 1; } + /* + * If there is a '/' in a snapshot name + * then report an error + */ + if (*end == '/' && found_snapshot) { + if (why) + *why = NAME_ERR_TRAILING_SLASH; + return (-1); + } + /* Update to the next component */ loc = end + 1; }