|
18 | 18 | //! - Explicit path provided via CLI argument (required to exist if specified) |
19 | 19 | //! - `keylimectl.toml` (current directory) |
20 | 20 | //! - `keylimectl.conf` (current directory) |
21 | | -//! - `/etc/keylime/tenant.conf` (system-wide) |
22 | | -//! - `/usr/etc/keylime/tenant.conf` (alternative system-wide) |
23 | | -//! - `~/.config/keylime/tenant.conf` (user-specific) |
| 21 | +//! - `/etc/keylime/keylimectl.conf` (system-wide) |
| 22 | +//! - `/usr/etc/keylime/keylimectl.conf` (alternative system-wide) |
| 23 | +//! - `~/.config/keylime/keylimectl.conf` (user-specific) |
24 | 24 | //! - `~/.keylimectl.toml` (user-specific) |
25 | | -//! - `$XDG_CONFIG_HOME/keylime/tenant.conf` (XDG standard) |
| 25 | +//! - `$XDG_CONFIG_HOME/keylime/keylimectl.conf` (XDG standard) |
26 | 26 | //! |
27 | 27 | //! If no configuration files are found, keylimectl will work perfectly with defaults and environment variables. |
28 | 28 | //! |
@@ -418,20 +418,22 @@ impl Config { |
418 | 418 | paths.extend([ |
419 | 419 | PathBuf::from("keylimectl.toml"), |
420 | 420 | PathBuf::from("keylimectl.conf"), |
421 | | - PathBuf::from("/etc/keylime/tenant.conf"), |
422 | | - PathBuf::from("/usr/etc/keylime/tenant.conf"), |
| 421 | + PathBuf::from("/etc/keylime/keylimectl.conf"), |
| 422 | + PathBuf::from("/usr/etc/keylime/keylimectl.conf"), |
423 | 423 | ]); |
424 | 424 |
|
425 | 425 | // Home directory config |
426 | 426 | if let Some(home) = std::env::var_os("HOME") { |
427 | 427 | let home_path = PathBuf::from(home); |
428 | | - paths.push(home_path.join(".config/keylime/tenant.conf")); |
| 428 | + paths.push(home_path.join(".config/keylime/keylimectl.conf")); |
429 | 429 | paths.push(home_path.join(".keylimectl.toml")); |
430 | 430 | } |
431 | 431 |
|
432 | 432 | // XDG config directory |
433 | 433 | if let Some(xdg_config) = std::env::var_os("XDG_CONFIG_HOME") { |
434 | | - paths.push(PathBuf::from(xdg_config).join("keylime/tenant.conf")); |
| 434 | + paths.push( |
| 435 | + PathBuf::from(xdg_config).join("keylime/keylimectl.conf"), |
| 436 | + ); |
435 | 437 | } |
436 | 438 |
|
437 | 439 | paths |
@@ -1033,10 +1035,11 @@ retry_interval = 2.0 |
1033 | 1035 | // Should include standard paths |
1034 | 1036 | assert!(paths.contains(&PathBuf::from("keylimectl.toml"))); |
1035 | 1037 | assert!(paths.contains(&PathBuf::from("keylimectl.conf"))); |
1036 | | - assert!(paths.contains(&PathBuf::from("/etc/keylime/tenant.conf"))); |
1037 | 1038 | assert!( |
1038 | | - paths.contains(&PathBuf::from("/usr/etc/keylime/tenant.conf")) |
| 1039 | + paths.contains(&PathBuf::from("/etc/keylime/keylimectl.conf")) |
1039 | 1040 | ); |
| 1041 | + assert!(paths |
| 1042 | + .contains(&PathBuf::from("/usr/etc/keylime/keylimectl.conf"))); |
1040 | 1043 | } |
1041 | 1044 |
|
1042 | 1045 | #[test] |
|
0 commit comments