Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
92a4bf44
Commit
92a4bf44
authored
Dec 29, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.18.x'
parents
5465647c
d7f80eab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
NEWS
NEWS
+6
-0
configure.ac
configure.ac
+1
-1
Daemon.cxx
src/Daemon.cxx
+11
-8
No files found.
NEWS
View file @
92a4bf44
...
...
@@ -8,6 +8,12 @@ ver 0.19 (not yet released)
- volume: improved software volume dithering
* new resampler option using libsoxr
ver 0.18.7 (not yet released)
* playlist
- soundcloud: fix build failure with libyajl 2.0.1
* daemon: don't initialize supplementary groups when already running
as the configured user
ver 0.18.6 (2013/12/24)
* input
- cdio_paranoia: support libcdio-paranoia 0.90
...
...
configure.ac
View file @
92a4bf44
...
...
@@ -852,7 +852,7 @@ dnl --------------------------------- Soundcloud ------------------------------
if test x$enable_soundcloud != xno; then
PKG_CHECK_MODULES([YAJL], [yajl >= 2.0],
[found_soundcloud=yes],
AC_CHECK_LIB([yajl], [yajl_
alloc
],
AC_CHECK_LIB([yajl], [yajl_
parse_complete
],
[found_soundcloud=yes YAJL_CFLAGS=-DHAVE_YAJL1 YAJL_LIBS=-lyajl],
[found_soundcloud=no]))
fi
...
...
src/Daemon.cxx
View file @
92a4bf44
...
...
@@ -47,7 +47,7 @@ static char *user_name;
static
uid_t
user_uid
=
(
uid_t
)
-
1
;
/** the Unix group id which MPD runs as */
static
gid_t
user_gid
=
(
p
id_t
)
-
1
;
static
gid_t
user_gid
=
(
g
id_t
)
-
1
;
/** the absolute path of the pidfile */
static
AllocatedPath
pidfile
=
AllocatedPath
::
Null
();
...
...
@@ -101,18 +101,21 @@ daemonize_set_user(void)
return
;
/* set gid */
if
(
user_gid
!=
(
gid_t
)
-
1
&&
user_gid
!=
getgid
())
{
if
(
setgid
(
user_gid
)
==
-
1
)
{
FormatFatalSystemError
(
"Failed to set group %d"
,
(
int
)
user_gid
);
}
if
(
user_gid
!=
(
gid_t
)
-
1
&&
user_gid
!=
getgid
()
&&
setgid
(
user_gid
)
==
-
1
)
{
FormatFatalSystemError
(
"Failed to set group %d"
,
(
int
)
user_gid
);
}
#ifdef _BSD_SOURCE
/* init suplementary groups
/* init sup
p
lementary groups
* (must be done before we change our uid)
*/
if
(
!
had_group
&&
initgroups
(
user_name
,
user_gid
)
==
-
1
)
{
if
(
!
had_group
&&
/* no need to set the new user's supplementary groups if
we are already this user */
user_uid
!=
getuid
()
&&
initgroups
(
user_name
,
user_gid
)
==
-
1
)
{
FormatFatalSystemError
(
"Failed to set supplementary groups "
"of user
\"
%s
\"
"
,
user_name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment