How to fix |mkfifo()| failure if |pathname| is on NFS ? / was: Re: [EXTERNAL] Re: mkfifo: cannot set permissions of 'x.fifo': Not a directory

2023-08-22 Thread Roland Mainz via Cygwin
On Tue, Aug 22, 2023 at 4:52 PM Lavrentiev, Anton (NIH/NLM/NCBI) [C]
via Cygwin  wrote:
> > FIFOs which don't make *any* sense
> > ... FWIW, a remote NFS fileystem.
>
> I got an impression that the OP is trying to deploy something (maybe the 
> entire Cygwin) onto an
> NFS share.  So the named FIFO "file" is also created in there.

I agree with that impression. This is basically what large sites
(universities etc) do with UNIX and Linux: The machines mount an
user's ${HOMR} directory via automounter over NFS, and users are
discouraged (e.g. grumpy admin visiting you in person, blocking all
escape routes... =:-) ) from using the machine's local filesystems (in
Cygwin's case that includes "C:"!).

In that case people want to use |mkfifo()|/|mkfifoat()| and/or
/usr/bin/mkfifo in their home directory, and don't expect that it does
not work.

But that is what happens on Cygwin 3.4.8 right now, if someone tries
to do a |mkfifo()| on a NFS home directory (tested with MS NFSv3 and
CITI NFSv4 clients):
|mkfifo()| succeeds, but the resulting inode is *NOT* a FIFO as requested

Example (/cygdrive/h/ is my home directory shared from my Linux machine):
 snip 
roland_mainz@winkrakra1 /cygdrive/h/work/cygwin_mkfifo_on_nfs
$ uname -a
CYGWIN_NT-10.0-19045 winkrakra1 3.4.8-1.x86_64 2023-08-17 17:02 UTC
x86_64 Cygwin

roland_mainz@winkrakra1 /cygdrive/h/work/cygwin_mkfifo_on_nfs
$ mount
C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin64 on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
H: on /cygdrive/h type nfs (binary,posix=0,user,noumount,auto)

roland_mainz@winkrakra1 /cygdrive/h/work/cygwin_mkfifo_on_nfs
$ ls -l
total 1
-rw-rw-rw- 1 Unix_User+0 Unix_Group+0 330 Aug 22 23:58 cygwin_mkfifo_on_nfs.c

roland_mainz@winkrakra1 /cygdrive/h/work/cygwin_mkfifo_on_nfs
$ cat -n cygwin_mkfifo_on_nfs.c
 1  #include 
 2  #include 
 3  #include 
 4  #include 
 5  #include 
 6  #include 
 7
 8  int main(int ac, char *av[])
 9  {
10  (void)puts("# start");
11
12  if
(mkfifo("/cygdrive/h/work/cygwin_mkfifo_on_nfs/myfifo.fifo", 0) != 0)
13  perror("mkfifo failed");
14  (void)puts("# done.");
15  return EXIT_SUCCESS;
16  }
17

roland_mainz@winkrakra1 /cygdrive/h/work/cygwin_mkfifo_on_nfs
$ gcc -g cygwin_mkfifo_on_nfs.c

roland_mainz@winkrakra1 /cygdrive/h/work/cygwin_mkfifo_on_nfs
$ ./a
# start
# done.

roland_mainz@winkrakra1 /cygdrive/h/work/cygwin_mkfifo_on_nfs
$ ls -l
total 68
-rwxr-xr-x 1 Unix_User+0 Unix_Group+0 66951 Aug 23 00:12 a.exe
-rw-rw-rw- 1 Unix_User+0 Unix_Group+0   330 Aug 22 23:58 cygwin_mkfifo_on_nfs.c
lrwxrwxrwx 1 Unix_User+0 Unix_Group+011 Aug 23 00:12 myfifo.fifo
-> ':\0:c4:1000'

roland_mainz@winkrakra1 /cygdrive/h/work/cygwin_mkfifo_on_nfs
$ cat  ':\0:c4:1000'".

