Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataset name validation #8564

Closed
behlendorf opened this issue Apr 2, 2019 · 1 comment
Closed

dataset name validation #8564

behlendorf opened this issue Apr 2, 2019 · 1 comment
Labels
good first issue Indicates a good issue for first-time contributors Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@behlendorf
Copy link
Contributor

System information

Type Version/Name
Distribution Name Any
Distribution Version Any
Linux Kernel Any
Architecture Any
ZFS Version Any
SPL Version Any

Describe the problem you're observing

Dataset names are incorrectly allowed to be "." or "..", this should be detected and prevented when validating the dataset name. Additional discussion of this issue can be found in #8115.

Duplicate of https://www.illumos.org/issues/8254
Duplicate of #8115

Describe how to reproduce the problem

# zfs create tank/.
cannot mount '/tank/.': directory is not empty
filesystem successfully created, but not mounted

# zfs create tank/..
cannot mount '/tank/..': directory is not empty
filesystem successfully created, but not mounted

# zfs list 
NAME      USED  AVAIL     REFER  MOUNTPOINT
tank      784K   831M     24.5K  /tank
tank/.     24K   831M       24K  /tank/.
tank/..    24K   831M       24K  /tank/..

Include any warning/errors/backtraces from the system logs

A warning is issued that the filesystem cannot be mounted, but it will still be created. The desired behavior is for the zfs create command to fail with a meaningful error.

@behlendorf behlendorf added good first issue Indicates a good issue for first-time contributors Type: Defect Incorrect behavior (e.g. crash, hang) labels Apr 2, 2019
@foxyeyes48
Copy link

Now I don't understand all of this could you please help me out I Am new

tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Aug 13, 2019
This change restricts filesystem creation if the given name
contains either '.' or '..'

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: TulsiJain <tulsi.jain@delphix.com>
Closes openzfs#8842
Closes openzfs#8564
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Aug 22, 2019
This change restricts filesystem creation if the given name
contains either '.' or '..'

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: TulsiJain <tulsi.jain@delphix.com>
Closes openzfs#8842
Closes openzfs#8564
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Aug 23, 2019
This change restricts filesystem creation if the given name
contains either '.' or '..'

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: TulsiJain <tulsi.jain@delphix.com>
Closes openzfs#8842
Closes openzfs#8564
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Sep 17, 2019
This change restricts filesystem creation if the given name
contains either '.' or '..'

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: TulsiJain <tulsi.jain@delphix.com>
Closes openzfs#8842
Closes openzfs#8564
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Sep 18, 2019
This change restricts filesystem creation if the given name
contains either '.' or '..'

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: TulsiJain <tulsi.jain@delphix.com>
Closes openzfs#8842
Closes openzfs#8564
tonyhutter pushed a commit that referenced this issue Sep 26, 2019
This change restricts filesystem creation if the given name
contains either '.' or '..'

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: TulsiJain <tulsi.jain@delphix.com>
Closes #8842
Closes #8564
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Indicates a good issue for first-time contributors Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants