Skip to content

Commit bba9fd3

Browse files
committed
Changed group for state dir files promise to match defaults per OS
Especially this concerns lmdb files. system_owned perms body was used previously but for solaris systems the use of "sys" group seems incorrect so changing to "root" for solaris is the net result of this change. Ticket: CFE-3362 Changelog: Title
1 parent a8ae808 commit bba9fd3

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

cfe_internal/enterprise/CFE_knowledge.cf

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ bundle agent cfe_internal_permissions
225225

226226
!(policy_server|am_policy_hub)::
227227
"$(sys.statedir)/." -> { "ENT-4773" }
228-
perms => system_owned( "0600" ),
228+
perms => state_dir_system_owned(),
229229
# Important to recurse across file system boundaries, as databases and or state are commonly on different filesystems
230230
depth_search => recurse_with_base( inf ),
231231
file_select => all;
@@ -237,7 +237,7 @@ bundle agent cfe_internal_permissions
237237
comment => "The database user must be able to read the parent directory of the database or it won't be accessible";
238238

239239
"$(sys.statedir)/."
240-
perms => mog("0600", "root", "root" ),
240+
perms => state_dir_system_owned(),
241241
depth_search => recurse_except( inf, "pg" ),
242242
file_select => all,
243243
comment => "The database user must be able to read the parent directory of the database or it won't be accessible";
@@ -362,3 +362,23 @@ body depth_search cfe_internal_docroot_application_perms
362362
depth => "inf";
363363
exclude_dirs => { "logs" };
364364
}
365+
366+
############################################################################
367+
368+
body perms state_dir_system_owned
369+
{
370+
mode => "0600";
371+
owners => { "root" };
372+
373+
freebsd|openbsd|netbsd|darwin::
374+
groups => { "wheel" };
375+
376+
aix::
377+
groups => { "system" };
378+
379+
hpux::
380+
groups => { "sys" };
381+
382+
!(freebsd|openbsd|netbsd|darwin|aix|hpux)::
383+
groups => { "root" };
384+
}

0 commit comments

Comments
 (0)