Ignore:
Timestamp:
03/06/14 11:35:20 (7 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
69b2305
Parents:
27b31a3
Message:

Add a nullfs backed "socket" passthrough layer to pbifs, this allows sockets in
/var/run to be available to PBIs, same as in /tmp

This fixes bugs with CUPS not being able to work in PBIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pbi-manager/pbifs/main.c

    rb2efbe3 r6d736fb  
    121121        // First, lets look for calls to /var/run/ld-elf*.so.hints 
    122122        // These need to be replaced with calls to our new hints file in hintsdir 
    123         if ( strpos(rPath, "/var/run/") == 0 ) 
     123        if ( strpos(rPath, "/var/run") == 0 ) 
    124124        { 
    125125                if ( strcmp(rPath, "/var/run/ld-elf.so.hints") == 0 ) 
     
    135135                        return 0; 
    136136                } 
     137 
     138                // Check for requests to socket files 
     139                if ( strpos(rPath, ".sock") != -1 ) 
     140                { 
     141                        // Return the "nullfs-mounted" /var/run 
     142                        strcpy(npath, replace_str(rPath, "/var/run", "/usr/pbi/varrun")); 
     143                        return 0; 
     144                } 
     145                // Check for requests to socket files 
     146                if ( strpos(rPath, "socket") != -1 ) 
     147                { 
     148                        // Return the "nullfs-mounted" /var/run 
     149                        strcpy(npath, replace_str(rPath, "/var/run", "/usr/pbi/varrun")); 
     150                        return 0; 
     151                } 
     152 
    137153        } 
    138154 
Note: See TracChangeset for help on using the changeset viewer.