xref: /illumos-gate/usr/src/test/libsec-tests/tests/totext/acl_totext_4.ksh (revision 42920ac8f798accb1375a7faa38ddefa674abf63)
1*42920ac8SGordon Ross#!/bin/ksh
2*42920ac8SGordon Ross
3*42920ac8SGordon Ross#
4*42920ac8SGordon Ross# This file and its contents are supplied under the terms of the
5*42920ac8SGordon Ross# Common Development and Distribution License ("CDDL"), version 1.0.
6*42920ac8SGordon Ross# You may only use this file in accordance with the terms of version
7*42920ac8SGordon Ross# 1.0 of the CDDL.
8*42920ac8SGordon Ross#
9*42920ac8SGordon Ross# A full copy of the text of the CDDL should have accompanied this
10*42920ac8SGordon Ross# source.  A copy of the CDDL is also available via the Internet at
11*42920ac8SGordon Ross# http://www.illumos.org/license/CDDL.
12*42920ac8SGordon Ross#
13*42920ac8SGordon Ross
14*42920ac8SGordon Ross#
15*42920ac8SGordon Ross# Copyright 2024 RackTop Systems, Inc.
16*42920ac8SGordon Ross#
17*42920ac8SGordon Ross
18*42920ac8SGordon Rossscriptdir=$(dirname $0)
19*42920ac8SGordon Ross. $scriptdir/../acltext_common
20*42920ac8SGordon Ross
21*42920ac8SGordon Rossref="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
22*42920ac8SGordon Rossgroup@:write_data/append_data/write_xattr/write_attributes:file_inherit/dir_inherit:allow
23*42920ac8SGordon Rosseveryone@:write_data/append_data/write_xattr/write_attributes:allow
24*42920ac8SGordon Rossuser:user501: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
25*42920ac8SGordon Rossgroup:group502:write_data/append_data/write_xattr/write_attributes:file_inherit/dir_inherit:allow
26*42920ac8SGordon Rossusersid:user1001@test-domain-name: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
27*42920ac8SGordon Rossgroupsid:group1002@test-domain-name:write_data/append_data/write_xattr/write_attributes:file_inherit/dir_inherit:allow
28*42920ac8SGordon Rossgroupsid:group1003-name-really-crazy-long-long-long-long-long-long-long-long-long@test-domain-name:read_data/read_xattr/read_attributes/read_acl:file_inherit/dir_inherit:allow
29*42920ac8SGordon Rossgroupsid:group2002@test-domain-name-somewhat-longer:read_data/read_xattr/read_attributes/read_acl:file_inherit/dir_inherit:allow
30*42920ac8SGordon Rossgroupsid:group3003@test-domain-name-really-crazy-long-long-long-long-long-long-long-long-long:read_data/read_xattr/read_attributes/read_acl:file_inherit/dir_inherit:allow"
31*42920ac8SGordon Ross
32*42920ac8SGordon Rossout="$(acl_totext -s)"
33*42920ac8SGordon Rossif [ "$out" != "$ref" ] ; then
34*42920ac8SGordon Ross    printf "TEST FAILED: incorrect output ($out)\n"
35*42920ac8SGordon Ross    exit 1
36*42920ac8SGordon Rossfi
37*42920ac8SGordon Rossprintf "TEST PASSED\n"
38*42920ac8SGordon Rossexit 0
39