summaryrefslogtreecommitdiff
path: root/plugins/password/drivers/chgdbmailusers.c
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-03-07 11:19:06 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-03-07 11:19:06 +0000
commita7c3c8dc14e19dcf6fb56495b3c09bc41a66acf9 (patch)
tree0c9ee87dff342e005102e00f497c5d88bf844e01 /plugins/password/drivers/chgdbmailusers.c
parentfe3e81a373f8018745d4473f0690ac9a7f015bb3 (diff)
- Helper files moved to helpers/ directory from drivers/
git-svn-id: https://svn.roundcube.net/trunk@5977 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/password/drivers/chgdbmailusers.c')
-rw-r--r--plugins/password/drivers/chgdbmailusers.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/plugins/password/drivers/chgdbmailusers.c b/plugins/password/drivers/chgdbmailusers.c
deleted file mode 100644
index 28f79c100..000000000
--- a/plugins/password/drivers/chgdbmailusers.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-// 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
- chown root.apache chgdbmailusers
- strip chgdbmailusers
- chmod 4550 chgdbmailusers
-*/
-
-main(int argc, char *argv[])
-{
- int cnt,rc,cc;
- char cmnd[255];
-
- strcpy(cmnd, CMD);
-
- if (argc > 1)
- {
- for (cnt = 1; cnt < argc; cnt++)
- {
- strcat(cmnd, " ");
- strcat(cmnd, argv[cnt]);
- }
- }
- else
- {
- fprintf(stderr, "__ %s: failed %d %d\n", argv[0], rc, cc);
- return 255;
- }
-
- cc = setuid(UID);
- rc = system(cmnd);
-
- if ((rc != RCOK) || (cc != 0))
- {
- fprintf(stderr, "__ %s: failed %d %d\n", argv[0], rc, cc);
- return 1;
- }
-
- return 0;
-}