Skip to content
Snippets Groups Projects
  • Simon McVittie's avatar
    a25b7f09
    wrap: Append argv in container directly to final argv · a25b7f09
    Simon McVittie authored
    
    Instead of this pseudocode:
    
        bwrap += argv_in_container
        final_argv += bwrap
    
    if we do this:
    
        final_argv += bwrap
        final_argv += argv_in_container
    
    it will be easier to adapt to Flatpak sub-sandboxing, in which we never
    directly build up a bwrap command-line and so bwrap remains NULL.
    
    This means that in the case where we are escaping from a Flatpak sandbox
    to run commands on the host, we have to forward the fds from
    argv_in_container in addition to the fds from bwrap.
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
    a25b7f09
    History
    wrap: Append argv in container directly to final argv
    Simon McVittie authored
    
    Instead of this pseudocode:
    
        bwrap += argv_in_container
        final_argv += bwrap
    
    if we do this:
    
        final_argv += bwrap
        final_argv += argv_in_container
    
    it will be easier to adapt to Flatpak sub-sandboxing, in which we never
    directly build up a bwrap command-line and so bwrap remains NULL.
    
    This means that in the case where we are escaping from a Flatpak sandbox
    to run commands on the host, we have to forward the fds from
    argv_in_container in addition to the fds from bwrap.
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>