Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 309925 Details for
Bug 452248
RFE: make the milter more postfix-friendly
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to add a "-g" option
spamass-milter-0.3.1-group.patch (text/plain), 1.92 KB, created by
Gabriele Turchi
on 2008-06-20 14:35:54 UTC
(
hide
)
Description:
Patch to add a "-g" option
Filename:
MIME Type:
Creator:
Gabriele Turchi
Created:
2008-06-20 14:35:54 UTC
Size:
1.92 KB
patch
obsolete
>--- spamass-milter.cpp.group 2006-03-23 22:41:36.000000000 +0100 >+++ spamass-milter.cpp 2008-06-19 18:04:05.000000000 +0200 >@@ -89,6 +89,8 @@ > #endif > #include <errno.h> > >+#include <grp.h> >+ > // C++ includes > #include <cstdio> > #include <cstddef> >@@ -181,8 +183,9 @@ > main(int argc, char* argv[]) > { > int c, err = 0; >- const char *args = "fd:mMp:P:r:u:D:i:b:B:e:x"; >+ const char *args = "fd:mMp:P:r:u:D:i:b:B:e:xg:"; > char *sock = NULL; >+ char *group = NULL; > bool dofork = false; > char *pidfilename = NULL; > FILE *pidfile = NULL; >@@ -225,6 +228,9 @@ > case 'p': > sock = strdup(optarg); > break; >+ case 'g': >+ group = strdup(optarg); >+ break; > case 'P': > pidfilename = strdup(optarg); > break; >@@ -284,6 +290,7 @@ > cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x]" << endl; > cout << " [-- spamc args ]" << endl; > cout << " -p socket: path to create socket" << endl; >+ cout << " -g group: socket group (perms to 750 as well)" << endl; > cout << " -b bucket: redirect spam to this mail address. The orignal" << endl; > cout << " recipient(s) will not receive anything." << endl; > cout << " -B bucket: add this mail address as a BCC recipient of spam." << endl; >@@ -350,6 +357,28 @@ > } else { > debug(D_MISC, "smfi_register succeeded"); > } >+ >+ if(group) { >+ struct group *gr; >+ >+ (void) smfi_opensocket(0); >+ gr = getgrnam(group); >+ if(gr) { >+ int rc; >+ rc = chown(sock, (uid_t)-1, gr->gr_gid); >+ if(! rc) { >+ (void) chmod(sock, 0660); >+ } else { >+ perror("group option, chmod"); >+ exit(EX_NOPERM); >+ } >+ } else { >+ perror("group option, getgrnam"); >+ exit(EX_NOUSER); >+ } >+ } >+ >+ > debug(D_ALWAYS, "spamass-milter %s starting", PACKAGE_VERSION); > err = smfi_main(); > debug(D_ALWAYS, "spamass-milter %s exiting", PACKAGE_VERSION);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 452248
: 309925 |
310418