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:
Juan Carlos Luciani 2007-05-17 15:42:32 +00:00
parent 38a2bc61a1
commit 4bc1198b88
2 changed files with 27 additions and 12 deletions

View File

@ -589,18 +589,33 @@ global boolean Write() {
if (exit != 0)
y2error("Failed to set realm " + realmId);
// Obtain the uid of casaatsd
ret = (map) SCR::Execute(.target.bash_output, "id -u casaatsd");
exit = ret["exit"]:-1;
if (exit == 0)
{
string cmd_output = ret["stdout"]:"";
list<string> uidComponents = splitstring(cmd_output, "\n");
string uid = uidComponents[0]:"";
y2milestone("casaatsd uid = " + uid);
// Set the Proxy User Credentials in miCASA
cmd = sformat("KEYVALUE=\"%1\" sudo -u casaatsd CASAcli --set -n %2 -k CN", proxy_username, realmId);
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\" sudo -u casaatsd CASAcli --set -n %2 -k Password", proxy_password, 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

View File

@ -556,7 +556,7 @@ LDAP contexts containing entities that can be authenticated.</p>
`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(`repasswd), _("&Confirm Password ")))
)
),
`VStretch()