Modified to work with the new CASAcli interface which eliminates the
need to invoke CASAcli using sudo which creates its own set of problems. Fixed the issue of the password box too small when running Yast in text mode and changed the text on the "Re-enter password" box to "Confirm password".
This commit is contained in:
parent
38a2bc61a1
commit
4bc1198b88
@ -589,18 +589,33 @@ global boolean Write() {
|
||||
if (exit != 0)
|
||||
y2error("Failed to set realm " + realmId);
|
||||
|
||||
// Set the Proxy User Credentials in miCASA
|
||||
cmd = sformat("KEYVALUE=\"%1\" sudo -u casaatsd CASAcli --set -n %2 -k CN", proxy_username, realmId);
|
||||
ret = (map) SCR::Execute(.target.bash_output, cmd);
|
||||
// Obtain the uid of casaatsd
|
||||
ret = (map) SCR::Execute(.target.bash_output, "id -u casaatsd");
|
||||
exit = ret["exit"]:-1;
|
||||
if (exit != 0)
|
||||
y2error("Failed to set Proxy Username in miCASA for realm " + realmId);
|
||||
if (exit == 0)
|
||||
{
|
||||
string cmd_output = ret["stdout"]:"";
|
||||
list<string> uidComponents = splitstring(cmd_output, "\n");
|
||||
string uid = uidComponents[0]:"";
|
||||
y2milestone("casaatsd uid = " + uid);
|
||||
|
||||
cmd = sformat("KEYVALUE=\"%1\" sudo -u casaatsd CASAcli --set -n %2 -k Password", proxy_password, realmId);
|
||||
ret = (map) SCR::Execute(.target.bash_output, cmd);
|
||||
exit = ret["exit"]:-1;
|
||||
if (exit != 0)
|
||||
y2error("Failed to set Proxy Password in miCASA for realm " + realmId);
|
||||
// Set the Proxy User Credentials in miCASA
|
||||
cmd = sformat("KEYVALUE=\"%1\" CASAcli -s -u %2 -n %3 -k CN", proxy_username, uid, realmId);
|
||||
ret = (map) SCR::Execute(.target.bash_output, cmd);
|
||||
exit = ret["exit"]:-1;
|
||||
if (exit != 0)
|
||||
y2error("Failed to set Proxy Username in miCASA for realm " + realmId);
|
||||
|
||||
cmd = sformat("KEYVALUE=\"%1\" CASAcli -s -u %2 -n %3 -k Password", proxy_password, uid, realmId);
|
||||
ret = (map) SCR::Execute(.target.bash_output, cmd);
|
||||
exit = ret["exit"]:-1;
|
||||
if (exit != 0)
|
||||
y2error("Failed to set Proxy Password in miCASA for realm " + realmId);
|
||||
}
|
||||
else
|
||||
{
|
||||
y2error("Failed to obtain casaatsd uid");
|
||||
}
|
||||
});
|
||||
|
||||
// Adjust firewall as needed
|
||||
|
@ -555,8 +555,8 @@ LDAP contexts containing entities that can be authenticated.</p>
|
||||
`Frame(_("Proxy User Credentials"),
|
||||
`VBox(
|
||||
`Left(`TextEntry(`id(`username), _("&Username (i.e. cn=admin,o=novell)"))),
|
||||
`Left(`Password(`id(`passwd), _("&Password"))),
|
||||
`Left(`Password(`id(`repasswd), _("&Re-enter Password")))
|
||||
`Left(`Password(`id(`passwd), _("&Password "))),
|
||||
`Left(`Password(`id(`repasswd), _("&Confirm Password ")))
|
||||
)
|
||||
),
|
||||
`VStretch()
|
||||
|
Loading…
Reference in New Issue
Block a user