[polypaudio-commits] r770 - /trunk/src/polypcore/util.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sat Apr 22 07:31:48 PDT 2006


Author: lennart
Date: Sat Apr 22 16:31:47 2006
New Revision: 770

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=770&root=polypaudio&view=rev
Log:
chown() and chmod() /tmp/.esd/ before checking if everything is ok with it

Modified:
    trunk/src/polypcore/util.c

Modified: trunk/src/polypcore/util.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/util.c?rev=770&root=polypaudio&r1=769&r2=770&view=diff
==============================================================================
--- trunk/src/polypcore/util.c (original)
+++ trunk/src/polypcore/util.c Sat Apr 22 16:31:47 2006
@@ -140,13 +140,16 @@
         if (errno != EEXIST)
             return -1;
 
+    chown(dir, getuid(), getgid());
+    chmod(dir, 0700);
+    
 #ifdef HAVE_LSTAT
     if (lstat(dir, &st) < 0)
 #else
     if (stat(dir, &st) < 0)
 #endif
         goto fail;
-
+    
 #ifndef OS_IS_WIN32
     if (!S_ISDIR(st.st_mode) || (st.st_uid != getuid()) || ((st.st_mode & 0777) != 0700))
         goto fail;




More information about the pulseaudio-commits mailing list