diff options
-rw-r--r-- | doc/mpd.conf.5 | 5 | ||||
-rw-r--r-- | doc/mpdconf.example | 8 | ||||
-rw-r--r-- | src/log.c | 6 |
3 files changed, 12 insertions, 7 deletions
diff --git a/doc/mpd.conf.5 b/doc/mpd.conf.5 index 31b105c8d..ff24fd82a 100644 --- a/doc/mpd.conf.5 +++ b/doc/mpd.conf.5 @@ -66,7 +66,10 @@ the "kill" command. When mpd is restarted, it will read the state file and restore the state of mpd (including the playlist). .TP .B user <username> -This specifies the user that mpd will run as, if set. +This specifies the user that MPD will run as, if set. MPD should +never run as root, and you may use this option to make MPD change its +user id after initialization. Do not use this option if you start MPD +as an unprivileged user. .TP .B bind_to_address <ip address or hostname or any> This specifies which address mpd binds to and listens on. Multiple diff --git a/doc/mpdconf.example b/doc/mpdconf.example index 80e692f3c..ccbb00395 100644 --- a/doc/mpdconf.example +++ b/doc/mpdconf.example @@ -43,8 +43,10 @@ error_file "~/.mpd/error-log" # General music daemon options ################################################ # -# If the user option is set, MPD will attempt to drop root privileges when it -# begins. Otherwise, MPD will run as root, which is not recommended. +# This specifies the user that MPD will run as, if set. MPD should +# never run as root, and you may use this option to make MPD change +# its user id after initialization. Do not use this option if you +# start MPD as an unprivileged user. # #user "nobody" # @@ -312,4 +314,4 @@ error_file "~/.mpd/error-log" # #id3v1_encoding "ISO-8859-1" # -###############################################################################
\ No newline at end of file +############################################################################### @@ -33,12 +33,12 @@ #include <pthread.h> #include <glib.h> -#define LOG_LEVEL_SECURE G_LOG_LEVEL_MESSAGE +#define LOG_LEVEL_SECURE G_LOG_LEVEL_INFO #define LOG_DATE_BUF_SIZE 16 #define LOG_DATE_LEN (LOG_DATE_BUF_SIZE - 1) -static unsigned int log_threshold = G_LOG_LEVEL_INFO; +static unsigned int log_threshold = G_LOG_LEVEL_MESSAGE; static const char *log_charset; @@ -116,7 +116,7 @@ void initLog(bool verbose) if (!(param = getConfigParam(CONF_LOG_LEVEL))) return; if (0 == strcmp(param->value, "default")) { - log_threshold = G_LOG_LEVEL_INFO; + log_threshold = G_LOG_LEVEL_MESSAGE; } else if (0 == strcmp(param->value, "secure")) { log_threshold = LOG_LEVEL_SECURE; } else if (0 == strcmp(param->value, "verbose")) { |