Skip to content

profiles: mpv: remove mkfile ~/.netrc #6735

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented May 4, 2025

To reduce clutter in the user home.

This file is apparently intended to specify login information for remote
systems, such as username and password for ftp/http connections
(similarly to using ~/.ssh/config for ssh connections).

From inetutils.info of GNU inetutils 2.6, which provides ftp and telnet
binaries (among others):

11.7 The ‘.netrc’ file

The ‘.netrc’ file contains login and initialization information used
by the auto-login process. It generally resides in the user's home
directory, but a location outside of the home directory can be set
using the environment variable ‘NETRC’. Both locations are overridden
by the command line option ‘-N’. The selected file must be a regular
file, or access will be denied.

It seems that the file is intended to be created manually (just like
~/.ssh/config), as it is not mentioned in mpv(1). mpv supports using
yt-dlp and ~/.netrc is mentined in yt-dlp(1), though it does not look
like it would create the file either.

Note also that this entry is not present in any other profile (including
the ones that allow ~/.netrc).

Related commits:

This is a follow-up to #6732.

To reduce clutter in the user home.

This file is apparently intended to specify login information for remote
systems, such as username and password for ftp/http connections
(similarly to using ~/.ssh/config for ssh connections).

From inetutils.info of GNU inetutils 2.6, which provides ftp and telnet
binaries (among others):

> 11.7 The ‘.netrc’ file

> The ‘.netrc’ file contains login and initialization information used
> by the auto-login process.  It generally resides in the user's home
> directory, but a location outside of the home directory can be set
> using the environment variable ‘NETRC’.  Both locations are overridden
> by the command line option ‘-N’.  The selected file must be a regular
> file, or access will be denied.

It seems that the file is intended to be created manually (just like
~/.ssh/config), as it is not mentioned in mpv(1).  mpv supports using
yt-dlp and ~/.netrc is mentined in yt-dlp(1), though it does not look
like it would create the file either.

Note also that this entry is not present in any other profile (including
the ones that allow ~/.netrc).

Related commits:

* 5d74179 ("Use whitelisting for video players (netblue30#3472)", 2020-08-15)
* 8bf892d ("Fix missing mkfile in
  5d74179", 2020-08-16)

This is a follow-up to netblue30#6732.
kmk3 added a commit to kmk3/firejail that referenced this pull request May 4, 2025
From curl(1):

> -n, --netrc
>        Make curl scan the .netrc file in the user's home directory for
>        login name and password. This is typically used for FTP on
>        Unix.  If used with HTTP, curl enables user authentication. See
>        netrc(5) and ftp(1) for details on the file format. curl does
>        not complain if that file does not have the right permissions
>        (it should be neither world- nor group-readable). The
>        environment variable "HOME" is used to find the home directory.

Environment: curl 8.13.0-2 on Artix Linux.

This is a follow-up to netblue30#6735.
@kmk3 kmk3 merged commit 8958722 into netblue30:master May 6, 2025
3 checks passed
@kmk3 kmk3 deleted the mpv-remove-mkfile-netrc branch May 6, 2025 08:52
@github-project-automation github-project-automation bot moved this from Todo to Done in Release 0.9.76 May 6, 2025
kmk3 added a commit that referenced this pull request May 6, 2025
From curl(1):

> -n, --netrc
>        Make curl scan the .netrc file in the user's home directory for
>        login name and password. This is typically used for FTP on
>        Unix.  If used with HTTP, curl enables user authentication. See
>        netrc(5) and ftp(1) for details on the file format. curl does
>        not complain if that file does not have the right permissions
>        (it should be neither world- nor group-readable). The
>        environment variable "HOME" is used to find the home directory.

Environment: curl 8.13.0-2 on Artix Linux.

This is a follow-up to #6735.
kmk3 added a commit that referenced this pull request May 6, 2025
@kmk3 kmk3 moved this from Done to Done (on RELNOTES) in Release 0.9.76 May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (on RELNOTES)
Development

Successfully merging this pull request may close these issues.

1 participant