Fixed password conversion wiht several top groups

SVN revision: 2313
This commit is contained in:
2010-08-02 10:39:11 +00:00
parent ee380ba588
commit 36fcbd0c04
+5 -1
View File
@@ -24465,7 +24465,8 @@ BOOL convert_password_encoding(LOGBOOK * lbs)
for (i = 0; i < mxml_get_number_of_children(node); i++) {
sprintf(str, "/list/user[%d]/password", i + 1);
pwd = mxml_find_node(lbs->pwd_xml_tree, str);
if (pwd) {
if (pwd && mxml_get_value(pwd)) {
strlcpy(str, mxml_get_value(pwd), sizeof(str));
/* assume base64 encoding, might be wrong if HAVE_CRYPT was used */
@@ -24579,6 +24580,9 @@ int load_password_files()
}
}
if (lb_list[i].top_group[0])
setcfg_topgroup(lb_list[i].top_group);
/* convert old password encoding into new format */
convert_password_encoding(&lb_list[i]);
}