blob: 71d2f6af036567ce3beaf88f97a77f0f0a666b52 (
plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2017 SUSE Linux. All Rights Reserved.
#
# FS QA Test 444
#
# Check if SGID is inherited when creating a subdirectory when the owner is not
# in the owning group and directory has default ACLs.
#
. ./common/preamble
_begin_fstest auto quick acl perms
# Import common functions.
. ./common/filter
. ./common/attr
# real QA test starts here
_supported_fs generic
_require_test
_require_runas
_require_acls
cd $TEST_DIR
TDIR=testdir.$seq
# Create SGID directory with default ACLs
rm -rf $TDIR
mkdir $TDIR
setfacl -d -m u:101:rwx $TDIR
chown 100:100 $TDIR
chmod 2755 $TDIR
_runas -u 100 -g 100 -- mkdir $TDIR/testsub1
stat -c %A $TDIR/testsub1
_runas -u 100 -g 101 -- mkdir $TDIR/testsub2
stat -c %A $TDIR/testsub2
status=0
exit
|