xref: /illumos-gate/usr/src/test/libsec-tests/tests/totext/acl_totext_7.ksh (revision 8119dad84d6416f13557b0ba8e2aaf9064cbcfd3)
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
21ref="owner@:rwxpdDaARWcCos:fd-----:allow
22group@:-w-p---A-W----:fd-----:allow
23everyone@:-w-p---A-W----:-------:allow
24user:501:rwxpdDaARWcCos:fd-----:allow
25group:502:-w-p---A-W----:fd-----:allow
26usersid:S-1-5-21-1813420391-1960978090-3893453001-1001:rwxpdDaARWcCos:fd-----:allow
27groupsid:S-1-5-21-1813420391-1960978090-3893453001-1002:-w-p---A-W----:fd-----:allow
28groupsid:S-1-5-21-1813420391-1960978090-3893453001-1003:r-----a-R-c---:fd-----:allow
29groupsid:S-1-5-21-1813420391-1960978090-3893453002-2002:r-----a-R-c---:fd-----:allow
30groupsid:S-1-5-21-1813420391-1960978090-3893453003-3003:r-----a-R-c---:fd-----:allow"
31
32out="$(acl_totext -snc)"
33if [ "$out" != "$ref" ] ; then
34    printf "TEST FAILED: incorrect output ($out)\n"
35    exit 1
36fi
37printf "TEST PASSED\n"
38exit 0
39