xref: /illumos-gate/usr/src/test/libsec-tests/tests/fromtext/acl_fromtext_6.ksh (revision 0250c53ad267726f2438e3c6556199a0bbf588a2)
1#!/bin/ksh
2
3#
4# This file and its contents are supplied under the terms of the
5# Common Development and Distribution License ("CDDL"), version 1.0.
6# You may only use this file in accordance with the terms of version
7# 1.0 of the CDDL.
8#
9# A full copy of the text of the CDDL should have accompanied this
10# source.  A copy of the CDDL is also available via the Internet at
11# http://www.illumos.org/license/CDDL.
12#
13
14#
15# Copyright 2024 RackTop Systems, Inc.
16#
17
18scriptdir=$(dirname $0)
19. $scriptdir/../acltext_common
20
21# Reference output from: acl_totext -sn
22ref="owner@:read_data/write_data/append_data/read_xattr/write_xattr/execute/delete_child/read_attributes/write_attributes/delete/read_acl/write_acl/write_owner/synchronize:file_inherit/dir_inherit:allow
23group@:write_data/append_data/write_xattr/write_attributes:file_inherit/dir_inherit:allow
24everyone@:write_data/append_data/write_xattr/write_attributes:allow
25user:501:read_data/write_data/append_data/read_xattr/write_xattr/execute/delete_child/read_attributes/write_attributes/delete/read_acl/write_acl/write_owner/synchronize:file_inherit/dir_inherit:allow
26group:502:write_data/append_data/write_xattr/write_attributes:file_inherit/dir_inherit:allow
27usersid:S-1-5-21-1813420391-1960978090-3893453001-1001:read_data/write_data/append_data/read_xattr/write_xattr/execute/delete_child/read_attributes/write_attributes/delete/read_acl/write_acl/write_owner/synchronize:file_inherit/dir_inherit:allow
28groupsid:S-1-5-21-1813420391-1960978090-3893453001-1002:write_data/append_data/write_xattr/write_attributes:file_inherit/dir_inherit:allow
29groupsid:S-1-5-21-1813420391-1960978090-3893453001-1003:read_data/read_xattr/read_attributes/read_acl:file_inherit/dir_inherit:allow
30groupsid:S-1-5-21-1813420391-1960978090-3893453002-2002:read_data/read_xattr/read_attributes/read_acl:file_inherit/dir_inherit:allow
31groupsid:S-1-5-21-1813420391-1960978090-3893453003-3003:read_data/read_xattr/read_attributes/read_acl:file_inherit/dir_inherit:allow"
32
33acl_fromtext "$ref" ||
34{
35    printf "TEST FAILED\n"
36    exit 1
37}
38printf "TEST PASSED\n"
39exit 0
40