mirror of https://github.com/containers/podman.git
				
				
				
			oci: do not use hooks in rootless mode
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #871 Approved by: mheon
This commit is contained in:
		
							parent
							
								
									399c3a5e4b
								
							
						
					
					
						commit
						de71441700
					
				| 
						 | 
				
			
			@ -1173,8 +1173,10 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	var err error
 | 
			
		||||
	if c.state.ExtensionStageHooks, err = c.setupOCIHooks(ctx, &g); err != nil {
 | 
			
		||||
		return nil, errors.Wrapf(err, "error setting up OCI Hooks")
 | 
			
		||||
	if os.Getuid() == 0 {
 | 
			
		||||
		if c.state.ExtensionStageHooks, err = c.setupOCIHooks(ctx, &g); err != nil {
 | 
			
		||||
			return nil, errors.Wrapf(err, "error setting up OCI Hooks")
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	// Bind builtin image volumes
 | 
			
		||||
	if c.config.Rootfs == "" && c.config.ImageVolumes {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue