Projects
Kolab:3.4
cyrus-imapd
cyrus-deliver-wrapper.c
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cyrus-deliver-wrapper.c of Package cyrus-imapd (Revision 12)
Currently displaying revision
12
,
Show latest
/* * Wrapper for cyrus 'deliver' to allow anyone to run it - * I hope this is secure! Should be setgid mail. */ #include <stdio.h> #include <unistd.h> #include <pwd.h> #include <sys/types.h> #include <sysexits.h> #ifndef LIBEXECDIR #define LIBEXECDIR "/usr/lib/cyrus-imapd" #endif int main(int argc, char *argv[]) { char *const envp[] = { NULL }; struct passwd *ent = getpwuid(getuid()); const char *uname = (ent && ent->pw_name && ent->pw_name[0]) ? ent->pw_name : "anonymous"; if (argc != 2) { fprintf(stderr, "Usage: %s mailbox\n", argv[0]); return EX_USAGE; } execle(LIBEXECDIR"/deliver", "deliver", "-e", "-a", uname, "-m", argv[1], NULL, envp); perror("exec "LIBEXECDIR"/deliver"); return EX_OSERR; }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.