Last change
on this file was 10612, checked in by rick, 13 years ago |
Make port building whole bunch more stupid:
1) Bundle ports in the tree itself, instead of global shared banch.
2) Copy the local ports just in the /usr/ports tree to allow playing around
with just the ordenary tools.
|
File size:
963 bytes
|
Line | |
---|
1 | --- tools/duende.c.orig 2011-11-12 09:25:42.000000000 +0100
|
---|
2 | +++ tools/duende.c 2012-02-11 01:32:42.000000000 +0100
|
---|
3 | @@ -35,6 +35,7 @@
|
---|
4 | #include <signal.h>
|
---|
5 | #include <stdio.h>
|
---|
6 | #include <stdlib.h>
|
---|
7 | +#include <string.h>
|
---|
8 | #include <syslog.h>
|
---|
9 | #include <sys/time.h>
|
---|
10 | #include <sys/types.h>
|
---|
11 | @@ -66,9 +67,20 @@
|
---|
12 | /* We can't use our signal handlers because fgets is blocking */
|
---|
13 | signal(SIGTERM,SIG_DFL);
|
---|
14 | signal(SIGHUP,SIG_DFL);
|
---|
15 | +
|
---|
16 | + /* Prefix MaraDNS syslog messages with ident of "maradns:"
|
---|
17 | + instead of "/usr/local/sbin/maradns:" */
|
---|
18 | + char *needle, *ident;
|
---|
19 | + needle = strrchr(name,'/');
|
---|
20 | + /* needle found and not at the end of string */
|
---|
21 | + if (needle && *(needle + 1) != '\0') {
|
---|
22 | + ident = needle + 1;
|
---|
23 | + } else {
|
---|
24 | + ident = name;
|
---|
25 | + }
|
---|
26 |
|
---|
27 | /* Open up the sys log */
|
---|
28 | - openlog(name,0,LOG_DAEMON);
|
---|
29 | + openlog(ident,0,LOG_DAEMON);
|
---|
30 |
|
---|
31 | /* Drop all privileges */
|
---|
32 | if(chdir(DUENDE_CHROOT_DIR) != 0) {
|
---|
Note:
See
TracBrowser
for help on using the repository browser.