Fixed problem that was causing us to clear Proxy User credentials from

miCASA erroneously when modifying realm configuration.
This commit is contained in:
Juan Carlos Luciani 2007-08-14 21:55:34 +00:00
parent 389d184ca7
commit b8ccfe47f6

View File

@ -589,11 +589,14 @@ global boolean Write() {
// Clear out the credentials that may have been saved in miCASA // Clear out the credentials that may have been saved in miCASA
// for this user. // for this user.
/* Comment this out until we can read realm proxy credentials
using CASAcli.
string cmd = sformat("CASAcli -r -u %1", uid); string cmd = sformat("CASAcli -r -u %1", uid);
ret = (map) SCR::Execute(.target.bash_output, cmd); 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 remove casaatsd credentials"); y2error("Failed to remove casaatsd credentials");
*/
} }
// Check if we need to save the server configuration // Check if we need to save the server configuration
@ -684,8 +687,11 @@ global boolean Write() {
if (exit != 0) if (exit != 0)
y2error("Failed to set realm " + realmId); y2error("Failed to set realm " + realmId);
// Save Proxy User Credentials in miCASA if we have the uid of casaatsd // Try to save Proxy User Credentials in miCASA if we have the uid of casaatsd
if (uid != "") if (uid != "")
{
// Save the credentials if we have access to them
if (proxy_username != "")
{ {
// Set the Proxy User Credentials in miCASA // Set the Proxy User Credentials in miCASA
cmd = sformat("KEYVALUE=\"%1\" CASAcli -s -u %2 -n %3 -k CN", proxy_username, uid, realmId); cmd = sformat("KEYVALUE=\"%1\" CASAcli -s -u %2 -n %3 -k CN", proxy_username, uid, realmId);
@ -700,6 +706,7 @@ global boolean Write() {
if (exit != 0) if (exit != 0)
y2error("Failed to set Proxy Password in miCASA for realm " + realmId); y2error("Failed to set Proxy Password in miCASA for realm " + realmId);
} }
}
else else
{ {
y2error("Not setting proxy credentials in miCASA due to blank uid"); y2error("Not setting proxy credentials in miCASA due to blank uid");