Using a fixed string could allow for abuse by anyone who has access to /tmp.
One could place a symbolic link to any file to cause it to be overwritten
when alternc.install is run.
The current behaviour of protecting a folder only modifies adds the
relevant .htaccess configuration lines if the file doesn't already
exist. In the case that it exists, no change is made and it appears to
"not work" for users.
This commit improves the feedbackup to users about what is happening,
and gives them the necessary information to modify their custom
.htaccess file with the appropriate configuration lines.
Without this, when a mailbox is deleted, the entry in dovecot_quota
persists and the user's see the that the mailbox continues to take
space on the information page.
The procedure can use a single query instead of a 1 + N queries, where
N is the number of tables on the server.
There is a minor side-effect in the result: databases with no tables
will not be listed in the output. Before, they would be output but
with an empty size value.
close#452
New installations haven't had this unique key since 2014
(d9e24d9703) and only old
installations passing through 3.1.0~a would have had it
added.
Given that the unique key constraint was never dropped during
an AlternC upgrade, I think it should just be dropped here.
Re-creating is problematic when merged with other recent changes
because the length of both the key and column size are longer
than what MySQL/MariaDB support.
When a user has more than m_cron::MAX_SOCKETS actions to run when the
cron script is invoked, it uses a rolling window while running the
batch execution in CURL. The followin warning happens because the
url key isn't being used when getting the information out of the array.
When they both watch the same directory, when a file is touched - eg,
/run/alternc/incron/inotify_do_action.lock both scripts are started
running in children of the top-level /usr/sbin/incrond script. When
those scripts finish, one or the other tends to start watching for all
the incron tables again (created more and more children each time).
Maybe it's a bug in incron.
Test:
* Check number of running processes with ps faux | grep incron
* Do an action, eg. chmod a folder in the web interace
* Re-check the number of running processes, they should stay the same
not increase
While working on #424, I discovered that actions that were run were unable
to record their run state into the database because the return code value
being passed to m_action::finish was a string and not an integer.
I added a shim to try to normalize the data passed onwards to m_action::finish,
although in the long term I think a proper cleanup of the cases should be done.
This should help with #424 by switching the watched directories to a
sub-directory of /run/alternc. There are many other scripts create and
handle files in the /run/alternc that were causing incrond to start up
quite often.
Users made in the Matomo interface and given an access to a site
that's in AlternC show up without this restriction. When that happens,
the user is no longer able to modify permissions for any of the Matomo
users from their AlternC account.
If the apparmor configuration file is there, an extra include will be added
and the install/app/usr.sbin.named-alternc file deployed to the apparmor local
configuration directory.
This allows bind to work with AlternC and apparmor enabled out of the box on
Debian Buster.
Fixes#382
The maxlength attribute will silently drop all characters after the
indicated limit. Users will not have feedback that their password
is (now) wrong.
There seems to a password policy that is actively checked, and may be
defined by the admin (default: 64 character limit).