[pulseaudio-commits] r1110 - /trunk/src/daemon/main.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Wed Jul 19 16:16:03 PDT 2006


Author: lennart
Date: Thu Jul 20 01:16:02 2006
New Revision: 1110

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1110&root=pulseaudio&view=rev
Log:
add a few comments

Modified:
    trunk/src/daemon/main.c

Modified: trunk/src/daemon/main.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/daemon/main.c?rev=1110&root=pulseaudio&r1=1109&r2=1110&view=diff
==============================================================================
--- trunk/src/daemon/main.c (original)
+++ trunk/src/daemon/main.c Thu Jul 20 01:16:02 2006
@@ -158,6 +158,10 @@
     struct passwd *pw;
     struct group * gr;
     int r;
+
+    /* This function is called only in system-wide mode. It creates a
+     * runtime dir in /var/run/ with proper UID/GID and drops privs
+     * afterwards. */
     
     if (!(pw = getpwnam(PA_SYSTEM_USER))) {
         pa_log(__FILE__": Failed to find user '%s'.", PA_SYSTEM_USER);
@@ -238,8 +242,12 @@
 
 static int create_runtime_dir(void) {
     char fn[PATH_MAX];
-    
+
     pa_runtime_path(NULL, fn, sizeof(fn));
+
+    /* This function is called only when the daemon is started in
+     * per-user mode. We create the runtime directory somewhere in
+     * /tmp/ with the current UID/GID */
     
     if (pa_make_secure_dir(fn, 0700, getuid(), getgid()) < 0) {
         pa_log(__FILE__": Failed to create '%s': %s", fn, pa_cstrerror(errno));




More information about the pulseaudio-commits mailing list