[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. 2199b8e1adb3e9395e629da6a3b180d5e1ba15f0

Lennart Poettering gitmailer-noreply at 0pointer.de
Sat Jun 21 04:55:56 PDT 2008


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  d1362b56b706aca62516b9b6e112282a7f26a896 (commit)

- Log -----------------------------------------------------------------
2199b8e... Properly check for home directory
d0e26a5... Don't fail when we cannot determine the lock file path
-----------------------------------------------------------------------

Summary of changes:
 src/pulse/context.c       |    6 +++++-
 src/pulsecore/core-util.c |   10 ++++------
 2 files changed, 9 insertions(+), 7 deletions(-)

-----------------------------------------------------------------------

commit d0e26a519f7f8fd0f31948623322c913c55f817b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Jun 21 13:55:17 2008 +0200

    Don't fail when we cannot determine the lock file path

diff --git a/src/pulse/context.c b/src/pulse/context.c
index 1e5fa63..f56cb24 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -858,7 +858,11 @@ int pa_context_connect(
         if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
             char *lf;
 
-            lf = pa_runtime_path(AUTOSPAWN_LOCK);
+            if (!(lf = pa_runtime_path(AUTOSPAWN_LOCK))) {
+                pa_context_fail(c, PA_ERR_ACCESS);
+                goto finish;
+            }
+
             pa_assert(c->autospawn_lock_fd <= 0);
             c->autospawn_lock_fd = pa_lock_lockfile(lf);
             pa_xfree(lf);

commit 2199b8e1adb3e9395e629da6a3b180d5e1ba15f0
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Jun 21 13:55:52 2008 +0200

    Properly check for home directory

diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 3217352..d259fb1 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -1179,19 +1179,17 @@ static char *get_dir(mode_t m, const char *env_name) {
             return NULL;
         }
 
-        d = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse", h);
-
-        if (stat(d, &st) < 0) {
-            pa_log_error("Failed to state home directory %s: %s", d, pa_cstrerror(errno));
-            pa_xfree(d);
+        if (stat(h, &st) < 0) {
+            pa_log_error("Failed to stat home directory %s: %s", h, pa_cstrerror(errno));
             return NULL;
         }
 
         if (st.st_uid != getuid()) {
             pa_log_error("Home directory %s not ours.", d);
-            pa_xfree(d);
             return NULL;
         }
+
+        d = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse", h);
     }
 
     if (pa_make_secure_dir(d, m, (pid_t) -1, (pid_t) -1) < 0)  {

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list