| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -209,11 +209,6 @@ func (st *initState) runInit() {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							st.launchEnv = append(st.launchEnv, "HOME="+st.user.HomeDir)
 | 
					 | 
					 | 
					 | 
							st.launchEnv = append(st.launchEnv, "HOME="+st.user.HomeDir)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						pname := os.Getenv("INIT_PROFILE")
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if (pname != "") {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							st.launchEnv = append(st.launchEnv, "INIT_PROFILE="+pname)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if st.profile.Networking.Nettype != network.TYPE_HOST {
 | 
					 | 
					 | 
					 | 
						if st.profile.Networking.Nettype != network.TYPE_HOST {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							err := network.NetSetup(st.network)
 | 
					 | 
					 | 
					 | 
							err := network.NetSetup(st.network)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							if err != nil {
 | 
					 | 
					 | 
					 | 
							if err != nil {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -307,23 +302,17 @@ func (st *initState) readXpraOutput(r io.ReadCloser) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func (st *initState) launchApplication(cpath, pwd string, cmdArgs []string) (*exec.Cmd, error) {
 | 
					 | 
					 | 
					 | 
					func (st *initState) launchApplication(cpath, pwd string, cmdArgs []string) (*exec.Cmd, error) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						suffix := ""
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if st.config.DivertSuffix != "" {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							suffix = "." + st.config.DivertSuffix
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if cpath == "" {
 | 
					 | 
					 | 
					 | 
						if cpath == "" {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							cpath = st.profile.Path
 | 
					 | 
					 | 
					 | 
							cpath = st.profile.Path
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						if st.config.DivertSuffix != "" {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							cpath += "." + st.config.DivertSuffix
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						cpath = cpath + suffix
 | 
					 | 
					 | 
					 | 
						if st.profile.Seccomp.Mode == oz.PROFILE_SECCOMP_WHITELIST {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
							st.log.Notice("Enabling seccomp whitelist for: %s", cpath)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if st.profile.Seccomp.Mode == "whitelist" {
 | 
					 | 
					 | 
					 | 
							cmdArgs = append([]string{"-w",cpath}, cmdArgs...)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							st.log.Warning("cmdArgs %v", cmdArgs)
 | 
					 | 
					 | 
					 | 
							cpath = path.Join(st.config.PrefixPath, "bin", "oz-seccomp")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							args := []string{"-w",cpath}
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							cmdArgs = append(args, cmdArgs...)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							cpath = "/usr/bin/seccomp-wrapper"
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						cmd := exec.Command(cpath)
 | 
					 | 
					 | 
					 | 
						cmd := exec.Command(cpath)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						stdout, err := cmd.StdoutPipe()
 | 
					 | 
					 | 
					 | 
						stdout, err := cmd.StdoutPipe()
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -343,6 +332,10 @@ func (st *initState) launchApplication(cpath, pwd string, cmdArgs []string) (*ex
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						cmd.Env = append(cmd.Env, st.launchEnv...)
 | 
					 | 
					 | 
					 | 
						cmd.Env = append(cmd.Env, st.launchEnv...)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						if st.profile.Seccomp.Mode == oz.PROFILE_SECCOMP_WHITELIST {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							cmd.Env = append(cmd.Env, "_OZ_PROFILE="+st.profile.Name)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						cmd.Args = append(cmd.Args, cmdArgs...)
 | 
					 | 
					 | 
					 | 
						cmd.Args = append(cmd.Args, cmdArgs...)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if _, err := os.Stat(pwd); err == nil {
 | 
					 | 
					 | 
					 | 
						if _, err := os.Stat(pwd); err == nil {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |