<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Am 01.05.2020 um 22:46 schrieb Rémi Denis-Courmont <<a href="mailto:remi@remlab.net" class="">remi@remlab.net</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi,<br class=""><br class="">I think everybody understood that the first time. I don't see how that answers my questions though.<br class=""></div></div></blockquote><div><br class=""></div><div><br class=""></div><div>That is great, I was not so sure. :-)</div><div><br class=""></div><div>But unfortunately, now I need to ask you to please reformulate your questions, as I do not understand them. And please also explain how that relates to my questions, and whether you might have any concrete solutions to the points I asked.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">David</div><blockquote type="cite" class=""><div class=""><div class=""><br class=""><div class="gmail_quote">Le 1 mai 2020 23:41:35 GMT+03:00, David Fuhrmann <<a href="mailto:david.fuhrmann@gmail.com" class="">david.fuhrmann@gmail.com</a>> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hello,<br class=""><br class="">Let me rephrase the problem:<br class=""><br class="">macOS Catalina can refuse access to device nodes (/dev/xxx), which is a new security feature. Technically, this results in open() returning with EPERM (specifically).<br class=""><br class="">This problem can be fixed if the user goes to the OS wide security settings and allows access for VLC. This setting is a bit hidden, and therefore it is mandatory here to inform the user about that in a user visible popup.<br class=""><br class="">Additionally, for good UI experience, this message shall not be shown for any other failure, because obviously, then the problem can not be fixed anymore by just going to the specific security page and enabling a checkbox.<br class=""><br class="">And most importantly, the message MUST not be shown in case there is just a normal probing of a normal directory or file, which might not be even a DVD folder or DVD ISO at all. This module seems to have a quite high priority and therefore it is mandatory to restrict this as much as possible.<br class=""><br class="">All of that is achieved in this patch.<br class="">If anyone has concrete answers on my two questions I asked previously, or knows a better way how to achieve the same end result, feedback is welcome.<br class=""><br class="">BR. David<br class=""><br class=""><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Am 01.05.2020 um 18:33 schrieb Rémi Denis-Courmont <<a href="mailto:remi@remlab.net" class="">remi@remlab.net</a>>:<br class=""><br class="">Le perjantaina 1. toukokuuta 2020, 17.20.48 EEST David Fuhrmann a écrit :<br class=""><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;">Am 01.05.2020 um 15:43 schrieb Rémi Denis-Courmont <<a href="mailto:remi@remlab.net" class="">remi@remlab.net</a>>:<br class=""><br class="">Le perjantaina 1. toukokuuta 2020, 13.58.21 EEST <a href="mailto:david.fuhrmann@gmail.com" class="">david.fuhrmann@gmail.com</a><br class=""><<a href="mailto:david.fuhrmann@gmail.com" class="">mailto:david.fuhrmann@gmail.com</a>> a> <br class="">écrit :<br class=""><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;">From: David Fuhrmann <<a href="mailto:dfuhrmann@videolan.org" class="">dfuhrmann@videolan.org</a>><br class=""><br class="">The mentioned security setting is only relevant for accessing<br class="">RAW block devices (/dev/xxx), which is one of the main use cases<br class="">for this module (accessing an optical drive).<br class="">It is not relevant for file or folder access.<br class=""><br class="">Therefore limit the dialog to only show it in this case.<br class="">dvdnav does not provide a way to get the underlying error back<br class="">to this module, therefore the path is probed again to ensure<br class="">that the actual failure was EPERM.<hr class="">modules/access/dvdnav.c | 21 +++++++++++++++++----<br class="">1 file changed, 17 insertions(+), 4 deletions(-)<br class=""><br class="">diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c<br class="">index f082f1021b..558103eae3 100644<br class="">--- a/modules/access/dvdnav.c<br class="">+++ b/modules/access/dvdnav.c<br class="">@@ -377,10 +377,23 @@ static int AccessDemuxOpen ( vlc_object_t *p_this )<br class=""><br class="">       msg_Warn( p_demux, "cannot open DVD (%s)", psz_file);<br class=""><br class="">#ifdef __APPLE__<br class="">-        vlc_dialog_display_error( p_demux, _("Problem accessing a system<br class="">resource"), -            _("Potentially, macOS blocks access to your<br class="">disc.<br class="">"<br class="">-              "Please open \"System Preferences\" -> \"Security &<br class="">Privacy\" " -              "and allow VLC to access your external media<br class="">in \"Files and Folders\" section."));<br class="">+        /* This is only relevant when accessing<br class="">RAW block devices */<br class="">+        if( forced && !strncasecmp( psz_file,<br class="">"/dev/", 5) )<br class=""></blockquote>That's a very dubious way to identify device nodes.<br class=""></blockquote>A better way in theory is to open() and stat() the path to check if this is<br class="">a block device. But this does not work because the open() syscall is<br class="">already rejected by the OS in this case, as seen in the next lines.<br class=""></blockquote>I don't follow the logic here. So you cannot open the device node, and?<br class=""><br class=""><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">Does anybody knows another different way to check if a path is a device<br class="">node, without opening the file?<br class=""><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;">+        {<br class="">+            int fd = vlc_open( psz_file, O_RDONLY | O_NONBLOCK );<br class="">+            bool permissionError = ( fd == -1 && errno == EPERM );<br class="">+            if( fd != -1 )<br class="">+                vlc_close( fd );<br class=""></blockquote>And this reinvents access for no obvious reasons.<br class=""></blockquote>I think I tried to explain the reasons in the commit message.<br class=""></blockquote>Where? It just implies that the device node cannot be opened.<br class=""><br class="">-- <br class="">レミ・デニ-クールモン<br class=""><a href="http://www.remlab.net/" class="">http://www.remlab.net/</a><hr class="">vlc-devel mailing list<br class="">To unsubscribe or modify your subscription options:<br class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></blockquote><hr class="">vlc-devel mailing list<br class="">To unsubscribe or modify your subscription options:<br class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br class="">-- <br class="">Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</div>_______________________________________________<br class="">vlc-devel mailing list<br class="">To unsubscribe or modify your subscription options:<br class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a></div></blockquote></div><br class=""></body></html>