Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #4705: On AIX, several techniques try to use the group "root" #333

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion techniques/system/common/1.0/internal_security.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bundle agent internal_security

"mode" string => "600";
"user" string => "root";
"group" string => "root";
"group" string => "0"; # This is "root" on most UNIX-like systems, but "system" on AIX

#windows::

Expand Down
4 changes: 2 additions & 2 deletions techniques/system/common/1.0/update.st
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ bundle agent update_action
"${g.rudder_ncf}/common"
copy_from => remote_unsecured_without_perms("${server_info.cfserved}", "${g.rudder_ncf_origin_common}"),
depth_search => recurse_ignore("inf", @{g.excludedreps}),
perms => u_mog("644", "root", "root"),
perms => u_mog("644", "root", "0"),
action => immediate,
classes => success("rudder_ncf_common_updated", "rudder_ncf_common_update_error", "rudder_ncf_common_updated_ok"),
comment => "Update the common Rudder ncf instance";

"${g.rudder_ncf}/local"
copy_from => remote_unsecured_without_perms("${server_info.cfserved}", "${g.rudder_ncf_origin_local}"),
depth_search => recurse_ignore("inf", @{g.excludedreps}),
perms => u_mog("644", "root", "root"),
perms => u_mog("644", "root", "0"),
action => immediate,
classes => success("rudder_ncf_local_updated", "rudder_ncf_local_update_error", "rudder_ncf_local_updated_ok"),
comment => "Update the local Rudder ncf instance";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ bundle agent check_motd_configuration

"motd_file" slist => { "/etc/motd" };

aix::
"rudder_motd_group" string => "bin";
!aix::
"rudder_motd_group" string => "root";

files:

!windows::
Expand All @@ -49,7 +54,7 @@ bundle agent check_motd_configuration

create => "true",
edit_defaults => rudder_empty_select("${motd_empty}"),
perms => mog("644", "root", "root"),
perms => mog("644", "root", "${rudder_motd_group}"),
edit_line => insert_lines("${motd}"),
classes => kept_if_else("motd_file_kept", "motd_file_edited", "motd_file_failed");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ bundle agent rudder_motd_configuration(class_prefix, service_name, trackingkey,
!debian::
"rudder_motd_file" slist => { "/etc/motd" };

aix::
"rudder_motd_group" string => "bin";
!aix::
"rudder_motd_group" string => "root";

classes:
"rudder_motd_absent" not => fileexists("/etc/motd");

Expand All @@ -41,7 +46,7 @@ bundle agent rudder_motd_configuration(class_prefix, service_name, trackingkey,
"${rudder_motd_file}"
create => "true",
edit_defaults => rudder_empty_select("${rudder_motd_empty}"),
perms => mog("644", "root", "root"),
perms => mog("644", "root", "${rudder_motd_group}"),
edit_line => insert_lines("${rudder_motd_payload}"),
classes => rudder_common_classes("${class_prefix}_file_edition");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ bundle agent rudder_motd_configuration(class_prefix, service_name, trackingkey,

debian::
"rudder_motd_file" slist => { "/etc/motd", "/etc/motd.tail" };

!debian::
"rudder_motd_file" slist => { "/etc/motd" };

aix::
"rudder_motd_group" string => "bin";
!aix::
"rudder_motd_group" string => "root";

classes:
"rudder_motd_absent" not => fileexists("/etc/motd");

Expand All @@ -42,7 +46,7 @@ bundle agent rudder_motd_configuration(class_prefix, service_name, trackingkey,
"${rudder_motd_file}"
create => "true",
edit_defaults => rudder_empty_select("${rudder_motd_empty}"),
perms => mog("644", "root", "root"),
perms => mog("644", "root", "${rudder_motd_group}"),
edit_line => rudder_line_insertion("${rudder_motd_payload}", "${rudder_motd_location}"),
classes => rudder_common_classes("${class_prefix}_file_edition");

Expand Down