ACL: Fix the password initialization when ACL entry is created, fixes #2252

This commit is contained in:
Jaroslav Kysela 2014-09-10 23:47:59 +02:00
parent 78de846639
commit 26c778df63

View file

@ -586,6 +586,7 @@ access_entry_create(const char *uuid, htsmsg_t *conf)
{
access_ipmask_t *ai;
access_entry_t *ae, *ae2;
const char *s;
lock_assert(&global_lock);
@ -602,6 +603,9 @@ access_entry_create(const char *uuid, htsmsg_t *conf)
if (conf) {
idnode_load(&ae->ae_id, conf);
/* note password has PO_NOSAVE, thus it must be set manually */
if ((s = htsmsg_get_str(conf, "password")) != NULL)
access_entry_class_password_set(ae, s);
access_entry_update_rights(ae);
TAILQ_FOREACH(ae2, &access_entries, ae_link)
if (ae->ae_index < ae2->ae_index)