Skip to content

Commit

Permalink
feature (chroot): add chroot option to nfs backends
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-kerjean committed Jan 6, 2024
1 parent 763201e commit 409f1bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion server/plugin/plg_backend_nfs/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (this NfsShare) LoginForm() Form {
Name: "advanced",
Type: "enable",
Placeholder: "Advanced",
Target: []string{"nfs_uid", "nfs_gid", "nfs_machinename"},
Target: []string{"nfs_uid", "nfs_gid", "nfs_machinename", "nfs_chroot"},
},
FormElement{
Id: "nfs_uid",
Expand All @@ -103,6 +103,12 @@ func (this NfsShare) LoginForm() Form {
Type: "text",
Placeholder: "machine name",
},
FormElement{
Id: "nfs_chroot",
Name: "path",
Type: "text",
Placeholder: "chroot",
},
},
}
}
Expand Down
8 changes: 7 additions & 1 deletion server/plugin/plg_backend_nfs4/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (this Nfs4Share) LoginForm() Form {
Name: "advanced",
Type: "enable",
Placeholder: "Advanced",
Target: []string{"nfs_uid", "nfs_gid", "nfs_machinename"},
Target: []string{"nfs_uid", "nfs_gid", "nfs_machinename", "nfs_chroot"},
},
FormElement{
Id: "nfs_uid",
Expand All @@ -97,6 +97,12 @@ func (this Nfs4Share) LoginForm() Form {
Type: "text",
Placeholder: "machine name",
},
FormElement{
Id: "nfs_chroot",
Name: "path",
Type: "text",
Placeholder: "chroot",
},
},
}
}
Expand Down

0 comments on commit 409f1bc

Please sign in to comment.