diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-06-30 17:23:39 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-06-30 17:23:39 +0000 |
| commit | 4c8ece5bde62cd30ad976020444f324a738179e6 (patch) | |
| tree | 0530758cc959b99bea67dc69efe40497c24a7bc4 /roundcubemail/plugins/password/drivers | |
| parent | cf876a73fbd2108a4d55c185dbf7df780d2eb4f2 (diff) | |
Add SASL password wrapper program + update SASL instructions in README
git-svn-id: https://svn.roundcube.net/trunk@2688 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/plugins/password/drivers')
| -rw-r--r-- | roundcubemail/plugins/password/drivers/chgsaslpasswd.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/roundcubemail/plugins/password/drivers/chgsaslpasswd.c b/roundcubemail/plugins/password/drivers/chgsaslpasswd.c new file mode 100644 index 000000000..17e20c67f --- /dev/null +++ b/roundcubemail/plugins/password/drivers/chgsaslpasswd.c @@ -0,0 +1,27 @@ +#include <stdio.h> +#include <unistd.h> + +// set the UID this script will run as (cyrus user) +#define UID 96 +// set the path to saslpasswd or saslpasswd2 +#define CMD "/usr/sbin/saslpasswd2" + +/* INSTALLING: + gcc -o chgsaslpasswd chgsaslpasswd.c + chown root.apache chgsaslpasswd + strip chgsaslpasswd + chmod 4550 chgsaslpasswd +*/ + +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); + exit(1); + } +} |
