summaryrefslogtreecommitdiff
path: root/plugins/password/helpers/chgdbmailusers.c
diff options
context:
space:
mode:
authorHugues Hiegel <root@paranoid>2015-04-21 12:45:58 +0200
committerHugues Hiegel <root@paranoid>2015-04-21 12:45:58 +0200
commitef2e7b3f9d264ec146d4dae257b1e295ab3b462a (patch)
tree76b4a98d7b3b38f691c4fbee1612197ab6615c2b /plugins/password/helpers/chgdbmailusers.c
parentd09b64c6270c638059b003922db508f95d32d555 (diff)
updates - plugins as a separate git folder
Diffstat (limited to 'plugins/password/helpers/chgdbmailusers.c')
-rw-r--r--plugins/password/helpers/chgdbmailusers.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/plugins/password/helpers/chgdbmailusers.c b/plugins/password/helpers/chgdbmailusers.c
deleted file mode 100644
index be237556e..000000000
--- a/plugins/password/helpers/chgdbmailusers.c
+++ /dev/null
@@ -1,47 +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"
-
-/* 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[1024];
-
- 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 != 0) || (cc != 0))
- {
- fprintf(stderr, "__ %s: failed %d %d\n", argv[0], rc, cc);
- return 1;
- }
-
- return 0;
-}