xref: /illumos-gate/usr/src/test/libsec-tests/tests/fromtext/acl_fromtext_3.ksh (revision 42920ac8f798accb1375a7faa38ddefa674abf63)
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 -nc
22ref="owner@:rwxpdDaARWcCos:fd-----:allow
23group@:-w-p---A-W----:fd-----:allow
24everyone@:-w-p---A-W----:-------:allow
25user:501:rwxpdDaARWcCos:fd-----:allow
26group:502:-w-p---A-W----:fd-----:allow
27user:2147483649:rwxpdDaARWcCos:fd-----:allow
28group:2147483650:-w-p---A-W----:fd-----:allow
29group:2147483651:r-----a-R-c---:fd-----:allow
30group:2147483652:r-----a-R-c---:fd-----:allow
31group:2147483653:r-----a-R-c---:fd-----:allow"
32
33acl_fromtext "$ref" ||
34{
35    printf "TEST FAILED\n"
36    exit 1
37}
38printf "TEST PASSED\n"
39exit 0
40