Ryan Lortie
1da34e99b2
Add support for FreeBSD <sys/capability.h>
...
cap_init() and friends are Linux-specific, so only use them if we're on
Linux.
Add support for FreeBSD capabilities if we find <sys/capability.h> to be
available there.
Add an #else (not Linux or FreeBSD) case with an #error requesting
contributions for other platforms.
This patch keeps the cap_init check in configure.ac but removes the
error if it fails. This will ensure we link to -lcap if needed, but
won't fail for the case that capabilities are part of the core system
(as on FreeBSD).
We do however, modify the header check to ensure we fail if there is no
<sys/capability.h> at all and we are on a system where it could be
installed. The logic here is that it is better to give the user the
chance to install it than it is to proceed silently with a disabled
security feature on a system where it could easily be supported.
--without-caps remains an option if the user wants to force it.
https://bugs.freedesktop.org/show_bug.cgi?id=72580
2013-12-20 21:48:50 +02:00
Tanu Kaskinen
999b47c099
caps: Fix compilation on Windows
...
Thanks to Pierre Ossman for the patch.
2013-07-14 13:26:24 +03:00
Tanu Kaskinen
6db3af6601
daemon: Don't rely on prctl(PR_SET_KEEPCAPS, 0) for dropping caps.
...
Capability dropping when changing the user in the system
mode was previously implemented by calling
prctl(PR_SET_KEEPCAPS, 0), but that doesn't necessarily
work. It's possible that the KEEPCAPS flag is locked to 1,
in which case the prctl() call fails with EPERM (this
happens at least on Harmattan). This patch implements
explicit capability dropping after changing the user.
2013-02-07 11:59:58 +02:00
Maarten Bosmans
b4e938e194
Move i18n.[ch] to src/pulsecore
...
The header is used in files troughout the tree and is not included in the public api,
so it belongs in pulsecore, not in pulse.
2011-08-11 13:23:42 +02:00
Maarten Bosmans
dd9265ac78
Remove unnecessary #includes
2011-06-22 23:12:20 +01:00
Lennart Poettering
a1598c742e
daemon: reset gids too, not just uids
2009-08-14 19:28:18 +02:00
Lennart Poettering
9f53aa5546
daemon: unconditionally clean up priviliges
2009-08-12 21:35:48 +02:00
Lennart Poettering
9c438bcac6
daemon: strip all special suid/caps log from our startup code, we'll now rely on RealtimeKit for all high-priority/RT scheduling policy issues
2009-06-19 17:37:18 +02:00
Colin Guthrie
86dee05aec
Use LGPL 2.1 on all files previously using LGPL 2
2009-03-03 20:23:02 +00:00
Lennart Poettering
d675058358
Fix spelling of privilige
2008-10-19 22:25:58 +02:00
Lennart Poettering
88130eb9e6
add missing inclusion
2008-10-04 01:06:35 +02:00
Lennart Poettering
9b00664295
instead of checking for directly use new function pa_in_valgrind()
2008-10-04 00:13:05 +02:00
Lennart Poettering
f1d2bf8408
add i18n support
2008-08-06 18:54:13 +02:00
Lennart Poettering
32f63f2a61
allow running of PA with a valgring that doesn't know cap_set_caps
2008-08-03 16:29:55 +02:00
Lennart Poettering
8885ddf716
support file-based capabilities instead of SUID root for giving PA rights to acquire RT/HP scheduling: setcap cap_sys_nice=ep /usr/bin/pulseaudio
2008-06-22 01:48:46 +02:00
Lennart Poettering
8ae83d618e
get rid of svn $ keywords
2008-06-18 23:23:21 +03:00
Lennart Poettering
940f89860c
fix return value of noop pa_limit_caps()
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2462 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-17 10:57:52 +00:00
Lennart Poettering
045c1d602d
merge glitch-free branch back into trunk
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-15 23:34:41 +00:00
Lennart Poettering
0e983e5993
fix caps stuff for crazy people who disable caps
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2213 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-03-31 22:24:37 +00:00
Lennart Poettering
1af0d948d1
merge r2193 from prepare-0.9.10
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2208 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-03-31 22:12:32 +00:00
Diego Petteno
be4c0f296c
Apply the fix for CVE-2008-0008 from 0.9.9 release on trunk.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2102 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-01-24 09:35:50 +00:00
Lennart Poettering
a67c21f093
merge 'lennart' branch back into trunk.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28 19:13:50 +00:00
Lennart Poettering
1e12e0ee8d
Kill spaces on EOL
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1465 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-29 17:24:48 +00:00
Lennart Poettering
4d88fcd59d
when called with the setid bit change euid to uid sooner to make sure that we can access our own files even when we dropped most capabilities. ( Closes #21 )
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1455 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-25 20:35:30 +00:00
Pierre Ossman
06211b7c8f
Add copyright notices to all relevant files. (based on svn log)
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-02-13 15:35:19 +00:00
Pierre Ossman
521daf6f0a
Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
...
mmmkay?
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 13:43:45 +00:00
Lennart Poettering
e385d93e5a
remove all occurences of
...
pa_logXXX(__FILE__":
and replace them by
pa_logXXX("
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1272 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 21:38:40 +00:00
Lennart Poettering
a7cf5e0f2d
fix two typos (pierre, have you been sleeping? next time please the comments wrong but the code right, not the other way round! ;-))
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1170 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-29 15:34:36 +00:00
Pierre Ossman
57d8a315ea
Move check for SUID into the caps functions.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1119 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-20 13:19:16 +00:00
Lennart Poettering
f44ba09265
big s/polyp/pulse/g
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1033 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-06-19 21:53:48 +00:00
Lennart Poettering
4413b89d7a
* split pa_cstrerror() into its own file polypcore/core-error.[ch]
...
* fix building of padsp
* remove a warning when compiling padsp.c
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@972 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-05-25 17:16:55 +00:00
Pierre Ossman
4e3dc7ce68
Wrap strerror() in a function that makes it thread safe and converts the
...
output to UTF-8.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@945 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-05-22 15:20:46 +00:00
Pierre Ossman
f426b58e5c
glibc <= 2.2 has a broken unistd.h, lacking setresuid().
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@795 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-04-25 07:13:44 +00:00
Lennart Poettering
4a64b0d116
change pa_log() and friends to not require a trailing \n on all logged strings
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@574 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-02-23 02:27:19 +00:00
Pierre Ossman
5eda18bf60
Cleaned up the includes after the restructuring. Indicate which headers are
...
public and which are internal through <> vs "".
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@500 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-02-17 12:10:58 +00:00
Pierre Ossman
e205b25d65
Reorganised the source tree. We now have src/ with a couple of subdirs:
...
* daemon/ - Contains the files specific to the polypaudio daemon.
* modules/ - All loadable modules.
* polyp/ - Files that are part of the public, application interface or
are only used in libpolyp.
* polypcore/ - All other shared files.
* tests/ - Test programs.
* utils/ - Utility programs.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@487 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-02-16 19:19:58 +00:00