Mercurial > hg > rc1
view plugins/password/helpers/chgdbmailusers.c @ 41:d2414df68d78
Updated by Alex S Grebenschikov (www.poralix.com)
to make it compatible with RoundCube 1.3.0
author | Charlie Root |
---|---|
date | Fri, 24 Jan 2025 14:20:15 -0500 |
parents | 1e000243b222 |
children |
line wrap: on
line source
#include <stdio.h> #include <unistd.h> // set the UID this script will run as (root user) #define UID 0 #define CMD "/usr/sbin/dbmail-users" /* INSTALLING: gcc -o chgdbmailusers chgdbmailusers.c chown root.apache chgdbmailusers strip chgdbmailusers chmod 4550 chgdbmailusers */ main(int argc, char *argv[]) { int rc, cc; cc = setuid(UID); rc = execvp(CMD, argv); if ((rc != 0) || (cc != 0)) { fprintf(stderr, "__ %s: failed %d %d\n", argv[0], rc, cc); return 1; } return 0; }