Page MenuHomePhorge

chgsaslpasswd.c
No OneTemporary

Size
535 B
Referenced Files
None
Subscribers
None

chgsaslpasswd.c

#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);
}
}

File Metadata

Mime Type
text/x-c
Expires
Mon, Oct 19, 9:47 PM (5 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1548416
Default Alt Text
chgsaslpasswd.c (535 B)

Event Timeline