]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Omit password in debug (syslog) output 1811/head
authorKlemens Nanni <kn@openbsd.org>
Sat, 24 Feb 2024 13:41:02 +0000 (14:41 +0100)
committerKlemens Nanni <kn@openbsd.org>
Sat, 24 Feb 2024 13:41:02 +0000 (14:41 +0100)
Configuration files may contain it, but those can be protected with
filesystem permissions.

Debug log, however, may end up in syslog(3) which is usually accessible
by all users on a system.

Avoid disclosing user secrets by simply not printing the password.

shairport.c

index bded416524abae2322631251a09c956cb7327884..8a19b2676f9a788490d600b495a01ddda4333ad7 100644 (file)
@@ -2429,7 +2429,7 @@ int main(int argc, char **argv) {
   debug(1, "allow a session to be interrupted: %d.", config.allow_session_interruption);
   debug(1, "busy timeout time is %d.", config.timeout);
   debug(1, "drift tolerance is %f seconds.", config.tolerance);
-  debug(1, "password is \"%s\".", strnull(config.password));
+  debug(1, "password is %s.", config.password == NULL ? "not set" : "set (omitted)");
   debug(1, "default airplay volume is: %.6f.", config.default_airplay_volume);
   debug(1, "high threshold airplay volume is: %.6f.", config.high_threshold_airplay_volume);
   if (config.limit_to_high_volume_threshold_time_in_minutes == 0)