Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpd: listen on 127.0.0.1 by default #21505

Merged
merged 1 commit into from Jan 1, 2017
Merged

mpd: listen on 127.0.0.1 by default #21505

merged 1 commit into from Jan 1, 2017

Conversation

tg-x
Copy link
Member

@tg-x tg-x commented Dec 29, 2016

Motivation for this change

MPD is often run on desktop computers where it is not desired to expose the control port publicly,
and thus would be better to have safer defaults.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@tg-x, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dmalikov, @rickynils and @unaizalakain to be potential reviewers.

@@ -83,7 +83,7 @@ in {

listenAddress = mkOption {
type = types.str;
default = "any";
default = "127.0.0.1";
description = ''
This setting sets the address for the daemon to listen on. Careful attention
should be paid if this is assigned to anything other then the default, any.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description still refers to the old default. IMO, it would benefit from some trimming, regardless of this PR (especially the "careful attention" part; I, at least, fail to get anything useful out of it).

@grahamc
Copy link
Member

grahamc commented Dec 30, 2016

LGTM but please do update that comment, (but keep that any is a valid value.)

@Mic92
Copy link
Member

Mic92 commented Dec 30, 2016

@tg-x on 33c3 funny things happens, if mpd listens on 0.0.0.0 without a firewall.

@danbst
Copy link
Contributor

danbst commented Dec 30, 2016

"any" could be set as example

@tg-x tg-x force-pushed the mpd-listen branch 2 times, most recently from a9971c9 to 1fe16bf Compare January 1, 2017 11:59
@tg-x
Copy link
Member Author

tg-x commented Jan 1, 2017

updated description + example

This setting sets the address for the daemon to listen on. Careful attention
should be paid if this is assigned to anything other then the default, any.
This setting can deny access to control of the daemon.
This setting sets the address for the daemon to listen on.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits: a "setting that sets" parses poorly for me. Also, it is unnecessary to state what the default is, as default is shown in the manual to begin with. Finally, I think "any" would render better if enclosed in <literal></literal>.

I'd rephrase as "Listening address" and trust the user to understand how to use it from the example and the default.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, trimmed it even further, see updated version

@Mic92 Mic92 merged commit 05f2f8e into NixOS:master Jan 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants