File: task.yaml

package info (click to toggle)
snapd 2.72-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,412 kB
  • sloc: sh: 16,506; ansic: 16,211; python: 11,213; makefile: 1,919; exp: 190; awk: 58; xml: 22
file content (26 lines) | stat: -rw-r--r-- 911 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
summary: directories created by snap-confine are immune from umask

details: |
    The setting of umask is inherited across the snap-{run,confine,exec} chain
    but does not hinder execution of snap-confine itself.

prepare: |
    "$TESTSTOOLS"/snaps-state install-local test-snapd-sh

restore: |
    snap remove test-snapd-sh
    rm -rf ~/snap

execute: |
    # See if umask 777 is respected.
    ( umask 777 && test-snapd-sh.sh -c /bin/true )
    # shellcheck disable=SC2016
    ( umask 777 && test-snapd-sh.sh -c 'touch "$SNAP_USER_COMMON"/canary' )
    test "$(stat -c %a "$HOME"/snap/test-snapd-sh/common/canary)" = 0
    rm -rf ~/snap

    # See if umask 000 is respected.
    ( umask 000 && test-snapd-sh.sh -c /bin/true )
    # shellcheck disable=SC2016
    ( umask 000 && test-snapd-sh.sh -c 'touch "$SNAP_USER_COMMON"/canary' )
    test "$(stat -c %a "$HOME"/snap/test-snapd-sh/common/canary)" = 666