Skip to content

Commit

Permalink
Power Ops: Attempt to execute file path only
Browse files Browse the repository at this point in the history
Adding a check to verify that the path to execute
is a file only and not a directory.

Pull request: #689
  • Loading branch information
vmwkruti1111 committed Feb 23, 2024
1 parent c35063e commit c199cce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions open-vm-tools/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,6 @@ Dirk Mueller Detect the proto files for containerd grpc client on SUSE like s

Jan Engelhardt Fix build problems with grpc (at least) 1.54
- https://github.com/vmware/open-vm-tools/pull/664

Yun Zheng Hu Power Ops: Attempt to execute file path only
- https://github.com/vmware/open-vm-tools/pull/689
2 changes: 1 addition & 1 deletion open-vm-tools/scripts/common/statechange.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ RunScripts() {

if [ -d "$scriptDir" ]; then
for scriptFile in "$scriptDir"/*; do
if [ -x "$scriptFile" ]; then
if [ -f "$scriptFile" -a -x "$scriptFile" ]; then
"$scriptFile" $powerOp
exitCode=`expr $exitCode \| $?`
fi
Expand Down

0 comments on commit c199cce

Please sign in to comment.