[Asterisk-code-review] res_crypto: Don't load non-regular files in keys directory (asterisk[master])

Philip Prindeville asteriskteam at digium.com
Wed Sep 7 14:21:33 CDT 2022


Attention is currently required from: George Joseph, Kevin Harwell.

Philip Prindeville has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18533 )

Change subject: res_crypto: Don't load non-regular files in keys directory
......................................................................


Patch Set 16:

(1 comment)

File res/res_crypto.c:

https://gerrit.asterisk.org/c/asterisk/+/18533/comment/3e094a67_771a3c51 
PS16, Line 509: 		while ((ent = readdir(dir))) {
> readdir is not thread safe.  Please use ast_file_read_dir() or ast_file_read_dirs(). […]
The code was already using readdir(), I didn't change that.  I can do a separate CR to handle changing that, as well as doing a readlink() and recursing the path to the root, making sure that the parent directories are either owned by root or by the asterisk running uid...



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18533
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ie77e0648f8b0b1c2159fb24662d1989cfd4cc36d
Gerrit-Change-Number: 18533
Gerrit-PatchSet: 16
Gerrit-Owner: Philip Prindeville <philipp at redfish-solutions.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <default.enum at gmail.com>
Gerrit-Reviewer: N A <mail at interlinked.x10host.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Attention: Kevin Harwell <default.enum at gmail.com>
Gerrit-Comment-Date: Wed, 07 Sep 2022 19:21:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220907/aa05f3b1/attachment-0001.html>


More information about the asterisk-code-review mailing list