Project

General

Profile

Bug #2944 » 0001-Fixed-sshKeyDistribution-technique-to-make-it-work-with-network-users.patch

Michael Gliwinski, 2012-10-24 20:37

View differences:

techniques/systemSettings/remoteAccess/sshKeyDistribution/1.0/sshKeyDistribution.st
}&
"sshkey_distribution_index" slist => getindices("sshkey_distribution_name");
"no_$(sshkey_distribution_index)" int => getfields("$(sshkey_distribution_name[$(sshkey_distribution_index)]):.*","/etc/passwd",":","userdata_$(sshkey_distribution_index)");
"userdata_$(sshkey_distribution_index)" string => execresult("/usr/bin/getent passwd $(sshkey_distribution_name[$(sshkey_distribution_index)])", "noshell");
"no_$(sshkey_distribution_index)" int => parsestringarray(
"userarray_$(sshkey_distribution_index)",
"$(userdata_$(sshkey_distribution_index))",
"",
":",
"1000",
"200000"
);
files:
linux.!SuSE::
"$(userdata_$(sshkey_distribution_index)[6])/.ssh/."
"$(userarray_$(sshkey_distribution_index)[$(sshkey_distribution_name[$(sshkey_distribution_index)])][5])/.ssh/."
create => "true",
ifvarclass => canonify("index_$(sshkey_distribution_index)_exists"),
perms => mog("700", "$(sshkey_distribution_name[$(sshkey_distribution_index)])", "$(sshkey_distribution_name[$(sshkey_distribution_index)])");
perms => mog("700", "$(sshkey_distribution_name[$(sshkey_distribution_index)])", "$(userarray_$(sshkey_distribution_index)[$(sshkey_distribution_name[$(sshkey_distribution_index)])][3])");
"$(userdata_$(sshkey_distribution_index)[6])/.ssh/authorized_keys"
"$(userarray_$(sshkey_distribution_index)[$(sshkey_distribution_name[$(sshkey_distribution_index)])][5])/.ssh/authorized_keys"
create => "true",
edit_defaults => rudder_empty_select("$(sshkey_distribution_edit_type[$(sshkey_distribution_index)])"),
perms => mog("600", "$(sshkey_distribution_name[$(sshkey_distribution_index)])", "$(sshkey_distribution_name[$(sshkey_distribution_index)])"),
perms => mog("600", "$(sshkey_distribution_name[$(sshkey_distribution_index)])", "$(userarray_$(sshkey_distribution_index)[$(sshkey_distribution_name[$(sshkey_distribution_index)])][3])"),
edit_line => insert_lines("$(sshkey_distribution_key[$(sshkey_distribution_index)])"),
ifvarclass => canonify("index_$(sshkey_distribution_index)_exists"),
classes => kept_if_else("line_$(sshkey_distribution_index)_ok","line_$(sshkey_distribution_index)_added","line_$(sshkey_distribution_index)_failed");
SuSE::
"$(userdata_$(sshkey_distribution_index)[6])/.ssh/."
"$(userarray_$(sshkey_distribution_index)[$(sshkey_distribution_name[$(sshkey_distribution_index)])][5])/.ssh/."
create => "true",
ifvarclass => canonify("index_$(sshkey_distribution_index)_exists"),
perms => mog("700", "$(sshkey_distribution_name[$(sshkey_distribution_index)])", "users");
"$(userdata_$(sshkey_distribution_index)[6])/.ssh/authorized_keys"
"$(userarray_$(sshkey_distribution_index)[$(sshkey_distribution_name[$(sshkey_distribution_index)])][5])/.ssh/authorized_keys"
create => "true",
edit_defaults => rudder_empty_select("$(sshkey_distribution_edit_type[$(sshkey_distribution_index)])"),
perms => mog("600", "$(sshkey_distribution_name[$(sshkey_distribution_index)])", "users"),
-
(2-2/2)