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)
|
if (exit != 0)
|
||||||
y2error("Failed to set realm " + realmId);
|
y2error("Failed to set realm " + realmId);
|
||||||
|
|
||||||
// Set the Proxy User Credentials in miCASA
|
// Obtain the uid of casaatsd
|
||||||
cmd = sformat("KEYVALUE=\"%1\" sudo -u casaatsd CASAcli --set -n %2 -k CN", proxy_username, realmId);
|
ret = (map) SCR::Execute(.target.bash_output, "id -u casaatsd");
|
||||||
ret = (map) SCR::Execute(.target.bash_output, cmd);
|
|
||||||
exit = ret["exit"]:-1;
|
exit = ret["exit"]:-1;
|
||||||
if (exit != 0)
|
if (exit == 0)
|
||||||
y2error("Failed to set Proxy Username in miCASA for realm " + realmId);
|
{
|
||||||
|
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);
|
// Set the Proxy User Credentials in miCASA
|
||||||
ret = (map) SCR::Execute(.target.bash_output, cmd);
|
cmd = sformat("KEYVALUE=\"%1\" CASAcli -s -u %2 -n %3 -k CN", proxy_username, uid, realmId);
|
||||||
exit = ret["exit"]:-1;
|
ret = (map) SCR::Execute(.target.bash_output, cmd);
|
||||||
if (exit != 0)
|
exit = ret["exit"]:-1;
|
||||||
y2error("Failed to set Proxy Password in miCASA for realm " + realmId);
|
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
|
// Adjust firewall as needed
|
||||||
|
@ -555,8 +555,8 @@ LDAP contexts containing entities that can be authenticated.</p>
|
|||||||
`Frame(_("Proxy User Credentials"),
|
`Frame(_("Proxy User Credentials"),
|
||||||
`VBox(
|
`VBox(
|
||||||
`Left(`TextEntry(`id(`username), _("&Username (i.e. cn=admin,o=novell)"))),
|
`Left(`TextEntry(`id(`username), _("&Username (i.e. cn=admin,o=novell)"))),
|
||||||
`Left(`Password(`id(`passwd), _("&Password"))),
|
`Left(`Password(`id(`passwd), _("&Password "))),
|
||||||
`Left(`Password(`id(`repasswd), _("&Re-enter Password")))
|
`Left(`Password(`id(`repasswd), _("&Confirm Password ")))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
`VStretch()
|
`VStretch()
|
||||||
|
Loading…
Reference in New Issue
Block a user