Commit d46567f7 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

chgsaslpasswd should run as a root user to be able to modify /var/lib/sasl/sasldb2

parent 6b01fd20
......@@ -7,8 +7,9 @@ all: httpd-conf
install -v -m755 -o apache -g apache -d /var/lib/roundcube
@echo "$$HTTPD_CONF" > /etc/httpd/conf/DirectoryIndex.conf
chown -v -R apache:apache /srv/www
patch -Np1 -d /srv/www < roundcubemail-1.4.8-chgsaslpasswd_fix.patch
cd /srv/www/plugins/password/helpers && gcc -o chgsaslpasswd chgsaslpasswd.c
chown cyrus.apache /srv/www/plugins/password/helpers/chgsaslpasswd
chown root.apache /srv/www/plugins/password/helpers/chgsaslpasswd
chmod 4550 /srv/www/plugins/password/helpers/chgsaslpasswd
httpd-conf:
......
diff -uNr roundcubemail-1.4.8/plugins/password/helpers/chgsaslpasswd.c roundcubemail-1.4.8-chgsaslpasswd_fix/plugins/password/helpers/chgsaslpasswd.c
--- roundcubemail-1.4.8/plugins/password/helpers/chgsaslpasswd.c 2020-08-11 04:34:57.000000000 +0930
+++ roundcubemail-1.4.8-chgsaslpasswd_fix/plugins/password/helpers/chgsaslpasswd.c 2021-01-27 13:19:11.626311177 +1030
@@ -1,8 +1,8 @@
#include <stdio.h>
#include <unistd.h>
-// set the UID this script will run as (cyrus user)
-#define UID 96
+// set the UID this script will run as (root user)
+#define UID 0
// set the path to saslpasswd or saslpasswd2
#define CMD "/usr/sbin/saslpasswd2"
diff -uNr roundcubemail-1.4.8/public_html/plugins/password/helpers/chgsaslpasswd.c roundcubemail-1.4.8-chgsaslpasswd_fix/public_html/plugins/password/helpers/chgsaslpasswd.c
--- roundcubemail-1.4.8/public_html/plugins/password/helpers/chgsaslpasswd.c 2020-08-11 04:34:57.000000000 +0930
+++ roundcubemail-1.4.8-chgsaslpasswd_fix/public_html/plugins/password/helpers/chgsaslpasswd.c 2021-01-27 13:19:11.626311177 +1030
@@ -1,8 +1,8 @@
#include <stdio.h>
#include <unistd.h>
-// set the UID this script will run as (cyrus user)
-#define UID 96
+// set the UID this script will run as (root user)
+#define UID 0
// set the path to saslpasswd or saslpasswd2
#define CMD "/usr/sbin/saslpasswd2"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment