diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-09-07 06:02:39 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-09-07 06:02:39 +0000 |
commit | e127e2ca517616346ffaf278001ed3482e64924f (patch) | |
tree | af95f506cc36561eef6204a1bd915bc0467cdc24 | |
parent | ee335c07b1dbfb174c3d3dfd7b45b1e3624527f0 (diff) | |
download | busybox-w32-e127e2ca517616346ffaf278001ed3482e64924f.tar.gz busybox-w32-e127e2ca517616346ffaf278001ed3482e64924f.tar.bz2 busybox-w32-e127e2ca517616346ffaf278001ed3482e64924f.zip |
Add CONFIG_FEATURE_SYSLOG which controls whether
bb_xx_msg will ever try to send output to syslog.
Add "select CONFIG_FEATURE_SYSLOG" to relevant applets.
This allows to omit syslog code if we do not have
any syslog-capable applets in the build.
git-svn-id: svn://busybox.net/trunk/busybox@16063 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | Config.in | 7 | ||||
-rw-r--r-- | init/Config.in | 1 | ||||
-rw-r--r-- | libbb/verror_msg.c | 2 | ||||
-rw-r--r-- | libbb/vinfo_msg.c | 2 | ||||
-rw-r--r-- | loginutils/Config.in | 5 | ||||
-rw-r--r-- | miscutils/Config.in | 2 | ||||
-rw-r--r-- | networking/Config.in | 5 | ||||
-rw-r--r-- | networking/udhcp/Config.in | 12 | ||||
-rw-r--r-- | sysklogd/Config.in | 2 |
9 files changed, 26 insertions, 12 deletions
@@ -150,6 +150,13 @@ config CONFIG_FEATURE_SUID | |||
150 | are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs, | 150 | are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs, |
151 | and vlock. | 151 | and vlock. |
152 | 152 | ||
153 | config CONFIG_FEATURE_SYSLOG | ||
154 | bool "Support for syslog" | ||
155 | default n | ||
156 | help | ||
157 | This option is auto-selected when you select any applet which may | ||
158 | send its output to syslog. You do not need to select it manually. | ||
159 | |||
153 | config CONFIG_FEATURE_SUID_CONFIG | 160 | config CONFIG_FEATURE_SUID_CONFIG |
154 | bool "Runtime SUID/SGID configuration via /etc/busybox.conf" | 161 | bool "Runtime SUID/SGID configuration via /etc/busybox.conf" |
155 | default n if CONFIG_FEATURE_SUID | 162 | default n if CONFIG_FEATURE_SUID |
diff --git a/init/Config.in b/init/Config.in index 8b9179124..2a39d50e5 100644 --- a/init/Config.in +++ b/init/Config.in | |||
@@ -8,6 +8,7 @@ menu "Init Utilities" | |||
8 | config CONFIG_INIT | 8 | config CONFIG_INIT |
9 | bool "init" | 9 | bool "init" |
10 | default n | 10 | default n |
11 | select CONFIG_FEATURE_SYSLOG | ||
11 | help | 12 | help |
12 | init is the first program run when the system boots. | 13 | init is the first program run when the system boots. |
13 | 14 | ||
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c index 237547d1d..be206e477 100644 --- a/libbb/verror_msg.c +++ b/libbb/verror_msg.c | |||
@@ -32,7 +32,7 @@ void bb_verror_msg(const char *s, va_list p, const char* strerr) | |||
32 | else | 32 | else |
33 | fprintf(stderr, ": %s\n", strerr); | 33 | fprintf(stderr, ": %s\n", strerr); |
34 | } | 34 | } |
35 | if (logmode & LOGMODE_SYSLOG) { | 35 | if (ENABLE_FEATURE_SYSLOG & (logmode & LOGMODE_SYSLOG)) { |
36 | if (!strerr) | 36 | if (!strerr) |
37 | vsyslog(LOG_ERR, s, p2); | 37 | vsyslog(LOG_ERR, s, p2); |
38 | else { | 38 | else { |
diff --git a/libbb/vinfo_msg.c b/libbb/vinfo_msg.c index e8776e5f4..84825bc76 100644 --- a/libbb/vinfo_msg.c +++ b/libbb/vinfo_msg.c | |||
@@ -24,7 +24,7 @@ void bb_vinfo_msg(const char *s, va_list p) | |||
24 | vprintf(s, p); | 24 | vprintf(s, p); |
25 | putchar('\n'); | 25 | putchar('\n'); |
26 | } | 26 | } |
27 | if (logmode & LOGMODE_SYSLOG) | 27 | if (ENABLE_FEATURE_SYSLOG & (logmode & LOGMODE_SYSLOG)) |
28 | vsyslog(LOG_INFO, s, p2); | 28 | vsyslog(LOG_INFO, s, p2); |
29 | va_end(p2); | 29 | va_end(p2); |
30 | } | 30 | } |
diff --git a/loginutils/Config.in b/loginutils/Config.in index 99265519e..71e0a3ae1 100644 --- a/loginutils/Config.in +++ b/loginutils/Config.in | |||
@@ -80,6 +80,7 @@ config CONFIG_DELUSER | |||
80 | config CONFIG_GETTY | 80 | config CONFIG_GETTY |
81 | bool "getty" | 81 | bool "getty" |
82 | default n | 82 | default n |
83 | select CONFIG_FEATURE_SYSLOG | ||
83 | help | 84 | help |
84 | getty lets you log in on a tty, it is normally invoked by init. | 85 | getty lets you log in on a tty, it is normally invoked by init. |
85 | 86 | ||
@@ -103,6 +104,7 @@ config CONFIG_LOGIN | |||
103 | bool "login" | 104 | bool "login" |
104 | default n | 105 | default n |
105 | select CONFIG_FEATURE_SUID | 106 | select CONFIG_FEATURE_SUID |
107 | select CONFIG_FEATURE_SYSLOG | ||
106 | help | 108 | help |
107 | login is used when signing onto a system. | 109 | login is used when signing onto a system. |
108 | 110 | ||
@@ -122,6 +124,7 @@ config CONFIG_PASSWD | |||
122 | bool "passwd" | 124 | bool "passwd" |
123 | default n | 125 | default n |
124 | select CONFIG_FEATURE_SUID | 126 | select CONFIG_FEATURE_SUID |
127 | select CONFIG_FEATURE_SYSLOG | ||
125 | help | 128 | help |
126 | passwd changes passwords for user and group accounts. A normal user | 129 | passwd changes passwords for user and group accounts. A normal user |
127 | may only change the password for his/her own account, the super user | 130 | may only change the password for his/her own account, the super user |
@@ -135,6 +138,7 @@ config CONFIG_SU | |||
135 | bool "su" | 138 | bool "su" |
136 | default n | 139 | default n |
137 | select CONFIG_FEATURE_SUID | 140 | select CONFIG_FEATURE_SUID |
141 | select CONFIG_FEATURE_SYSLOG | ||
138 | help | 142 | help |
139 | su is used to become another user during a login session. | 143 | su is used to become another user during a login session. |
140 | Invoked without a username, su defaults to becoming the super user. | 144 | Invoked without a username, su defaults to becoming the super user. |
@@ -152,6 +156,7 @@ config CONFIG_SU_SYSLOG | |||
152 | config CONFIG_SULOGIN | 156 | config CONFIG_SULOGIN |
153 | bool "sulogin" | 157 | bool "sulogin" |
154 | default n | 158 | default n |
159 | select CONFIG_FEATURE_SYSLOG | ||
155 | help | 160 | help |
156 | sulogin is invoked when the system goes into single user | 161 | sulogin is invoked when the system goes into single user |
157 | mode (this is done through an entry in inittab). | 162 | mode (this is done through an entry in inittab). |
diff --git a/miscutils/Config.in b/miscutils/Config.in index 9ad342151..dc3da6f9a 100644 --- a/miscutils/Config.in +++ b/miscutils/Config.in | |||
@@ -23,6 +23,7 @@ config CONFIG_CROND | |||
23 | bool "crond" | 23 | bool "crond" |
24 | default n | 24 | default n |
25 | select CONFIG_FEATURE_SUID | 25 | select CONFIG_FEATURE_SUID |
26 | select CONFIG_FEATURE_SYSLOG | ||
26 | help | 27 | help |
27 | Crond is a background daemon that parses individual crontab | 28 | Crond is a background daemon that parses individual crontab |
28 | files and executes commands on behalf of the users in question. | 29 | files and executes commands on behalf of the users in question. |
@@ -66,6 +67,7 @@ config CONFIG_DC | |||
66 | config CONFIG_DEVFSD | 67 | config CONFIG_DEVFSD |
67 | bool "devfsd (obsolete)" | 68 | bool "devfsd (obsolete)" |
68 | default n | 69 | default n |
70 | select CONFIG_FEATURE_SYSLOG | ||
69 | help | 71 | help |
70 | This is deprecated, and will be removed at the end of 2008. | 72 | This is deprecated, and will be removed at the end of 2008. |
71 | 73 | ||
diff --git a/networking/Config.in b/networking/Config.in index e5eb11caa..2dff021a8 100644 --- a/networking/Config.in +++ b/networking/Config.in | |||
@@ -33,6 +33,7 @@ config CONFIG_ETHER_WAKE | |||
33 | config CONFIG_FAKEIDENTD | 33 | config CONFIG_FAKEIDENTD |
34 | bool "fakeidentd" | 34 | bool "fakeidentd" |
35 | default n | 35 | default n |
36 | select CONFIG_FEATURE_SYSLOG | ||
36 | help | 37 | help |
37 | fakeidentd listens on the ident port and returns a predefined | 38 | fakeidentd listens on the ident port and returns a predefined |
38 | fake value on any query. | 39 | fake value on any query. |
@@ -288,6 +289,7 @@ config CONFIG_FEATURE_IFUPDOWN_MAPPING | |||
288 | config CONFIG_INETD | 289 | config CONFIG_INETD |
289 | bool "inetd" | 290 | bool "inetd" |
290 | default n | 291 | default n |
292 | select CONFIG_FEATURE_SYSLOG | ||
291 | help | 293 | help |
292 | Internet superserver daemon | 294 | Internet superserver daemon |
293 | 295 | ||
@@ -428,6 +430,7 @@ config CONFIG_FEATURE_IPCALC_LONG_OPTIONS | |||
428 | config CONFIG_NAMEIF | 430 | config CONFIG_NAMEIF |
429 | bool "nameif" | 431 | bool "nameif" |
430 | default n | 432 | default n |
433 | select CONFIG_FEATURE_SYSLOG | ||
431 | help | 434 | help |
432 | nameif is used to rename network interface by its MAC address. | 435 | nameif is used to rename network interface by its MAC address. |
433 | Renamed interfaces MUST be in the down state. | 436 | Renamed interfaces MUST be in the down state. |
@@ -539,6 +542,7 @@ config CONFIG_FEATURE_TELNET_AUTOLOGIN | |||
539 | config CONFIG_TELNETD | 542 | config CONFIG_TELNETD |
540 | bool "telnetd" | 543 | bool "telnetd" |
541 | default n | 544 | default n |
545 | select CONFIG_FEATURE_SYSLOG | ||
542 | help | 546 | help |
543 | A daemon for the TELNET protocol, allowing you to log onto the host | 547 | A daemon for the TELNET protocol, allowing you to log onto the host |
544 | running the daemon. Please keep in mind that the TELNET protocol | 548 | running the daemon. Please keep in mind that the TELNET protocol |
@@ -701,6 +705,7 @@ config CONFIG_FEATURE_WGET_LONG_OPTIONS | |||
701 | config CONFIG_ZCIP | 705 | config CONFIG_ZCIP |
702 | bool "zcip" | 706 | bool "zcip" |
703 | default n | 707 | default n |
708 | select CONFIG_FEATURE_SYSLOG | ||
704 | help | 709 | help |
705 | ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927. | 710 | ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927. |
706 | It's a daemon that allocates and defends a dynamically assigned | 711 | It's a daemon that allocates and defends a dynamically assigned |
diff --git a/networking/udhcp/Config.in b/networking/udhcp/Config.in index 01b2902ee..773293744 100644 --- a/networking/udhcp/Config.in +++ b/networking/udhcp/Config.in | |||
@@ -6,6 +6,7 @@ | |||
6 | config CONFIG_APP_UDHCPD | 6 | config CONFIG_APP_UDHCPD |
7 | bool "udhcp Server (udhcpd)" | 7 | bool "udhcp Server (udhcpd)" |
8 | default n | 8 | default n |
9 | select CONFIG_FEATURE_SYSLOG | ||
9 | help | 10 | help |
10 | uDHCPd is a DHCP server geared primarily toward embedded systems, | 11 | uDHCPd is a DHCP server geared primarily toward embedded systems, |
11 | while striving to be fully functional and RFC compliant. | 12 | while striving to be fully functional and RFC compliant. |
@@ -26,6 +27,7 @@ config CONFIG_APP_DUMPLEASES | |||
26 | config CONFIG_APP_UDHCPC | 27 | config CONFIG_APP_UDHCPC |
27 | bool "udhcp Client (udhcpc)" | 28 | bool "udhcp Client (udhcpc)" |
28 | default n | 29 | default n |
30 | select CONFIG_FEATURE_SYSLOG | ||
29 | help | 31 | help |
30 | uDHCPc is a DHCP client geared primarily toward embedded systems, | 32 | uDHCPc is a DHCP client geared primarily toward embedded systems, |
31 | while striving to be fully functional and RFC compliant. | 33 | while striving to be fully functional and RFC compliant. |
@@ -35,16 +37,6 @@ config CONFIG_APP_UDHCPC | |||
35 | 37 | ||
36 | See http://udhcp.busybox.net for further details. | 38 | See http://udhcp.busybox.net for further details. |
37 | 39 | ||
38 | config CONFIG_FEATURE_UDHCP_SYSLOG | ||
39 | bool "Log udhcp messages to syslog (instead of stdout)" | ||
40 | default n | ||
41 | depends on CONFIG_APP_UDHCPD || CONFIG_APP_UDHCPC | ||
42 | help | ||
43 | If selected, udhcpd will log all its messages to syslog, otherwise, | ||
44 | it will attempt to log them to stdout. | ||
45 | |||
46 | See http://udhcp.busybox.net for further details. | ||
47 | |||
48 | config CONFIG_FEATURE_UDHCP_DEBUG | 40 | config CONFIG_FEATURE_UDHCP_DEBUG |
49 | bool "Compile udhcp with noisy debugging messages" | 41 | bool "Compile udhcp with noisy debugging messages" |
50 | default n | 42 | default n |
diff --git a/sysklogd/Config.in b/sysklogd/Config.in index 05983b68d..399315208 100644 --- a/sysklogd/Config.in +++ b/sysklogd/Config.in | |||
@@ -89,6 +89,7 @@ config CONFIG_KLOGD | |||
89 | bool "klogd" | 89 | bool "klogd" |
90 | default n | 90 | default n |
91 | depends on CONFIG_SYSLOGD | 91 | depends on CONFIG_SYSLOGD |
92 | select CONFIG_FEATURE_SYSLOG | ||
92 | help | 93 | help |
93 | klogd is a utility which intercepts and logs all | 94 | klogd is a utility which intercepts and logs all |
94 | messages from the Linux kernel and sends the messages | 95 | messages from the Linux kernel and sends the messages |
@@ -99,6 +100,7 @@ config CONFIG_KLOGD | |||
99 | config CONFIG_LOGGER | 100 | config CONFIG_LOGGER |
100 | bool "logger" | 101 | bool "logger" |
101 | default n | 102 | default n |
103 | select CONFIG_FEATURE_SYSLOG | ||
102 | help | 104 | help |
103 | The logger utility allows you to send arbitrary text | 105 | The logger utility allows you to send arbitrary text |
104 | messages to the system log (i.e. the 'syslogd' utility) so | 106 | messages to the system log (i.e. the 'syslogd' utility) so |