AFAIK there are (at least) these two options to fix the problems:
1. Check whether the filesystem for the fifos path is NFS
(cgywin.dll's |fs.fs_is_nfs()|), and if it is a symlink check if it
starts with ':\0:c4:' (assuming "c4" is the prefix for inodes created
with |mkfifo()|). If this condition is |true|, then cygwin |stat()|,
|open()| etc. should treat this inode as FIFO.
2. Check whether the filesystem for the fifos path is NFS
(cgywin.dll's |fs.fs_is_nfs()|), and then just refuse |mkfifo()| with
|ENOSYS| (not implemented)

Better algorithm for [1] might be to check whether the inode is a
symlink, and then do a |fs.fs_is_nfs()| on the symlinks |pathname|,
assuming this is more performant.

> It's pointless to assume that the FIFO can be used as a communication
> device between the hosts that can mount the share, but it can be quite
> feasible to envision a scenario, in which the same host opens the FIFO
> located on the share from two processes and establish the
> communication using that special "file" (which is basically a special
> data-less i-node).

Well, this is what RFS (see
https://en.wikipedia.org/wiki/Remote_File_Sharing) was doing - but it
was removed in Solaris 2.4, because its complexity was too great
(well, the original implementation was simple and clean, and then it
grew all over the kernel just to handle all corner cases of POSIX)
- and it would be nice not to repeat the mistakes of the past.



Bye,
Roland
-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&& programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Virus Total scan

2023-08-22 Thread Brian Inglis via Cygwin

On 2023-08-22 08:12, Dom Woods - BGS via Cygwin wrote:

I scanned your application through Virus Total as per our company policy and

noticed that the installation process calls out to a suspicious Microsoft IP
13.107.4.50, this ip has been flagged by 8 vendors as malicious, I get varying
responses for what it is used for (an os updater or a file distributer) and
wanted to ask what does Cygwin use it for? I can't seem to contact it with
nslookup or ping it and Virus Total says that it gives a 'status 400' results so
it might not be in use anymore anyway but just wanted to check.


Here is your Virus Total graph results: 
https://www.virustotal.com/graph/6bad4555154b3b348d1bfb633a2e9d6086aa46e36952f456a434ecef5b0010e0
Here is the scan of the IP address' results: 
https://www.virustotal.com/gui/url/3397a00da1c5aa448611892c12d38fee37fcd60321720a6e242cb0167e381901/detection


Can not see VT graph without registering - please attach if relevant.

Which Cygwin application did you scan, and how did you scan it?
Cygwin has thousands of packages with many executables in each, plus thousands 
of libraries which may have many DLLs, all developed or packaged by volunteers.


Did you get the application from the cygwin.com site, or install it using the 
installer downloaded from the site home page URL, accessing an official Cygwin 
mirror?

Any other process is entirely at your own risk and may contain malware!

It is extremely unlikely any Cygwin package attampted to access any MS address 
or resources, as the newlib libc is BSD or compatible licensed, and Cygwin is 
GPL or compatible licensed, so packages have to be limited in what they are 
allowed to do on networks during install.


Your company may have filters intercepting library and system DLLs, and much 
else on the internet, and may proxy cache downloads, which could interfere with 
anything else you do.
It would be advisable to ask your network security folks about such anomalous 
results.


--
Take care. Thanks, Brian Inglis  Calgary, Alberta, Canada

La perfection est atteinte   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry

--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: lulatex problems after update of zlib

2023-08-22 Thread Jon Turney via Cygwin

On 22/08/2023 17:55, ASSI via Cygwin wrote:

Ken Brown via Cygwin writes:

On 8/21/2023 11:02 AM, ASSI via Cygwin wrote:

(although in this case maybe i got spooked by the change
from 1.2.x to 1.3)


It looks like that's exactly what happened.  The version check
compares the first 4 characters of the version string.


Almost exactly the same problem happened 13 years ago or so.  Instead of
heeding the comment right in the file that only the first character of
the version string should be examined (or else compare ZLIB_VERNUM),
they chose to shorten the comparison from 5 to 4 characters…


I've been made aware of what seems to be a similar problem in cmake's 
"find_package(ZLIB)", see:


https://gitlab.kitware.com/cmake/cmake/-/issues/25200

I think that means we need a cmake update with a fix for that...


--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


[ANNOUNCEMENT] Updated: {,mingw64-{i686,x86_64}-}mpfr-4.2.1-1

2023-08-22 Thread ASSI via Cygwin


The following packages have been updated to the latest upstream release
(a patch rollup release):

 mpfr-4.2.1-1
 mingw64-i686-mpfr-4.2.1-1
 mingw64-x86_64-mpfr-4.2.1-1
 
-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Updated: {,mingw64-{i686,x86_64}-}mpfr-4.2.1-1

2023-08-22 Thread ASSI


The following packages have been updated to the latest upstream release
(a patch rollup release):

 mpfr-4.2.1-1
 mingw64-i686-mpfr-4.2.1-1
 mingw64-x86_64-mpfr-4.2.1-1
 
-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.


How to use X-Server on VM with multiple client displays?

2023-08-22 Thread Stone, Timothy M via Cygwin


Hello,

I hope I'm using the right list!

I have an X application that uses the cygwin X Server XWin.  It works fine on 
Windows:

  *   When I launch the application, XWin launches, then the X app raises it's 
window.

When I install this application (and cygwin and XWin) on a virtual machine, I 
have a DISPLAY issue:

  *   If I log into the virtual machine from , I can launch and run 
the app just fine.
  *   However, if I then try to log into the virtual machine from another 
computer and launch the app...the app launches on the first machine's 
display...so I have 2 copies of it running on that display now.
  *   Typically, I'd set DISPLAY=:0.0 for the first machine, and 
DISPLAY=:0.0 for the second machine
 *   The problem is, the virtual machine is the only machine here, it only 
has 1 IP address
 *   I don't know how to set multiple DISPLAY when using the same virtual 
machine with the same IP address from 2 different machines.
 *   I have tried setting the DISPLAY to the IP addresses of the client 
machines, this does not work (unable to open display).
  *   I have also tried setting DISPLAY=localhost:0.0 for one machine and 
DISPLAY=localhost:0.1 for the other machine...this also does not work
 *   XWin is unable to open display localhost:0.1

Any help greatly appreciated!

I'm sure it must be possible to launch the X app on the virtual machine from 
different clients and have the display on their respective displays?  I just 
can't see how to set the display.

thanks



-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Virus Total scan

2023-08-22 Thread Bill Stewart via Cygwin
On Tue, Aug 22, 2023 at 9:00 AM Thomas Schweikle wrote:

It is the address of one of the distribution servers. Since this is not
> "one server", but a cluster of servers, your "suspicious" server shows
> only one thing: those "suspicious" flags are suspicious by themselves:
>
> this particular server ist down since some time and only reports back a
> broken html page telling "Our services aren't available right
> nowWe're working to restore all services as soon as possible.
> Please check back
> soon.06cvkZAA8FvmXFYIOTZ2TS15AJl0/RFVTMzBFREdFMDkxNwBFZGdl"
>
> If this is enough to get flagged as "suspicious" ...
>

Unfortunately yes, nowadays.

I have run into this same problem also because I wrote an installer for an
open source tool. Said tool makes outgoing TCP connections to servers
configured as relays. One of the IP addresses used by one of these relays
was (or is) shared with a "dangerous" service. As a result I had to disable
the relay feature in the installer as a default to (hopefully) reduce the
number false positives.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: lulatex problems after update of zlib

2023-08-22 Thread ASSI via Cygwin
Ken Brown via Cygwin writes:
> On 8/21/2023 11:02 AM, ASSI via Cygwin wrote:
>> (although in this case maybe i got spooked by the change
>> from 1.2.x to 1.3)
>
> It looks like that's exactly what happened.  The version check
> compares the first 4 characters of the version string.

Almost exactly the same problem happened 13 years ago or so.  Instead of
heeding the comment right in the file that only the first character of
the version string should be examined (or else compare ZLIB_VERNUM),
they chose to shorten the comparison from 5 to 4 characters…


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Virus Total scan

2023-08-22 Thread Thomas Schweikle via Cygwin
It is the address of one of the distribution servers. Since this is not 
"one server", but a cluster of servers, your "suspicious" server shows 
only one thing: those "suspicious" flags are suspicious by themselves:


this particular server ist down since some time and only reports back a 
broken html page telling "Our services aren't available right 
nowWe're working to restore all services as soon as possible. 
Please check back 
soon.06cvkZAA8FvmXFYIOTZ2TS15AJl0/RFVTMzBFREdFMDkxNwBFZGdl"


If this is enough to get flagged as "suspicious" ...


Am Di., 22.Aug..2023 um 16:12:51 schrieb Dom Woods - BGS via Cygwin:

Hi Cygwin,

I scanned your application through Virus Total as per our company policy and 
noticed that the installation process calls out to a suspicious Microsoft IP 
13.107.4.50, this ip has been flagged by 8 vendors as malicious, I get varying 
responses for what it is used for (an os updater or a file distributer) and 
wanted to ask what does Cygwin use it for? I can't seem to contact it with 
nslookup or ping it and Virus Total says that it gives a 'status 400' results 
so it might not be in use anymore anyway but just wanted to check.

Here is your Virus Total graph results: 
https://www.virustotal.com/graph/6bad4555154b3b348d1bfb633a2e9d6086aa46e36952f456a434ecef5b0010e0
Here is the scan of the IP address' results: 
https://www.virustotal.com/gui/url/3397a00da1c5aa448611892c12d38fee37fcd60321720a6e242cb0167e381901/detection


Kind regards,
Dom woods




This email and any attachments are intended solely for the use of the named 
recipients. If you are not the intended recipient you must not use, disclose, 
copy or distribute this email or any of its attachments and should notify the 
sender immediately and delete this email from your system. UK Research and 
Innovation (UKRI) has taken every reasonable precaution to minimise risk of 
this email or any attachments containing viruses or malware but the recipient 
should carry out its own virus and malware checks before opening the 
attachments. UKRI does not accept any liability for any losses or damages which 
the recipient may sustain due to presence of any viruses.




--
Mit freundlichen Grüssen
*i. A. Thomas Schweikle*
Endgeräte und Servicedesk | Devices and Servicedesk

—
Bundesamt für Strahlenschutz | Federal Office for Radiation Protection
Informationstechnik | Information Technology | DO 3
Ingolstädter Landstrasse 1
85764 Oberschleißheim

Tel.: +49 30 18333-2594
E-Mail: tschwei...@bfs.de 

Wenn möglich signieren und verschlüsseln Sie ihre Mail mit
GnuPG oder einem äquivalenten Produkt. Der öffentliche
Schlüssel für die Verschlüsselung ist angehängt (*.asc-Datei).

—
 Besuchen  Sie unsere Website und abonnieren
 Sie unseren  Newsletter
.
 Informationen zum Datenschutz  gemäß
Artikel 13 DSGVO
 E-Mail drucken? Lieber die Umwelt schonen!



OpenPGP_0x27AE2304B4974851.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


RE: [EXTERNAL] Re: mkfifo: cannot set permissions of 'x.fifo': Not a directory

2023-08-22 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> FIFOs which don't make *any* sense
> ... FWIW, a remote NFS fileystem.

I got an impression that the OP is trying to deploy something (maybe the entire 
Cygwin) onto an NFS share.  So the named FIFO "file" is also created in there.

It's pointless to assume that the FIFO can be used as a communication device 
between the hosts that can mount the share, but it can be quite feasible to 
envision a scenario, in which the same host opens the FIFO located on the share 
from two processes and establish the communication using that special "file" 
(which is basically a special data-less i-node).

Anton Lavrentiev
Contractor NIH/NLM/NCBI


-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


lualatex and zlib

2023-08-22 Thread Per Larsson via Cygwin



Everything now works as expected after the texlive update, thanks!


-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Virus Total scan

2023-08-22 Thread Dom Woods - BGS via Cygwin
Hi Cygwin,

I scanned your application through Virus Total as per our company policy and 
noticed that the installation process calls out to a suspicious Microsoft IP 
13.107.4.50, this ip has been flagged by 8 vendors as malicious, I get varying 
responses for what it is used for (an os updater or a file distributer) and 
wanted to ask what does Cygwin use it for? I can't seem to contact it with 
nslookup or ping it and Virus Total says that it gives a 'status 400' results 
so it might not be in use anymore anyway but just wanted to check.

Here is your Virus Total graph results: 
https://www.virustotal.com/graph/6bad4555154b3b348d1bfb633a2e9d6086aa46e36952f456a434ecef5b0010e0
Here is the scan of the IP address' results: 
https://www.virustotal.com/gui/url/3397a00da1c5aa448611892c12d38fee37fcd60321720a6e242cb0167e381901/detection


Kind regards,
Dom woods




This email and any attachments are intended solely for the use of the named 
recipients. If you are not the intended recipient you must not use, disclose, 
copy or distribute this email or any of its attachments and should notify the 
sender immediately and delete this email from your system. UK Research and 
Innovation (UKRI) has taken every reasonable precaution to minimise risk of 
this email or any attachments containing viruses or malware but the recipient 
should carry out its own virus and malware checks before opening the 
attachments. UKRI does not accept any liability for any losses or damages which 
the recipient may sustain due to presence of any viruses.


-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple