broctl install copies policy files to the .site folder in incorrect order

Description

I think broctl install copies the files to .site directory in the order specified by the SitePolicyPath This is probably incorrect. It should instead be in the reverse order of the path specified in the SitePolicyPath

example:

SitePolicyPath=/dir1:/dir2:/dir3:/usr/local/bro/share/bro

if a modified version of file with same name (eg. drop.bro) is in dir1 and original is in /usr/local/bro/share/bro; broctl install will overwrite /dir1/drop.bro with /usr/local/bro/share/bro/drop.bro when it creates /usr/local/bro/share/bro/.site folder.

In theory when bro is starting, it should have preference in loading /dir1/drop.bro over /usr/local/bro/share/bro/drop.bro but currently /dir1/drop.bro gets overwritten by /usr/local/bro/share/bro/drop.bro when broctl install creates .site folder.

Environment

None

Assignee

Unassigned

Reporter

Aashish Sharma

Labels

None

External issue ID

714

Components

Fix versions

Priority

Normal
Configure