mirror of https://github.com/containers/podman.git
				
				
				
			secrets: parse only one mounts configuration file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
		
							parent
							
								
									c737d01937
								
							
						
					
					
						commit
						45a92f8357
					
				|  | @ -147,11 +147,14 @@ func SecretMountsWithUIDGID(mountLabel, containerWorkingDir, mountFile, mountPre | |||
| 		mountFiles = append(mountFiles, mountFile) | ||||
| 	} | ||||
| 	for _, file := range mountFiles { | ||||
| 		mounts, err := addSecretsFromMountsFile(file, mountLabel, containerWorkingDir, mountPrefix, uid, gid) | ||||
| 		if err != nil { | ||||
| 			logrus.Warnf("error mounting secrets, skipping: %v", err) | ||||
| 		if _, err := os.Stat(file); err == nil { | ||||
| 			mounts, err := addSecretsFromMountsFile(file, mountLabel, containerWorkingDir, mountPrefix, uid, gid) | ||||
| 			if err != nil { | ||||
| 				logrus.Warnf("error mounting secrets, skipping: %v", err) | ||||
| 			} | ||||
| 			secretMounts = mounts | ||||
| 			break | ||||
| 		} | ||||
| 		secretMounts = append(secretMounts, mounts...) | ||||
| 	} | ||||
| 
 | ||||
| 	// Add FIPS mode secret if /etc/system-fips exists on the host
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue