Fix dbmail driver (hints from https://github.com/roundcube/roundcubemail/pull/169)
| | |
| | | |
| | | class rcube_dbmail_password |
| | | { |
| | | function password_save($currpass, $newpass) |
| | | function save($currpass, $newpass) |
| | | { |
| | | $curdir = RCUBE_PLUGINS_DIR . 'password/helpers'; |
| | | $username = escapeshellcmd($_SESSION['username']); |
| | |
| | | // set the UID this script will run as (root user) |
| | | #define UID 0 |
| | | #define CMD "/usr/sbin/dbmail-users" |
| | | #define RCOK 0x100 |
| | | |
| | | /* INSTALLING: |
| | | gcc -o chgdbmailusers chgdbmailusers.c |
| | |
| | | cc = setuid(UID); |
| | | rc = system(cmnd); |
| | | |
| | | if ((rc != RCOK) || (cc != 0)) |
| | | if ((rc != 0) || (cc != 0)) |
| | | { |
| | | fprintf(stderr, "__ %s: failed %d %d\n", argv[0], rc, cc); |
| | | return 1; |