3 ms·
The equiv command in Microsoft Windows is "assoc". You can run it with no args to see what programs are associated with what extensions in Windows. I mention
by LinuxBender 9y ago
The equiv command in Microsoft Windows is "assoc". You can run it with no args to see what programs are associated with what extensions in Windows. I mention this because of a security concern.
i.e.
assoc
assoc .vbs=txtfile
assoc .mp4=WMP11.AssocFile.MP4
Perhaps it may be worth considering security practices for BINFMT_MISC before people find any sub-optimal defaults. In the past, clever people would exploit some of the default associations that applications would insert on Windows desktops. At some point, desktop file exploring apps may decide to hide "known extensions. The desktop will also leverage this association.
- cyphar 9y agoYou need to be root to change binfmt_misc's configuration, so it's not analgous to Windows' file associations (which the user can also change). I also believe that xdg-open (and the XDG scheme) is more similar to Windows' file associations than binfmt_misc, since XDG is more of a user-facing thing.
- LinuxBender 9y agoI believe you need to be a on an admin account in Windows to change global file associations. In fairness though, most people are logged in as an Administrator.
- auscompgeek 9y agoYou can also have user file associations on Windows though.
- LinuxBender 9y agoCertainly. I supposed the point I am trying to make is that a lot of old windows behaviors that lead to security incidents are finding their way into non-desktop linux machines. My servers have binfmt mounted, for example. SystemD appears to be bringing in a bit of desktop behavior to both desktops and servers. Maybe this is ok if people are aware?
- cyphar 9y agobinfmt_misc has existed for a much longer time than systemd (it was originally added in 1997[1]). It has been used for many features like emulating binaries "natively" by setting up binfmt_misc so that binaries are executed inside QEMU if the architecture is different. It has had many other similar uses for decades. I'm not a fan of systemd in the slightest, but blaming systemd for an in-kernel facility that has existed since the mid-90s (and isn't even used by systemd to my knowledge) doesn't make any sense. [1]: https://elixir.bootlin.com/linux/v4.15.7/source/fs/binfmt_misc.c https://elixir.bootlin.com/linux/v4.15.7/source/fs/binfmt_mi...