1213169Strasz#!/bin/sh
2213169Strasz#
3213169Strasz# Copyright (c) 2010 Edward Tomasz Napiera��a <trasz@FreeBSD.org>
4213169Strasz# All rights reserved.
5213169Strasz#
6213169Strasz# Redistribution and use in source and binary forms, with or without
7213169Strasz# modification, are permitted provided that the following conditions
8213169Strasz# are met:
9213169Strasz# 1. Redistributions of source code must retain the above copyright
10213169Strasz#    notice, this list of conditions and the following disclaimer.
11213169Strasz# 2. Redistributions in binary form must reproduce the above copyright
12213169Strasz#    notice, this list of conditions and the following disclaimer in the
13213169Strasz#    documentation and/or other materials provided with the distribution.
14213169Strasz#
15213169Strasz# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16213169Strasz# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17213169Strasz# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18213169Strasz# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19213169Strasz# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20213169Strasz# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21213169Strasz# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22213169Strasz# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23213169Strasz# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24213169Strasz# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25213169Strasz# SUCH DAMAGE.
26213169Strasz#
27213169Strasz# $FreeBSD: releng/10.2/tools/regression/acltools/mktrivial.sh 213169 2010-09-25 14:33:35Z trasz $
28213169Strasz#
29213169Strasz
30213169Strasz# This shell script generates an input file for the "run" script, used
31213169Strasz# to verify generation of trivial ACLs.
32213169Strasz
33213169Straszecho "$ touch f"
34213169Strasztouch f
35213169Strasz
36213169Straszfor s in `jot 7 0 7`; do
37213169Strasz	for u in `jot 7 0 7`; do
38213169Strasz		for g in `jot 7 0 7`; do
39213169Strasz			for o in `jot 7 0 7`; do
40213169Strasz				echo "$ chmod 0$s$u$g$o f"
41213169Strasz				chmod "0$s$u$g$o" f
42213169Strasz				echo "$ ls -l f | cut -d' ' -f1"
43213169Strasz				ls -l f | cut -d' ' -f1 | sed 's/^/> /'
44213169Strasz				echo "$ getfacl -q f"
45213169Strasz				getfacl -q f | sed 's/^/> /'
46213169Strasz			done
47213169Strasz		done
48213169Strasz	done
49213169Straszdone
50213169Strasz
51213169Straszecho "$ rm f"
52213169Straszrm f
53213169Strasz
54