summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-08-22 07:12:50 +0000
committerPierre Ossman <ossman@cendio.se>2006-08-22 07:12:50 +0000
commit25c0640ac2206872f76df70368180c74153581e3 (patch)
tree99f3873d73012458d9b80f10ef61609bbc1a46c2
parent26201b27ec3233bb0f28539d63e49bb00d285d2a (diff)
Add an ifdef for when we do not have creds.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1307 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulse/context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c
index b4641590..f2af4727 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -385,11 +385,13 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
/* Only enable SHM if both sides are owned by the same
* user. This is a security measure because otherwise
* data private to the user might leak. */
-
+
+#ifdef HAVE_CREDS
const pa_creds *creds;
if ((creds = pa_pdispatch_creds(pd)))
if (getuid() == creds->uid)
pa_pstream_use_shm(c->pstream, 1);
+#endif
}
reply = pa_tagstruct_command(c, PA_COMMAND_SET_CLIENT_NAME, &tag);