-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9897 from anonymouse64/bugfix/lp-1910298-part-1
usersession/autostart: change ~/snap perms to 0700 on startup
- Loading branch information
Showing
6 changed files
with
170 additions
and
12 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,31 @@ | ||
summary: Ensure snap userd autostart fixes up directory permissions of ~/snap | ||
|
||
# don't run on trusty, tests.session does not work on trusty due to the | ||
# lack of user session support there | ||
systems: | ||
- -ubuntu-14.04-64 | ||
|
||
environment: | ||
USER/root: root | ||
USER/test: test | ||
HOMEDIR/root: /root/snap | ||
HOMEDIR/test: /home/test/snap | ||
|
||
prepare: | | ||
# Prepare for using sessions as the given user | ||
tests.session prepare -u "$USER" | ||
execute: | | ||
# set permissive permissions on the user's home dir | ||
tests.session -u "$USER" exec mkdir -p "$HOMEDIR" | ||
tests.session -u "$USER" exec chmod 0777 "$HOMEDIR" | ||
# run autostart | ||
tests.session -u "$USER" exec snap userd --autostart | ||
# check the permissions are fixed up now | ||
tests.session -u "$USER" exec stat -c "%a" "$HOMEDIR" | MATCH 700 | ||
restore: | | ||
# Restore after using sessions as the given user | ||
tests.session restore -u "$USER" |
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