Fixed problem that was causing us to clear Proxy User credentials from
miCASA erroneously when modifying realm configuration.
This commit is contained in:
parent
389d184ca7
commit
b8ccfe47f6
@ -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,21 +687,25 @@ 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 != "")
|
||||||
{
|
{
|
||||||
// Set the Proxy User Credentials in miCASA
|
// Save the credentials if we have access to them
|
||||||
cmd = sformat("KEYVALUE=\"%1\" CASAcli -s -u %2 -n %3 -k CN", proxy_username, uid, realmId);
|
if (proxy_username != "")
|
||||||
ret = (map) SCR::Execute(.target.bash_output, cmd);
|
{
|
||||||
exit = ret["exit"]:-1;
|
// Set the Proxy User Credentials in miCASA
|
||||||
if (exit != 0)
|
cmd = sformat("KEYVALUE=\"%1\" CASAcli -s -u %2 -n %3 -k CN", proxy_username, uid, realmId);
|
||||||
y2error("Failed to set Proxy Username in miCASA for realm " + 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);
|
cmd = sformat("KEYVALUE=\"%1\" CASAcli -s -u %2 -n \"%3\" -k Password", proxy_password, uid, realmId);
|
||||||
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 set Proxy Password in miCASA for realm " + realmId);
|
y2error("Failed to set Proxy Password in miCASA for realm " + realmId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user