>From c25fb0547a7b292fdcb1be4e924754354ca03930 Mon Sep 17 00:00:00 2001 From: Shawn Wells Date: Thu, 21 Mar 2013 06:48:02 -0400 Subject: [PATCH] Modified find command Current find command utilized -type f, which would search for files and exclude symlinks. Per suggestion of Chad T. and Trey H., altering the find command to utilize a -L will allow for the following of symlinks and evaluate against the target file (vs the symlink itself), thus addressing the requirements much more effectively and reducing the risk of missing symlink'd files. --- RHEL6/input/system/permissions/files.xml | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RHEL6/input/system/permissions/files.xml b/RHEL6/input/system/permissions/files.xml index 6a9c707..ace60a8 100644 --- a/RHEL6/input/system/permissions/files.xml +++ b/RHEL6/input/system/permissions/files.xml @@ -208,7 +208,7 @@ Shared libraries are stored in the following directories: To find shared libraries that are group-writable or world-writable, run the following command for each directory DIR which contains shared libraries: -
$ find DIR -perm /022 -type f
+
$ find -L DIR -perm /022
Files from shared library directories are loaded into the address space of processes (including privileged ones) or of the kernel itself at @@ -244,7 +244,7 @@ Shared libraries are stored in the following directories: For each of these directories, run the following command to find files not owned by root: -
$ find DIR \! -user root -type f
+
$ find -L DIR \! -user root
Files from shared library directories are loaded into the address space of processes (including privileged ones) or of the kernel itself at @@ -372,7 +372,7 @@ symptoms of a misconfigured application or user account. To find world-writable files, run the following command: -
# find / -xdev -type f -perm -002
+
# find -L / -xdev -perm -002
Data in world-writable files can be modified by any @@ -394,7 +394,7 @@ of any unpackaged SGID files. To find world-writable files, run the following command: -
# find / -xdev -type f -perm -002
+
# find -L / -xdev -perm -002
Executable files with the SGID permission run with the privileges of the owner of the file. SGID files of uncertain provenance could allow for @@ -415,7 +415,7 @@ of any unpackaged SUID files. To find world-writable files, run the following command: -
# find / -xdev -type f -perm -002
+
# find -L / -xdev -perm -002
Executable files with the SUID permission run with the privileges of the owner of the file. SUID files of uncertain provenance could allow for -- 1.7.1