Changeset 451:ef127bf9f801 in roaraudio


Ignore:
Timestamp:
08/12/08 02:19:27 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

chmod() and chown() roar_simple_new_stream_obj()s temp socket to best fit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/simple.c

    r235 r451  
    6868 int fh = -1, listen; 
    6969 static int count = 0; 
     70 struct group   * grp  = NULL; 
    7071 
    7172 sprintf(file, "/tmp/.libroar-simple-stream.%i-%i", getpid(), count++); 
     
    7475  return -1; 
    7576 } 
     77 
     78 chmod(file, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP); 
     79 
     80 grp = getgrnam(ROAR_DEFAULT_SOCKGRP); 
     81 
     82 if ( grp ) 
     83  chown(file, -1, grp->gr_gid); 
    7684 
    7785 if ( roar_stream_new(s, rate, channels, bits, codec) == -1 ) { 
Note: See TracChangeset for help on using the changeset viewer.