check-permissions.sh revision 1
1N/A# The contents of this file are subject to the terms of the 1N/A# Common Development and Distribution License (the "License"). 1N/A# You may not use this file except in compliance with the License. 1N/A# See the License for the specific language governing permissions 1N/A# and limitations under the License. 1N/A# When distributing Covered Code, include this CDDL HEADER in each 1N/A# If applicable, add the following below this CDDL HEADER, with the 1N/A# fields enclosed by brackets "[]" replaced with your own identifying 1N/A# information: Portions Copyright [yyyy] [name of copyright owner] 1N/A# Check :include: aliases (in files configured in sendmail.cf) and .forward 1N/A# files to make sure the files and their parent directory paths all have 1N/A# proper permissions. And check the master alias file(s) too. 1N/A# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 1N/A# Check the group- and world-writable bits on the given file. 1N/A# Break down the given file name into its components, and call analyze with 1N/A# analyze in turn with arguments: 1N/A n = split($0, parts, "/"); 1N/A for (i = n; i >= 2; i--){ 1N/A for (j = 2; j <= i; j++){ 1N/A string = sprintf("%s/%s", string, parts[j]); 1N/A# These should be OK themselves, but other packages may have screwed up the 1N/A# permissions on /etc or /etc/mail . And best to check in case non-standard 1N/A# alias paths are used. 1N/A# Find all valid :include: files used in alias files configured in sendmail.cf 1N/A# Check .forward files as well. If the argument "ALL" is given, do it for 1N/A# everyone. If no argument to the script is given, just do it for the current 1N/A# user. O/w, do it for all arguments. 1N/Aelif [ $
1 =
"ALL" ] ;
then