-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure correct user homedir ownership
- Loading branch information
1 parent
94ae570
commit e803d6d
Showing
4 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from middlewared.test.integration.assets.account import user | ||
from middlewared.test.integration.assets.pool import dataset | ||
from middlewared.test.integration.utils import call | ||
|
||
|
||
def test_chown_on_update(): | ||
with dataset("unpriv_homedir") as homedir: | ||
with user({ | ||
"username": "unpriv", | ||
"full_name": "unpriv", | ||
"group_create": True, | ||
"password": "pass", | ||
}) as u: | ||
path = f"/mnt/{homedir}" | ||
|
||
call("user.update", u["id"], {"home": path}) | ||
|
||
assert { | ||
"user": "unpriv", | ||
"group": "unpriv", | ||
}.items() < call("filesystem.stat", path).items() |