Re: cygwin utils can access directory and its contents, but W10 utils claim to have no access, why?

2024-04-02 Thread John Ruckstuhl via Cygwin
On Mon, Jan 22, 2024 at 10:59 AM John Ruckstuhl
 wrote:
>
> Thanks for the replies Brian & Corinna, I learned a lot.
>
> On Mon, Jan 22, 2024 at 1:48 AM Corinna Vinschen
>  wrote:
> > Users in the Administrators group have these privileges in their user
> > token.  Under UAC, both privileges are removed from the token.  In an
> > elevated shell, though, both privileges are present.
> >
> > The funny thing here is this: While both privileges are present in the
> > token, they are disabled by default.
> >
> > They have to be enabled explicitely before you can exercise the
> > privileges.  Usually you do this in the same application
> > programatically.
>
> Now I see...
> Local administrator Bob reports his User Access Token info
> (with Windows whoami, not cygwin whoami)
> C:\>whoami /priv
>
> PRIVILEGES INFORMATION
> --
>
> Privilege Name... State
> = ... 
>   ...
>   SeBackupPrivilege ... Disabled
>   SeRestorePrivilege... Disabled
>   ...
>
>   C:\>
>
> Thanks very much.
> John Ruckstuhl

The clue about UAT and disabled privileges was crucial.
Thank you again, Corinna.

I'm still doing my cleanup with ordinary Python (not the Cygwin Python
linked to the cygwin dll).
But I wrote an EnablePrivilege function to enable the privs if if necessary.
Best regards,
John Ruckstuhl

  1 """
  2 This module exports functions for removing old files and directories.
  3
  4 Functions
  5 myremove -- Remove the file or dir, and return the number
of bytes freed.
  6 """
  7
  8 # standard library imports
  9 import logging
 10 import os
 11 import shutil
 12 import subprocess
 13
 14 # related third party imports
 15 import win32api
 16 import win32security
 17
 18 # no local application/library specific imports
 19
 20
 21 logger = logging.getLogger(__name__)
 22
 23 # this custom startupinfo is used to suppress display of the
subprocess window
 24 startupinfo = subprocess.STARTUPINFO()
 25 startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
 26
 27
 28 def _remove(path):
 29 """Remove the file or dir, and return the number of bytes freed."""
 30
 31 ...
 32
 33
 34 def myremove(path):
 35 """Remove the file or dir, and return the number of bytes freed.
 36
 37 Attempt removal different ways, until successful (or defeated).
 38
 39 1.  Attempt call _remove (without additional prep).
 40 2.  Attempt to enable privileges SeBackupPrivilege and
 41 SeRestorePrivilege, then call _remove.
 42 3.  Attempt to takeown, then call _remove.
 43
 44 The enable privileges approach is ~6x faster than the
takeown approach,
 45 because takeown of an MEI dir containing ~1K files takes
time (8-9 sec).
 46
 47 Example results, enable privs approach
 48 MEI dirs: 113/113 removed, 2047.5 MB recovered in 2.0 minutes
 49
 50 Example results, takeown approach
 51 MEI dirs: 126/126 removed, 2453.8 MB recovered in 15.0 minutes
 52
 53 By default, the User Access Token for a member of local group
 54 Administrators has the privileges SeBackupPrivilege and
SeRestorePrivilege,
 55 but they are disabled.
 56
 57 The MEI dirs are typically ~1000 files occupying ~20 MB.
 58 The MEI dirs are created by users running the pyinstaller -generated
 59 executables ...
 60
 61 Presumably the process that calls this function is run as a user
 62 which is a member of local group "Administrators".  So
this process will
 63 have privileges SeBackupPrivilege and SeRestorePrivilege granted but
 64 disabled.  Also this process will be able to take
ownership, if needed.
 65 """
 66
 67 logger.debug('%s(%r)', 'myremove', path)
 68
 69 # first try, attempt _remove
 70 try:
 71 logger.debug('%s(%r)', '_remove', path)
 72 nbytes = _remove(path)
 73 return nbytes
 74 except WindowsError as e:
 75 if e.args == (5, 'Access is denied'):
 76 # report the exception and carry on to next attempt
 77 logger.debug(e)
 78 else:
 79 # re-raise any other WindowsError
 80 raise
 81
 82 # second try, attempt enable privs then _remove
 83 try:
 84 logger.debug('%s(%r)', '_remove', path)
 85 

Re: How can I get the group SID for a file in cmd.exe (powershell is not an option)?

2024-03-03 Thread Cedric Blancher via Cygwin
On Tue, 27 Feb 2024 at 16:07, Corinna Vinschen via Cygwin
 wrote:
>
> On Feb 27 15:41, Cedric Blancher via Cygwin wrote:
> > Good afternoon!
> >
> > How can I get the group SID for a file in cmd.exe (powershell is not an 
> > option)?
> > Is it possible to add an option to ls -l to list the user/group SIDs too?
>
> No, but you can use Cygwin tools:
>
>  getent -w group $(ls -gn foo | awk '{print $3}') | awk -F: '{print $4}'

I need the exact Windows SID strings, without intermediate
translation. It's for a test suite written in cmd.exe (whoever had
that idea, but I do not have the resources to rewrite it).

Ced
-- 
Cedric Blancher 
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

-- 
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: How can I get the group SID for a file in cmd.exe (powershell is not an option)?

2024-03-03 Thread Cedric Blancher via Cygwin
On Tue, 27 Feb 2024 at 23:27, Bill Stewart via Cygwin  wrote:
>
> On Tue, Feb 27, 2024 at 7:42 AM Cedric Blancher wrote:
>
> How can I get the group SID for a file in cmd.exe (powershell is not an
> > option)?
> >
>
> Why is PowerShell not an option?

It's for a test suite written in cmd.exe (whoever had that idea, but I
do not have the resources to rewrite it).

Ced
-- 
Cedric Blancher 
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

-- 
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: How can I get the group SID for a file in cmd.exe (powershell is not an option)?

2024-02-29 Thread Bill Stewart via Cygwin
On Thu, Feb 29, 2024 at 7:50 AM Andrey Repin wrote:

> (I ask because PowerShell has been a built-in part of the Windows since
> > Windows 7--that's over 14 years ago as I write this.)
>
> Since Windows XP.
>

You must not be remembering correctly. PowerShell wasn't a built-in part of
Windows until Windows 7.

https://serverfault.com/questions/615275/

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: How can I get the group SID for a file in cmd.exe (powershell is not an option)?

2024-02-29 Thread Andrey Repin via Cygwin
Greetings, Bill Stewart!

> On Tue, Feb 27, 2024 at 7:42 AM Cedric Blancher wrote:

> How can I get the group SID for a file in cmd.exe (powershell is not an
>> option)?
>>

> Why is PowerShell not an option?

> (I ask because PowerShell has been a built-in part of the Windows since
> Windows 7--that's over 14 years ago as I write this.)

Since Windows XP.


-- 
With best regards,
Andrey Repin
Thursday, February 29, 2024 17:38:13

Sorry for my terrible english...

-- 
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: How can I get the group SID for a file in cmd.exe (powershell is not an option)?

2024-02-27 Thread Bill Stewart via Cygwin
On Tue, Feb 27, 2024 at 7:42 AM Cedric Blancher wrote:

How can I get the group SID for a file in cmd.exe (powershell is not an
> option)?
>

Why is PowerShell not an option?

(I ask because PowerShell has been a built-in part of the Windows since
Windows 7--that's over 14 years ago as I write this.)

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: How can I get the group SID for a file in cmd.exe (powershell is not an option)?

2024-02-27 Thread Corinna Vinschen via Cygwin
On Feb 27 15:41, Cedric Blancher via Cygwin wrote:
> Good afternoon!
> 
> How can I get the group SID for a file in cmd.exe (powershell is not an 
> option)?
> Is it possible to add an option to ls -l to list the user/group SIDs too?

No, but you can use Cygwin tools:

 getent -w group $(ls -gn foo | awk '{print $3}') | awk -F: '{print $4}'


Corinna

-- 
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


How can I get the group SID for a file in cmd.exe (powershell is not an option)?

2024-02-27 Thread Cedric Blancher via Cygwin
Good afternoon!

How can I get the group SID for a file in cmd.exe (powershell is not an option)?
Is it possible to add an option to ls -l to list the user/group SIDs too?

Ced
-- 
Cedric Blancher 
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

-- 
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: Can util-linux 2.33.1-3 come out of [test] ?

2024-02-05 Thread Mark Geisert via Cygwin

On 2/2/2024 3:52 AM, Bruce Jerrick via Cygwin wrote:

util-linux 2.33.1-3 depends on cygwin >= 3.5.0 .  The latter has come
out of test, so can util-linux 2.33.1-3 also come out of test?


Done. Note that this means if you select util-linux 2.33.1-3 for 
installation, your Cygwin version will also be upgraded to 3.5.0 unless 
you take measures to prevent it in your setup interactions.


..mark


--
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


Can util-linux 2.33.1-3 come out of [test] ?

2024-02-02 Thread Bruce Jerrick via Cygwin
util-linux 2.33.1-3 depends on cygwin >= 3.5.0 .  The latter has come
out of test, so can util-linux 2.33.1-3 also come out of test?

-- 
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: cygwin utils can access directory and its contents, but W10 utils claim to have no access, why?

2024-01-22 Thread John Ruckstuhl via Cygwin
Thanks for the replies Brian & Corinna, I learned a lot.

On Mon, Jan 22, 2024 at 1:48 AM Corinna Vinschen
 wrote:
> Users in the Administrators group have these privileges in their user
> token.  Under UAC, both privileges are removed from the token.  In an
> elevated shell, though, both privileges are present.
>
> The funny thing here is this: While both privileges are present in the
> token, they are disabled by default.
>
> They have to be enabled explicitely before you can exercise the
> privileges.  Usually you do this in the same application
> programatically.

Now I see...
Local administrator Bob reports his User Access Token info
(with Windows whoami, not cygwin whoami)
C:\>whoami /priv

PRIVILEGES INFORMATION
--

Privilege Name... State
= ... 
  ...
  SeBackupPrivilege ... Disabled
  SeRestorePrivilege... Disabled
  ...

  C:\>

Thanks very much.
John Ruckstuhl

-- 
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: cygwin utils can access directory and its contents, but W10 utils claim to have no access, why?

2024-01-22 Thread Corinna Vinschen via Cygwin
On Jan 21 22:18, John Ruckstuhl via Cygwin wrote:
> I am seeing a weird phenomenon, hopefully someone can illuminate and teach.
> Or point me to an archived thread.
> 
> I have some folders that Cygwin utils can readily access,
> but W10 utils claim to have no access to.
> It feels as if
> *   the Cygwin utils try to do what they are commanded to do, and it's
> up to the OS to refuse if the ACLs are insufficient.
> *   the W10 utils are written to decline to attempt access, due to some
> convention or gentlemen's agreement (built into some API?).
> But wouldn't that lead Windows users to a false sense of protection, a
> false sense of security?

No, this has nothing to do with security, just with a weird concept
of user privileges.

Here's what happens:

> And (for Local Administrator Bob) no impediment to removing them, for example,
> $ rm -r _MEI21282
> (success!)
> 
> BUT Windows utils run by Bob the Administrator on the remaining dir
> are blocked, like this

As you know, a "root" user on a Unix system has the right to ignore file
permissions.

That's why root users often have "rm" aliased to "rm -i" :)

Windows OTOH manages so called user privileges stored in the user's
access token.  One of these privileges is the right to ignore
permissions while reading (SE_BACKUP_PRIVILEGE), another privilege is
the right to set the ACL of a file to arbitrary permissions
(SE_RESTORE_PRIVILEGE).  These are the two privileges covering what a
"root" user can do to files.  As the names of these privileges suggest,
they were originally thought of privileges you only need for backup
tools.

Users in the Administrators group have these privileges in their user
token.  Under UAC, both privileges are removed from the token.  In an
elevated shell, though, both privileges are present.

The funny thing here is this: While both privileges are present in the
token, they are disabled by default.

They have to be enabled explicitely before you can exercise the
privileges.  Usually you do this in the same application
programatically.

Apart from backup tool, standard Windows tools practically *never*
enable these privileges, so they fail in various circumstances.  For
instance, a standard "del" in the CMD shell is not able to delete a file
even as administrator, if the file permissions don't allow delete access
for the Administrators group.

That's when you have to "take ownership" in the GUI as a last resort.
In NT4 times, even that had a good chance to fail for some reason I
never understood, back in the days.

However, since this concept is pretty weird and not a Unix concept, the
Cygwin DLL enables both privileges by default right at process startup.
If the privileges are not in the user token, nothing happens.  But if
the privileges are present, as for an elevated process of a user in the
Administrators group, then they will be enabled, and you're a "root"
user in the Unix sense.  And then it's "alias rm = rm -i" time again ;)


HTH,
Corinna

-- 
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: cygwin utils can access directory and its contents, but W10 utils claim to have no access, why?

2024-01-21 Thread Brian Inglis via Cygwin

On 2024-01-21 23:18, John Ruckstuhl via Cygwin wrote:

I am seeing a weird phenomenon, hopefully someone can illuminate and teach.
Or point me to an archived thread.

I have some folders that Cygwin utils can readily access,
but W10 utils claim to have no access to.
It feels as if
*   the Cygwin utils try to do what they are commanded to do, and it's
 up to the OS to refuse if the ACLs are insufficient.
*   the W10 utils are written to decline to attempt access, due to some
 convention or gentlemen's agreement (built into some API?).
But wouldn't that lead Windows users to a false sense of protection, a
false sense of security?

Environment
*   Cygwin 3.4.9-1 on W10.  64-bit.
*   UAC is not active (based on EnableLUA=0 at boot)

I have a 3rd-party program “yabba” that many different users run (on the
same shared PC).
It leaves behind a “temporary” dir (under
C:/Users/username/AppData/Local/Temp), each time it’s run.
Many times per day.
These dirs are approx. 1000 files and 20 MB.
The 3rd-party program is an exe-file compiled with pyinstaller.
It unpacks a python script and a python interpreter, and runs the python
script.
But in our workflow, we usually terminate the execution brutally, so the
pyinstaller cleanup does not happen, leaving the 20 MB behind.

I want Bob, a member of the local group Administrators, to remove these folders.

For example, ordinary user Alice runs yabba a couple of times and leaves
behind 20 MB  in each of
 C:/Users/Alice/AppData/Local/Temp/_MEI21002
 C:/Users/Alice/AppData/Local/Temp/_MEI21282

Now for Local Administrator Bob, no impediment seeing these two dirs...
 $ cd C\:/Users/Alice/AppData/Local/Temp
 $ D1=_MEI21002
 $ D2=_MEI21282
 $ du -sh $D1 $D2
 21M _MEI21002
 21M _MEI21282
 $ for D in $D1 $D2; do printf "%s\t%s\n" $D "$(find "$D" -mindepth
1 -type d -printf "dirs\n" -o -printf "files\n" | sort | uniq -c |
paste - -)"; done
 _MEI2100234 dirs940 files
 _MEI2128233 dirs929 files
 $ getfacl $D1 $D2
 # file: _MEI21002
 # owner: Alice
 # group: Domain Users
 user::rwx
 group::---
 group:OWNER RIGHTS:rwx
 mask::rwx
 other::---


 # file: _MEI21282
 # owner: Alice
 # group: Domain Users
 user::rwx
 group::---
 group:OWNER RIGHTS:rwx
 mask::rwx
 other::---

And (for Local Administrator Bob) no impediment to removing them, for example,
 $ rm -r _MEI21282
(success!)

BUT Windows utils run by Bob the Administrator on the remaining dir
are blocked, like this
(cmd, "Run as administrator"):
 C:\Users\Alice\AppData\Local\Temp>dir _MEI21002
 Volume in drive C is OSDisk
 Volume Serial Number is 581C-10F2

 Directory of C:\Users\Alice\AppData\Local\Temp\_MEI21002

 File Not Found

 C:\Users\Alice\AppData\Local\Temp>icacls _MEI21002
 _MEI21002: Access is denied.
 Successfully processed 0 files; Failed processing 1 files

As a consequence, Windows utils run by Bob the Administrator cannot
delete Alice's directory.  Until they do a takeown.

The first try to delete fails:
 C:\Users\Alice\AppData\Local\Temp>del /S /Q _MEI21002
 Could Not Find C:\Users\Alice\AppData\Local\Temp\_MEI21002\*

But a takeown succeeds
 C:\Users\Alice\AppData\Local\Temp>takeown /A /F _MEI21002 /R /D Y

Now icacls has access
 C:\Users\Alice\AppData\Local\Temp>icacls _MEI21002
 _MEI21002 BUILTIN\Administrators:(OI)(IO)(F)
   BUILTIN\Administrators:(CI)(F)

 Successfully processed 1 files; Failed processing 0 files

And the second try to delete succeeds
 C:\Users\Alice\AppData\Local\Temp>del /S /Q _MEI21002

In summary, why is it that Bob the Administrator can Cygwin "rm.exe" to
delete these folders without taking ownership, but to delete with
Windows utils, he needs to take ownership first?


I normally find the problem is that a directory has no useful Windows DACLs 
defined, so directories or files created in it by Cygwin programs are not 
accessible to Windows programs.
It seems to me, that when Cygwin creates directories or files in those 
directories, they have no Windows ACLs defaulted, but they seem to look fine to 
Cygwin's assumed POSIX permissions, as if on FAT drives?

Better explanations would be welcome.

For directories, run:

$ lsattr -adl   $D
$ ls -adlL  $D
$ getfacl   $D
$ icalcs "$(cygpath -m "$D")"

and for files, skip lsattr.

This should show you all the views of permissions you need to figure out the 
issue.

--
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 

cygwin utils can access directory and its contents, but W10 utils claim to have no access, why?

2024-01-21 Thread John Ruckstuhl via Cygwin
I am seeing a weird phenomenon, hopefully someone can illuminate and teach.
Or point me to an archived thread.

I have some folders that Cygwin utils can readily access,
but W10 utils claim to have no access to.
It feels as if
*   the Cygwin utils try to do what they are commanded to do, and it's
up to the OS to refuse if the ACLs are insufficient.
*   the W10 utils are written to decline to attempt access, due to some
convention or gentlemen's agreement (built into some API?).
But wouldn't that lead Windows users to a false sense of protection, a
false sense of security?

Environment
*   Cygwin 3.4.9-1 on W10.  64-bit.
*   UAC is not active (based on EnableLUA=0 at boot)

I have a 3rd-party program “yabba” that many different users run (on the
same shared PC).
It leaves behind a “temporary” dir (under
C:/Users/username/AppData/Local/Temp), each time it’s run.
Many times per day.
These dirs are approx. 1000 files and 20 MB.
The 3rd-party program is an exe-file compiled with pyinstaller.
It unpacks a python script and a python interpreter, and runs the python
script.
But in our workflow, we usually terminate the execution brutally, so the
pyinstaller cleanup does not happen, leaving the 20 MB behind.

I want Bob, a member of the local group Administrators, to remove these folders.

For example, ordinary user Alice runs yabba a couple of times and leaves
behind 20 MB  in each of
C:/Users/Alice/AppData/Local/Temp/_MEI21002
C:/Users/Alice/AppData/Local/Temp/_MEI21282

Now for Local Administrator Bob, no impediment seeing these two dirs...
$ cd C\:/Users/Alice/AppData/Local/Temp
$ D1=_MEI21002
$ D2=_MEI21282
$ du -sh $D1 $D2
21M _MEI21002
21M _MEI21282
$ for D in $D1 $D2; do printf "%s\t%s\n" $D "$(find "$D" -mindepth
1 -type d -printf "dirs\n" -o -printf "files\n" | sort | uniq -c |
paste - -)"; done
_MEI2100234 dirs940 files
_MEI2128233 dirs929 files
$ getfacl $D1 $D2
# file: _MEI21002
# owner: Alice
# group: Domain Users
user::rwx
group::---
group:OWNER RIGHTS:rwx
mask::rwx
other::---


# file: _MEI21282
# owner: Alice
# group: Domain Users
user::rwx
group::---
group:OWNER RIGHTS:rwx
mask::rwx
other::---

And (for Local Administrator Bob) no impediment to removing them, for example,
$ rm -r _MEI21282
(success!)

BUT Windows utils run by Bob the Administrator on the remaining dir
are blocked, like this
(cmd, "Run as administrator"):
C:\Users\Alice\AppData\Local\Temp>dir _MEI21002
Volume in drive C is OSDisk
Volume Serial Number is 581C-10F2

Directory of C:\Users\Alice\AppData\Local\Temp\_MEI21002

File Not Found

C:\Users\Alice\AppData\Local\Temp>icacls _MEI21002
_MEI21002: Access is denied.
Successfully processed 0 files; Failed processing 1 files

As a consequence, Windows utils run by Bob the Administrator cannot
delete Alice's directory.  Until they do a takeown.

The first try to delete fails:
C:\Users\Alice\AppData\Local\Temp>del /S /Q _MEI21002
Could Not Find C:\Users\Alice\AppData\Local\Temp\_MEI21002\*

But a takeown succeeds
C:\Users\Alice\AppData\Local\Temp>takeown /A /F _MEI21002 /R /D Y

Now icacls has access
C:\Users\Alice\AppData\Local\Temp>icacls _MEI21002
_MEI21002 BUILTIN\Administrators:(OI)(IO)(F)
  BUILTIN\Administrators:(CI)(F)

Successfully processed 1 files; Failed processing 0 files

And the second try to delete succeeds
C:\Users\Alice\AppData\Local\Temp>del /S /Q _MEI21002

In summary, why is it that Bob the Administrator can Cygwin "rm.exe" to
delete these folders without taking ownership, but to delete with
Windows utils, he needs to take ownership first?

Thanks for teaching,
John Ruckstuhl

-- 
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


setup-x86_64.exe can not create download folder

2023-06-29 Thread David Balažic via Cygwin
Hi!

 I just downloaded https://www.cygwin.com/setup-x86_64.exe   version 2.925

After starting, I:
 - selected "Install from Internet" (actually it was already selected)
 - left defaults: root dir=C:\cygwin64 , Install For: all users
 - the Local Package Directory was: C:\Users\AdminGuy\Downloads\
   I added cygwin_download_temp to it to get:
C:\Users\AdminGuy\Downloads\cygwin_download_temp

After clicking I got an error dialog:

---
Cygwin Setup
---
Directory C:\Users\AdminGuy\Downloads\cygwin_download_temp does not
exist, would you like me to create it?
---
Yes   No
---

I clicked Yes and got an error that it could not create the directory.
So I created the folder in Explorer and then continued.

Notes: I tried to reproduce it in a second instance of
setup-x86_64.exe but could not, it created the folder without a
problem.

So I closed (clicked the Cancel button) both instances and run it
again, and I could reproduce the problem. After changing the local
path, I pressed the enter key instead of clicking next. The in the
error dialog asking to create the folder, I pressed space. Then I got
the dialog:

---
Cygwin Setup
---
Couldn't create directory , sorry.  (Is drive full or read-only?)
---
OK
---


Very strange, sometimes clicking Yes in the "would you like me to
create it" dialog just brings up the same dialog again and again,
until a few iterations is shows the "Couldn't create directory ,
sorry." dialog.

Can be workarounded, but a bit annoying.

OS: Windows Server 2019 version 1809

When I start setup-x86_64.exe the UAC dialog pops up where I click Yes.

Regards,
David

-- 
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: Can not stat file with utf char U+F020

2023-04-19 Thread Gionatan Danti via Cygwin

Il 2023-04-19 03:10 L A Walsh ha scritto:

I'm a bit confused as to what char you are trying to access/use, as
U+F020 is in the Private Use area (PUA)

Since it's in the PUA, it seems its meaning could differ by
application/OS/User, no?
I.e. have no set definition

I mean you can use it in Cygwin to represent some character not
usually permitted in
a DOS/Win filename (like :/\, etc.), but it wouldn't have the same 
meaning then

in Windows though.?  Isn't Private Use area application specific so an
application can
create and use its own symbol set -- even though it wouldn't be
portable to another application.


The issue is with any clients/applications (even cygwin) creating a 
filename ending with a dot (or other chars) which is replaced with 
U+F020. If this file is later renamed adding some other character 
*after* the replaced dot, it become unreadable by cygwin.


Something similar to that:
- an user create a file name "project.", forgetting the extension, on an 
Windows share;

- the client replace the dot with U+F020;
- at this point all is good: the file can be read by the client, Windows 
and cygwin;
- the user notice the missing extension and rename the file in 
"project.txt";
- cygwin now does *not* traslate back U+F020 to dot and it is unable to 
read the file.



I think characters in the PUA range are used to allow Cygwin filenames
to contain colon, slashes
and quotes -- so one wouldn't want Windows to understand the cygwin
intent or it would defeat
the purpose of using custom characters to represent filenames that are
legal under POSIX but not
under Windows.


True, but dot and spaces are somewhat different from the other reserved 
chars. While backslash, colons, etc. are rejected by NTFS itself (or by 
lower layer API), trailing dot and spaces are ignored/stripped by Win32. 
This means that Linux clients accessing an SMB share *can* successfully 
create such filenames without any issue and without replacing them with 
PUA chars.


For example, I created a file called "zzz." from a Linux+Mate client. 
Cygwin correctly see the filename as:

$ ls "zzz." | od -x --endian=big
000 7a7a 7a2e 0a00

True, Windows can not access this file, but this is fine because such a 
filename should never be understood by Windows. Not being able to open 
the file from Windows, its users themselves will find and correct the 
issue, renaming the file.


As things are now, we have the opposite issue: should (for whichever 
reason) a file exist with names as "zzz[U+F020]txt", cygwin will not be 
able to access this file. This means that anyone using cygwin+rsync to 
backup a Windows server will now have an inaccessible and impossible to 
backup file.


Thinking about that: how do you feel having an option to exclude 
trailing dots and spaces from PUA translations (effectively reverting 
them to the status of "normal" characters)?


Regards.

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

--
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: Can not stat file with utf char U+F020

2023-04-18 Thread L A Walsh via Cygwin

I'm a bit confused as to what char you are trying to access/use, as
U+F020 is in the Private Use area (PUA)

Since it's in the PUA, it seems its meaning could differ by 
application/OS/User, no?

I.e. have no set definition


I mean you can use it in Cygwin to represent some character not usually 
permitted in
a DOS/Win filename (like :/\, etc.), but it wouldn't have the same 
meaning then
in Windows though.?  Isn't Private Use area application specific so an 
application can
create and use its own symbol set -- even though it wouldn't be portable 
to another application.


So if you create a character in Cygwin that maps to that area -- how 
would you expect Windows to

know that the character is and how treat it?

I think characters in the PUA range are used to allow Cygwin filenames 
to contain colon, slashes
and quotes -- so one wouldn't want Windows to understand the cygwin 
intent or it would defeat
the purpose of using custom characters to represent filenames that are 
legal under POSIX but not

under Windows.





--
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: Can not stat file with utf char U+F020

2023-04-18 Thread Gionatan Danti via Cygwin

Il 2023-04-17 15:46 Gionatan Danti via Cygwin ha scritto:

First, I use the "dos" mount option to always trigger conversion of
space and dot at filename end into F+00xx chars. Now I am able to
create such strange-looking file (in Explorer) within cygwin itself.
For example, touch "zzs " now results in "zzs+strangechar" in
Explorer. Both cygwin and windows are able to read/write such file.

But if I edit the filename via Explorer adding an extension (ie: from
"zzs+strangechar" to "zzs+strangechar.txt") now cygwin is suddenly
unable to read/write the file.

It seems to me that the appended chars prevent cygwin to translate
back F0xx to 00xx (as the PUA char is not at the end of the filename
anymore).

So, two paths should be available:
- always translate back F0xx to 00xx even if not at the end of 
filename;

- otherwise, if too invasive to do it unconditionally, add an option
as "always_translate_pua" (default: off) to enable such behavior based
on user needs.

I would (naively?) think that option 1 (always translate back PUA)
should be the preferred approach, as cygwin is at the moment
effectively unable to access some files.


Hi all,
any thoughts on the matter? Am I missing something?

Thanks.

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

--
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: Can not stat file with utf char U+F020

2023-04-17 Thread Gionatan Danti via Cygwin

Il 2023-04-17 11:05 Corinna Vinschen ha scritto:

It's actually not the "dos" mount option but specific filesystems
which trigger the conversion from U+0020 to U+F020.


OK.


However, the conversion back is handled in a piece of code which has
no information about the underlying filesystem, so the F0xx -> 00xx
conversion is done all the time.  Adding filesystem info in this
place is really tricky.


Ah, I missed it, thanks! With these new information, I did some 
progress.


First, I use the "dos" mount option to always trigger conversion of 
space and dot at filename end into F+00xx chars. Now I am able to create 
such strange-looking file (in Explorer) within cygwin itself. For 
example, touch "zzs " now results in "zzs+strangechar" in Explorer. Both 
cygwin and windows are able to read/write such file.


But if I edit the filename via Explorer adding an extension (ie: from 
"zzs+strangechar" to "zzs+strangechar.txt") now cygwin is suddenly 
unable to read/write the file.


It seems to me that the appended chars prevent cygwin to translate back 
F0xx to 00xx (as the PUA char is not at the end of the filename 
anymore).


So, two paths should be available:
- always translate back F0xx to 00xx even if not at the end of filename;
- otherwise, if too invasive to do it unconditionally, add an option as 
"always_translate_pua" (default: off) to enable such behavior based on 
user needs.


I would (naively?) think that option 1 (always translate back PUA) 
should be the preferred approach, as cygwin is at the moment effectively 
unable to access some files.


Regards.

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

--
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: Can not stat file with utf char U+F020

2023-04-17 Thread Andrey Repin via Cygwin
Greetings, Corinna Vinschen via Cygwin!

> On Apr 17 07:36, Gionatan Danti via Cygwin wrote:
>> Il 2023-04-14 23:01 Gionatan Danti via Cygwin ha scritto:
>> > Il 2023-04-14 22:25 Corinna Vinschen via Cygwin ha scritto:
>> > > We do that.  You're just stumbling over tha fact that U+F020 is also
>> > > used as outlined in
>> > > https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
>> > > and https://cygwin.com/pipermail/cygwin/2023-April/253478.html
>> > 
>> > Ah, so spaces and dots are replaced respectively by U+F020 and U+F02E
>> > even without the "dos" mount option?
>> > Because I can not see it in my case of an NTFS filesystem with the
>> > following mount options: binary,posix=0,user,noumount,auto
>> 
>> Hi all,
>> it's not clear to me why even without the "dos" mount option both space and
>> dot are replaced by U+F020 and U+F02E, preventing U+F020 passthrough.
>> 
>> Am I missing something?

> It's actually not the "dos" mount option but specific filesystems
> which trigger the conversion from U+0020 to U+F020.

> However, the conversion back is handled in a piece of code which has
> no information about the underlying filesystem, so the F0xx -> 00xx
> conversion is done all the time.  Adding filesystem info in this
> place is really tricky.

My understanding is that on Windows, a regular file name can't start or end
with space, and can't end with dot.
There's ways to game this rule, but in simple cases this is how it works for
most part.
If a similar rule can be crafted for filesystems under discussion, that could
simplify the problem.


-- 
With best regards,
Andrey Repin
Monday, April 17, 2023 13:53:57

Sorry for my terrible english...


-- 
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: Can not stat file with utf char U+F020

2023-04-17 Thread Corinna Vinschen via Cygwin
On Apr 14 23:10, Brian Inglis via Cygwin wrote:
> On 2023-04-14 14:17, Gionatan Danti via Cygwin wrote:
> > Il 2023-04-14 21:00 Corinna Vinschen ha scritto:
> > > There's no (good) solution from inside Cygwin.
> 
> > Yeah, I can only imagine how difficult is to be compatible with posix,
> > win32 and the likes.
> 
> > > Any chance you can just rename the files?
> 
> > I renamed the files, in fact.
> > However, it seems that users working with (older?) Office for MAC use
> > U+F020 more frequently than I expected, maybe because of that [1]:
> > "Microsoft's defunct Services For Macintosh feature used U+F001 through
> > U+F029 as replacements for special characters allowed in HFS but
> > forbidden in NTFS, and U+F02A for the Apple logo."
> > Any chances to enable a "bypass" for these characters (excluding the one
> > you reserved for compatibility as explained detailed in the "Forbidden
> > characters in filenames")? Maybe hidden behind a configurable option
> > (even disabled by default), so to not interfere with the current
> > behavior?
> 
> > [1] https://en.wikipedia.org/wiki/Private_Use_Areas#Vendor_use
> 
> Now if MS SfM and Cygwin had both registered with U/CSUR, they would not be
> fighting over Unicode code points, although it looks like there is a lot of
> competition for the code points! ;^>
> 
> Would it make more sense to add custom file name character filters into some
> utility, such as unix2dos/mac2unix, cygpath, or some other, and add
> (Cyg)win, or create such a utility, so those could be added to processes?

Adding this to some utility would make more sense than adding another
complication into the Cygwin codebase to support really old stuff.


Corinna

-- 
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: Can not stat file with utf char U+F020

2023-04-17 Thread Corinna Vinschen via Cygwin
On Apr 17 07:36, Gionatan Danti via Cygwin wrote:
> Il 2023-04-14 23:01 Gionatan Danti via Cygwin ha scritto:
> > Il 2023-04-14 22:25 Corinna Vinschen via Cygwin ha scritto:
> > > We do that.  You're just stumbling over tha fact that U+F020 is also
> > > used as outlined in
> > > https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
> > > and https://cygwin.com/pipermail/cygwin/2023-April/253478.html
> > 
> > Ah, so spaces and dots are replaced respectively by U+F020 and U+F02E
> > even without the "dos" mount option?
> > Because I can not see it in my case of an NTFS filesystem with the
> > following mount options: binary,posix=0,user,noumount,auto
> 
> Hi all,
> it's not clear to me why even without the "dos" mount option both space and
> dot are replaced by U+F020 and U+F02E, preventing U+F020 passthrough.
> 
> Am I missing something?

It's actually not the "dos" mount option but specific filesystems
which trigger the conversion from U+0020 to U+F020.

However, the conversion back is handled in a piece of code which has
no information about the underlying filesystem, so the F0xx -> 00xx
conversion is done all the time.  Adding filesystem info in this
place is really tricky.


Corinna

-- 
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: Can not stat file with utf char U+F020

2023-04-16 Thread Gionatan Danti via Cygwin

Il 2023-04-14 23:01 Gionatan Danti via Cygwin ha scritto:

Il 2023-04-14 22:25 Corinna Vinschen via Cygwin ha scritto:

We do that.  You're just stumbling over tha fact that U+F020 is also
used as outlined in
https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
and https://cygwin.com/pipermail/cygwin/2023-April/253478.html


Ah, so spaces and dots are replaced respectively by U+F020 and U+F02E
even without the "dos" mount option?
Because I can not see it in my case of an NTFS filesystem with the
following mount options: binary,posix=0,user,noumount,auto


Hi all,
it's not clear to me why even without the "dos" mount option both space 
and dot are replaced by U+F020 and U+F02E, preventing U+F020 
passthrough.


Am I missing something?

Thanks.

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

--
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: Can not stat file with utf char U+F020

2023-04-14 Thread Brian Inglis via Cygwin

On 2023-04-14 14:17, Gionatan Danti via Cygwin wrote:

Il 2023-04-14 21:00 Corinna Vinschen ha scritto:

There's no (good) solution from inside Cygwin.


Yeah, I can only imagine how difficult is to be compatible with posix, win32 and 
the likes.



Any chance you can just rename the files?



I renamed the files, in fact.
However, it seems that users working with (older?) Office for MAC use U+F020 
more frequently than I expected, maybe because of that [1]:
"Microsoft's defunct Services For Macintosh feature used U+F001 through U+F029 
as replacements for special characters allowed in HFS but forbidden in NTFS, and 
U+F02A for the Apple logo."
Any chances to enable a "bypass" for these characters (excluding the one you 
reserved for compatibility as explained detailed in the "Forbidden characters in 
filenames")? Maybe hidden behind a configurable option (even disabled by 
default), so to not interfere with the current behavior?



[1] https://en.wikipedia.org/wiki/Private_Use_Areas#Vendor_use


Now if MS SfM and Cygwin had both registered with U/CSUR, they would not be 
fighting over Unicode code points, although it looks like there is a lot of 
competition for the code points! ;^>


Would it make more sense to add custom file name character filters into some 
utility, such as unix2dos/mac2unix, cygpath, or some other, and add (Cyg)win, or 
create such a utility, so those could be added to processes?


--
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: Can not stat file with utf char U+F020

2023-04-14 Thread Gionatan Danti via Cygwin

Il 2023-04-14 22:25 Corinna Vinschen via Cygwin ha scritto:

We do that.  You're just stumbling over tha fact that U+F020 is also
used as outlined in
https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
and https://cygwin.com/pipermail/cygwin/2023-April/253478.html


Ah, so spaces and dots are replaced respectively by U+F020 and U+F02E 
even without the "dos" mount option?
Because I can not see it in my case of an NTFS filesystem with the 
following mount options: binary,posix=0,user,noumount,auto


Thanks.

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

--
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: Can not stat file with utf char U+F020

2023-04-14 Thread Gionatan Danti via Cygwin

Il 2023-04-14 22:40 Corinna Vinschen ha scritto:
This is really tricky.  A new mount point flag could be used to 
override

this behaviour on a per path basis.  One problem is, the unicode ->
multibyte conversion when evaluating a symlink is done before it's 
clear

where the symlink target is.  Only the string is converted and it might
be a relative path, so the code doesn't know where the target ends up.
And that's probably not all.


To tell the truth, it is such a corner (and infortunate) case that I 
would not care if the workaround does not work for symlinks.



Is it really worth to add code to support a long deprecated Windows
service?


Yeah, I understand your point. I am not in the position to evaluate if 
it would be worth.
Maybe a special case for only U+F020 (the most common "strange" char I 
see) can be considered?


Thanks.

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

--
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: Can not stat file with utf char U+F020

2023-04-14 Thread Corinna Vinschen via Cygwin
On Apr 14 22:17, Gionatan Danti via Cygwin wrote:
> Il 2023-04-14 21:00 Corinna Vinschen ha scritto:
> > There's no (good) solution from inside Cygwin.
> > [snip]
> 
> Yeah, I can only imagine how difficult is to be compatible with posix, win32
> and the likes.
> 
> > Any chance you can just rename the files?
> 
> I renamed the files, in fact.
> 
> However, it seems that users working with (older?) Office for MAC use U+F020
> more frequently than I expected, maybe because of that [1]:
> 
> "Microsoft's defunct Services For Macintosh feature used U+F001 through
> U+F029 as replacements for special characters allowed in HFS but forbidden
> in NTFS, and U+F02A for the Apple logo."

Drat.  This is kind of sick.  At the same time, Interix used the
U+F0xx area as we do.  That's why I chose this area, to be filename
compatible with Interix.

> Any chances to enable a "bypass" for these characters (excluding the one you
> reserved for compatibility as explained detailed in the "Forbidden
> characters in filenames")? Maybe hidden behind a configurable option (even
> disabled by default), so to not interfere with the current behavior?

This is really tricky.  A new mount point flag could be used to override
this behaviour on a per path basis.  One problem is, the unicode ->
multibyte conversion when evaluating a symlink is done before it's clear
where the symlink target is.  Only the string is converted and it might
be a relative path, so the code doesn't know where the target ends up.
And that's probably not all.

Is it really worth to add code to support a long deprecated Windows
service?


Corinna

-- 
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: Can not stat file with utf char U+F020

2023-04-14 Thread Corinna Vinschen via Cygwin
On Apr 14 22:21, Gionatan Danti via Cygwin wrote:
> Il 2023-04-14 21:54 Brian Inglis ha scritto:
> > UCSUR Under-ConScript Unicode Registry and its predecessor ConScript
> > Unicode Registry CSUR
> > 
> > https://www.kreativekorp.com/ucsur/
> > 
> > http://www.evertype.com/standards/csur/
> > 
> > unofficially register Unicode PUA glyphs for academic, artificial,
> > constructed, historical, invented, and minority language scripts, some
> > of which have made it into Unicode e.g.
> > 
> > Script  CSURUnicode
> > PHAISTOS DISC   U+E6D0-U+E6FF   U+101D0-U+101DF
> > SHAVIAN U+E700-U+E72F   U+10450-U+1047F
> > DESERET U+E830-U+E88F   U+10400-U+1044F
> > 
> > and maintain their own Unidata e.g.
> > 
> > https://www.kreativekorp.com/ucsur/UNIDATA/Blocks.txt
> > 
> > and some Unicode fonts have -CSUR addition files (like -Italic etc.)
> > that support BMP and SMP PUA glyphs.
> 
> So they are actively using PUA? I did not know that, thanks.
> 
> > For Cygwin purposes:
> > 
> > F000−F7FF   unassigned  Reserved for hacks and corporate use
> > 
> > so Cygwin's special Windows file name characters mappings are clear:
> > 
> > F022"
> > F02A*
> > F03A:
> > F03C<
> > F03E>
> > F03F?
> > F07C|
> 
> Would it be possible to "bypass" the chars in the range F000−F7FF that are
> not used/reserved by cygwin?

We do that.  You're just stumbling over tha fact that U+F020 is also
used as outlined in 
https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
and https://cygwin.com/pipermail/cygwin/2023-April/253478.html


Corinna

-- 
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: Can not stat file with utf char U+F020

2023-04-14 Thread Gionatan Danti via Cygwin

Il 2023-04-14 21:54 Brian Inglis ha scritto:

UCSUR Under-ConScript Unicode Registry and its predecessor ConScript
Unicode Registry CSUR

https://www.kreativekorp.com/ucsur/

http://www.evertype.com/standards/csur/

unofficially register Unicode PUA glyphs for academic, artificial,
constructed, historical, invented, and minority language scripts, some
of which have made it into Unicode e.g.

Script  CSURUnicode
PHAISTOS DISC   U+E6D0-U+E6FF   U+101D0-U+101DF
SHAVIAN U+E700-U+E72F   U+10450-U+1047F
DESERET U+E830-U+E88F   U+10400-U+1044F

and maintain their own Unidata e.g.

https://www.kreativekorp.com/ucsur/UNIDATA/Blocks.txt

and some Unicode fonts have -CSUR addition files (like -Italic etc.)
that support BMP and SMP PUA glyphs.


So they are actively using PUA? I did not know that, thanks.


For Cygwin purposes:

F000−F7FF   unassigned  Reserved for hacks and corporate use

so Cygwin's special Windows file name characters mappings are clear:

F022"
F02A*
F03A:
F03C<
F03E>
F03F?
F07C|


Would it be possible to "bypass" the chars in the range F000−F7FF that 
are not used/reserved by cygwin?


Regards.

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

--
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: Can not stat file with utf char U+F020

2023-04-14 Thread Corinna Vinschen via Cygwin
On Apr 14 13:54, Brian Inglis via Cygwin wrote:
> On 2023-04-14 13:00, Corinna Vinschen via Cygwin wrote:
> > On Apr 14 19:53, Gionatan Danti via Cygwin wrote:
> > > [1] https://sourceware.org/legacy-ml/cygwin/2009-11/msg00043.html
> 
> > While this patch would have fixed your problem, a later followup patch
> > broke your usage of U+F020 (space replacement) and, FWIW, of U+F02E
> > (dot replacement) again:
> > https://cygwin.com/cgit/newlib-cygwin/commit/?id=8802178fddfd
> > This was done to accomodate filesystems implementing the idiotic
> > approach to support only DOS filenames, i.e. not allowing leading or
> > trailing spaces and not allowing trailing dots. These are Netapp and
> > Novell Netware filesystems. See the last paragraph of
> > https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
> > Any chance you can just rename the files?
> 
> UCSUR Under-ConScript Unicode Registry and its predecessor ConScript Unicode
> Registry CSUR
> 
>   https://www.kreativekorp.com/ucsur/
> 
>   http://www.evertype.com/standards/csur/
> 
> unofficially register Unicode PUA glyphs for academic, artificial,
> constructed, historical, invented, and minority language scripts, some of
> which have made it into Unicode e.g.
> 
>   Script  CSURUnicode
>   PHAISTOS DISC   U+E6D0-U+E6FF   U+101D0-U+101DF
>   SHAVIAN U+E700-U+E72F   U+10450-U+1047F
>   DESERET U+E830-U+E88F   U+10400-U+1044F
> 
> and maintain their own Unidata e.g.
> 
>   https://www.kreativekorp.com/ucsur/UNIDATA/Blocks.txt
> 
> and some Unicode fonts have -CSUR addition files (like -Italic etc.) that
> support BMP and SMP PUA glyphs.
> 
> For Cygwin purposes:
> 
> F000−F7FF unassigned  Reserved for hacks and corporate use
> 
> so Cygwin's special Windows file name characters mappings are clear:
> 
For completeness sake, starting with commit 8802178fddfd:

F020
>   F022"
>   F02A*
F02E.
>   F03A:
>   F03C<
>   F03E>
>   F03F?
>   F07C|


Corinna

-- 
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: Can not stat file with utf char U+F020

2023-04-14 Thread Gionatan Danti via Cygwin

Il 2023-04-14 21:00 Corinna Vinschen ha scritto:

There's no (good) solution from inside Cygwin.
[snip]


Yeah, I can only imagine how difficult is to be compatible with posix, 
win32 and the likes.



Any chance you can just rename the files?


I renamed the files, in fact.

However, it seems that users working with (older?) Office for MAC use 
U+F020 more frequently than I expected, maybe because of that [1]:


"Microsoft's defunct Services For Macintosh feature used U+F001 through 
U+F029 as replacements for special characters allowed in HFS but 
forbidden in NTFS, and U+F02A for the Apple logo."


Any chances to enable a "bypass" for these characters (excluding the one 
you reserved for compatibility as explained detailed in the "Forbidden 
characters in filenames")? Maybe hidden behind a configurable option 
(even disabled by default), so to not interfere with the current 
behavior?


Thanks.

[1] https://en.wikipedia.org/wiki/Private_Use_Areas#Vendor_use


--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

--
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: Can not stat file with utf char U+F020

2023-04-14 Thread Brian Inglis via Cygwin

On 2023-04-14 13:00, Corinna Vinschen via Cygwin wrote:

On Apr 14 19:53, Gionatan Danti via Cygwin wrote:

I have an issue with unreadable files with contain utf char U+F020 (which
appear as "middle dot with some space after") in their name.
stat on such a file results in "no such file or directory"
 From here [1] it seems that a patch was contemplated many years ago, but I
don't know its status now.
Any ideas or workaround?



There's no (good) solution from inside Cygwin.
Keep in mind that the Unicode area from U+E000 up to U+F8FF is called
"Private Use Area".  So none of the chars are mapped into any
singlebyte, doublebyte, or multibyte charset.  Typically we don't expect
that filenames contain any of these chars, and we're only using a very
small subset of them for our own, dubious purposes anyway:
https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars



[1] https://sourceware.org/legacy-ml/cygwin/2009-11/msg00043.html



While this patch would have fixed your problem, a later followup patch
broke your usage of U+F020 (space replacement) and, FWIW, of U+F02E
(dot replacement) again:
https://cygwin.com/cgit/newlib-cygwin/commit/?id=8802178fddfd
This was done to accomodate filesystems implementing the idiotic
approach to support only DOS filenames, i.e. not allowing leading or
trailing spaces and not allowing trailing dots. These are Netapp and
Novell Netware filesystems. See the last paragraph of
https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
Any chance you can just rename the files?


UCSUR Under-ConScript Unicode Registry and its predecessor ConScript Unicode 
Registry CSUR


https://www.kreativekorp.com/ucsur/

http://www.evertype.com/standards/csur/

unofficially register Unicode PUA glyphs for academic, artificial, constructed, 
historical, invented, and minority language scripts, some of which have made it 
into Unicode e.g.


Script  CSURUnicode
PHAISTOS DISC   U+E6D0-U+E6FF   U+101D0-U+101DF
SHAVIAN U+E700-U+E72F   U+10450-U+1047F
DESERET U+E830-U+E88F   U+10400-U+1044F

and maintain their own Unidata e.g.

https://www.kreativekorp.com/ucsur/UNIDATA/Blocks.txt

and some Unicode fonts have -CSUR addition files (like -Italic etc.) that 
support BMP and SMP PUA glyphs.


For Cygwin purposes:

F000−F7FF   unassigned  Reserved for hacks and corporate use

so Cygwin's special Windows file name characters mappings are clear:

F022"
F02A*
F03A:
F03C<
F03E>
F03F?
F07C|

--
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: Can not stat file with utf char U+F020

2023-04-14 Thread Corinna Vinschen via Cygwin
On Apr 14 19:53, Gionatan Danti via Cygwin wrote:
> Dear list,
> I have an issue with unreadable files with contain utf char U+F020 (which
> appear as "middle dot with some space after") in their name.
> 
> stat on such a file results in "no such file or directory"
> 
> From here [1] it seems that a patch was contemplated many years ago, but I
> don't know its status now.
> 
> Any ideas or workaround?

There's no (good) solution from inside Cygwin.

Keep in mind that the Unicode area from U+E000 up to U+F8FF is called
"Private Use Area".  So none of the chars are mapped into any
singlebyte, doublebyte, or multibyte charset.  Typically we don't expect
that filenames contain any of these chars, and we're only using a very
small subset of them for our own, dubious purposes anyway:

https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars

> [1] https://sourceware.org/legacy-ml/cygwin/2009-11/msg00043.html

While this patch would have fixed your problem, a later followup patch
broke your usage of U+F020 (space replacement) and, FWIW, of U+F02E
(dot replacement) again:

https://cygwin.com/cgit/newlib-cygwin/commit/?id=8802178fddfd

This was done to accomodate filesystems implementing the idiotic
approach to support only DOS filenames, i. e., not allowing leading or
trailing spaces and not allowing trailing dots.  These are Netapp and
Novell Netware filesystems.  See the last paragraph of

https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars

Any chance you can just rename the files?


Corinna

-- 
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


Can not stat file with utf char U+F020

2023-04-14 Thread Gionatan Danti via Cygwin

Dear list,
I have an issue with unreadable files with contain utf char U+F020 
(which appear as "middle dot with some space after") in their name.


stat on such a file results in "no such file or directory"

From here [1] it seems that a patch was contemplated many years ago, but 
I don't know its status now.


Any ideas or workaround?
Thanks.

[1] https://sourceware.org/legacy-ml/cygwin/2009-11/msg00043.html

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

--
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: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-04 Thread Johannes Schindelin
Hi Corinna,

On Mon, 3 Apr 2023, Corinna Vinschen wrote:

> On Apr  3 15:57, Johannes Schindelin wrote:
> > On Mon, 3 Apr 2023, Corinna Vinschen wrote:
> > > > So here is what is going on:
> > > >
> > > > - The domain is 'IIS APPPOOL'
> > >
> > > There's a domain, so why not pass it to the called function?>
> >
> > Sorry, I was unclear. This domain _is_ used when looking for the uid, but
> > then we run into a code path where the UID cannot be determined (because
> > the domain of the account is not the machine name and the machine is no
> > domain member). The clause in question is here:
> > https://github.com/cygwin/cygwin/blob/cygwin-3.4.6/winsup/cygwin/uinfo.cc#L2303-L2310.
> > The Cygwin runtime then returns -1 as UID.
> >
> > The _subsequent_ call to `getpwuid(-1)` is the one where we need to teach
> > Cygwin to respect `db_home: env`. This is the code path taken by OpenSSH.
> > And that code path only has an `arg.id` to work with (the `type` is
> > `ID_arg`), and that `arg.id` is invalid. There is no domain in that code
> > path that we could possibly pass to the `get_home()` method.
>
> That makes a lot of sense.  However, wouldn't it be better to return
> some kind of valid uid, rather than working around uid -1?

It would!

> > > > - The name is the name of the Azure Web App
> > > >
> > > > - The sid is 
> > > > 'S-1-5-82-3932326390-3052311582-2886778547-4123178866-1852425102'
> > >
> > > Oh well. These are basically the same thing as 1-5-80 service accounts.
> > > It would be great if we could handle them gracefully instead of
> > > special-case them in a piece of code we just reach because we don't
> > > handle them yet.
> >
> > True, but I don't really understand how they could be handled.
>
> We do something along these lines already for the AzureAD SIDs of type
> S-1-12-1-what-the-heck.  If we do the same for the S-1-5-82 IIS AppPool
> accounts, we may be able to handle this more sanely.  Just search for
> AzureAD in uinfo.cc.
>
> What do you think?

I implemented that, as patch 3 of 4 in the sixth iteration of the patch
series.

It is a bit more involved than I would have loved, but it does the job in
my tests (although I now need the fourth patch for it to work, which was
not the case previously, for obvious reasons).

Ciao,
Johannes


Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Corinna Vinschen
On Apr  3 15:57, Johannes Schindelin wrote:
> On Mon, 3 Apr 2023, Corinna Vinschen wrote:
> > > So here is what is going on:
> > >
> > > - The domain is 'IIS APPPOOL'
> >
> > There's a domain, so why not pass it to the called function?>
> 
> Sorry, I was unclear. This domain _is_ used when looking for the uid, but
> then we run into a code path where the UID cannot be determined (because
> the domain of the account is not the machine name and the machine is no
> domain member). The clause in question is here:
> https://github.com/cygwin/cygwin/blob/cygwin-3.4.6/winsup/cygwin/uinfo.cc#L2303-L2310.
> The Cygwin runtime then returns -1 as UID.
> 
> The _subsequent_ call to `getpwuid(-1)` is the one where we need to teach
> Cygwin to respect `db_home: env`. This is the code path taken by OpenSSH.
> And that code path only has an `arg.id` to work with (the `type` is
> `ID_arg`), and that `arg.id` is invalid. There is no domain in that code
> path that we could possibly pass to the `get_home()` method.

That makes a lot of sense.  However, wouldn't it be better to return
some kind of valid uid, rather than working around uid -1?

> > > - The name is the name of the Azure Web App
> > >
> > > - The sid is 
> > > 'S-1-5-82-3932326390-3052311582-2886778547-4123178866-1852425102'
> >
> > Oh well. These are basically the same thing as 1-5-80 service accounts.
> > It would be great if we could handle them gracefully instead of
> > special-case them in a piece of code we just reach because we don't
> > handle them yet.
> 
> True, but I don't really understand how they could be handled.

We do something along these lines already for the AzureAD SIDs of type
S-1-12-1-what-the-heck.  If we do the same for the S-1-5-82 IIS AppPool
accounts, we may be able to handle this more sanely.  Just search for
AzureAD in uinfo.cc.

What do you think?


Corinna

> > Btw., one easy way out would be if we default to /home/ or
> > /home/ rather than "/", isn't it?
> 
> The default does not really matter, as the bug fix is about respecting
> whatever the user has configured via the `HOME` variable, i.e. it's all
> about the case when the default needs to be overridden, whatever that
> default is.

Right, that wouldn't help then.


Corinna


[PATCH v5 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
When we cannot figure out a uid for the current user, we should still
respect the `db_home: env` setting.

This is particularly important when programs like `ssh` look for the
home directory of the usr, the user overrode `HOME` to "help" Cygwin
determine where the home directory is. Cygwin should not ignore this.

One situation where we cannot determine a uid is when the domain
returned by `LookupAccountSid()` is not our machine name and at the same
time our machine is no domain member: In that case, we have nobody to
ask for the POSIX offset necessary to come up with the uid.

Azure Web Apps represent such a scenario, which can be verified e.g. in
a Kudu console (for details about Kudu consoles, see
https://github.com/projectkudu/kudu/wiki/Kudu-console): the domain is
`IIS APPPOOL`, the account name is the name of the Azure Web App, the
SID starts with 'S-1-5-82-`, and `pwdgrp::fetch_account_from_windows()`
runs into the code path where "[...] the domain returned by
LookupAccountSid is not our machine name, and if our machine is no
domain member, we lose.  We have nobody to ask for the POSIX offset."

In such a scenario, OpenSSH's `getuid()` call will receive the return
value -1, and the subsequent `getpwuid()` call (whose return value's
`pw_dir` is used as home directory) needs to be forced to respect
`db_home: env`, which this here patch does.

Reported-by: David Ebbo 
Signed-off-by: Johannes Schindelin 
---
 winsup/cygwin/uinfo.cc | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index d493d29b3b..b01bcff5cb 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -883,6 +883,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, cygpsid 
, PCWSTR str,
case L'u':
  if (full_qualified)
{
+ if (!dom)
+   break;
  w = wcpncpy (w, dom, we - w);
  if (w < we)
*w++ = NSS_SEPARATOR_CHAR;
@@ -893,6 +895,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, cygpsid 
, PCWSTR str,
  w = wcpncpy (w, name, we - w);
  break;
case L'D':
+ if (!dom)
+   break;
  w = wcpncpy (w, dom, we - w);
  break;
case L'H':
@@ -2181,6 +2185,10 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t 
, cyg_ldap *pldap)
{
  /* Just some fake. */
  sid = csid.create (99, 1, 0);
+ if (arg.id == cygheap->user.real_uid)
+   home = cygheap->pg.get_home ((PUSER_INFO_3) NULL,
+cygheap->user.sid(),
+NULL, NULL, false);
  break;
}
   else if (arg.id >= UNIX_POSIX_OFFSET)
@@ -2710,10 +2718,11 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t 
, cyg_ldap *pldap)
  logon.  Unless it's the SYSTEM account.  This conveniently allows to
  logon interactively as SYSTEM for debugging purposes. */
   else if (acc_type != SidTypeUser && sid != well_known_system_sid)
-__small_sprintf (linebuf, "%W:*:%u:%u:U-%W\\%W,%s:/:/sbin/nologin",
+__small_sprintf (linebuf, "%W:*:%u:%u:U-%W\\%W,%s:%s:/sbin/nologin",
 posix_name, uid, gid,
 dom, name,
-sid.string ((char *) sidstr));
+sid.string ((char *) sidstr),
+home ? home : "/");
   else
 __small_sprintf (linebuf, "%W:*:%u:%u:%s%sU-%W\\%W,%s:%s%W:%s",
 posix_name, uid, gid,
--
2.40.0.windows.1


Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna,

On Mon, 3 Apr 2023, Corinna Vinschen wrote:

> On Apr  3 15:12, Johannes Schindelin wrote:
>
> > On Mon, 3 Apr 2023, Johannes Schindelin wrote:
> >
> > > On Tue, 28 Mar 2023, Corinna Vinschen wrote:
> > >
> > > > On Mar 28 10:17, Johannes Schindelin wrote:
> > > > > In particular when we cannot figure out a uid for the current user, we
> > > > > should still respect the `db_home: env` setting. Such a situation 
> > > > > occurs
> > > > > for example when the domain returned by `LookupAccountSid()` is not 
> > > > > our
> > > > > machine name and at the same time our machine is no domain member: In
> > > > > that case, we have nobody to ask for the POSIX offset necessary to 
> > > > > come
> > > > > up with the uid.
> > > > >
> > > > > It is important that even in such cases, the `HOME` environment 
> > > > > variable
> > > > > can be used to override the home directory, e.g. when Git for Windows 
> > > > > is
> > > > > used by an account that was generated on the fly, e.g. for transient 
> > > > > use
> > > > > in a cloud scenario.
> > > >
> > > > How does this kind of account look like?  I'd like to see the contants
> > > > of name, domain, and the SID.  Isn't that just an account closely
> > > > resembling Micorosft Accounts or AzureAD accounts?  Can't we somehow
> > > > handle them alike?
> > >
> > > [...]
> > >
> > > What I _can_ do is try to recreate the problem (the report said that this
> > > happens in a Kudu console of an Azure Web App, see
> > > https://github.com/projectkudu/kudu/wiki/Kudu-console) by creating a new
> > > Azure Web App and opening that console and run Cygwin within it, which is
> > > what I am going to do now.
> >
> > So here is what is going on:
> >
> > - The domain is 'IIS APPPOOL'
>
> There's a domain, so why not pass it to the called function?>

Sorry, I was unclear. This domain _is_ used when looking for the uid, but
then we run into a code path where the UID cannot be determined (because
the domain of the account is not the machine name and the machine is no
domain member). The clause in question is here:
https://github.com/cygwin/cygwin/blob/cygwin-3.4.6/winsup/cygwin/uinfo.cc#L2303-L2310.
The Cygwin runtime then returns -1 as UID.

The _subsequent_ call to `getpwuid(-1)` is the one where we need to teach
Cygwin to respect `db_home: env`. This is the code path taken by OpenSSH.
And that code path only has an `arg.id` to work with (the `type` is
`ID_arg`), and that `arg.id` is invalid. There is no domain in that code
path that we could possibly pass to the `get_home()` method.

> > - The name is the name of the Azure Web App
> >
> > - The sid is 
> > 'S-1-5-82-3932326390-3052311582-2886778547-4123178866-1852425102'
>
> Oh well. These are basically the same thing as 1-5-80 service accounts.
> It would be great if we could handle them gracefully instead of
> special-case them in a piece of code we just reach because we don't
> handle them yet.

True, but I don't really understand how they could be handled.

> Btw., one easy way out would be if we default to /home/ or
> /home/ rather than "/", isn't it?

The default does not really matter, as the bug fix is about respecting
whatever the user has configured via the `HOME` variable, i.e. it's all
about the case when the default needs to be overridden, whatever that
default is.

Ciao,
Johannes


Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Corinna Vinschen
On Apr  3 15:12, Johannes Schindelin wrote:
> Hi Corinna,
> 
> On Mon, 3 Apr 2023, Johannes Schindelin wrote:
> 
> > On Tue, 28 Mar 2023, Corinna Vinschen wrote:
> >
> > > On Mar 28 10:17, Johannes Schindelin wrote:
> > > > In particular when we cannot figure out a uid for the current user, we
> > > > should still respect the `db_home: env` setting. Such a situation occurs
> > > > for example when the domain returned by `LookupAccountSid()` is not our
> > > > machine name and at the same time our machine is no domain member: In
> > > > that case, we have nobody to ask for the POSIX offset necessary to come
> > > > up with the uid.
> > > >
> > > > It is important that even in such cases, the `HOME` environment variable
> > > > can be used to override the home directory, e.g. when Git for Windows is
> > > > used by an account that was generated on the fly, e.g. for transient use
> > > > in a cloud scenario.
> > >
> > > How does this kind of account look like?  I'd like to see the contants
> > > of name, domain, and the SID.  Isn't that just an account closely
> > > resembling Micorosft Accounts or AzureAD accounts?  Can't we somehow
> > > handle them alike?
> >
> > [...]
> >
> > What I _can_ do is try to recreate the problem (the report said that this
> > happens in a Kudu console of an Azure Web App, see
> > https://github.com/projectkudu/kudu/wiki/Kudu-console) by creating a new
> > Azure Web App and opening that console and run Cygwin within it, which is
> > what I am going to do now.
> 
> So here is what is going on:
> 
> - The domain is 'IIS APPPOOL'

There's a domain, so why not pass it to the called function?>

> - The name is the name of the Azure Web App
> 
> - The sid is 'S-1-5-82-3932326390-3052311582-2886778547-4123178866-1852425102'

Oh well. These are basically the same thing as 1-5-80 service accounts.
It would be great if we could handle them gracefully instead of
special-case them in a piece of code we just reach because we don't
handle them yet.

Btw., one easy way out would be if we default to /home/ or
/home/ rather than "/", isn't it?


Corinna


Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna,

On Mon, 3 Apr 2023, Johannes Schindelin wrote:

> On Tue, 28 Mar 2023, Corinna Vinschen wrote:
>
> > On Mar 28 10:17, Johannes Schindelin wrote:
>
> > > diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
> > > index d493d29b3b..b01bcff5cb 100644
> > > --- a/winsup/cygwin/uinfo.cc
> > > +++ b/winsup/cygwin/uinfo.cc
> > > @@ -883,6 +883,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, 
> > > cygpsid , PCWSTR str,
> > >   case L'u':
> > > if (full_qualified)
> > >   {
> > > +   if (!dom)
> > > + break;
> >
> > No domain?  Really?
>
> Yes, I distinctly remember that I had to do that, otherwise the code would
> not work as intended.

Right. This is actually really easy to explain: The new call I introduced
in this very patch passes `NULL` as the `dom` parameter (because this is
in a scenario where we do indeed not have a domain to work with):

  if (arg.id == cygheap->user.real_uid)
home = cygheap->pg.get_home ((PUSER_INFO_3) NULL,
 cygheap->user.sid(),
 NULL, NULL, false);

 
 this is the `dom` parameter

(see
https://github.com/dscho/msys2-runtime/commit/4cd6ae73074f327064b54a08392906dbc140714a#diff-1ffeda03bc188fa732454f52c4932977bc8233d9db4da19ab5acb0c58c7320ccR2188-R2191
for details)

Ciao,
Johannes


Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna,

On Mon, 3 Apr 2023, Johannes Schindelin wrote:

> On Tue, 28 Mar 2023, Corinna Vinschen wrote:
>
> > On Mar 28 10:17, Johannes Schindelin wrote:
> > > In particular when we cannot figure out a uid for the current user, we
> > > should still respect the `db_home: env` setting. Such a situation occurs
> > > for example when the domain returned by `LookupAccountSid()` is not our
> > > machine name and at the same time our machine is no domain member: In
> > > that case, we have nobody to ask for the POSIX offset necessary to come
> > > up with the uid.
> > >
> > > It is important that even in such cases, the `HOME` environment variable
> > > can be used to override the home directory, e.g. when Git for Windows is
> > > used by an account that was generated on the fly, e.g. for transient use
> > > in a cloud scenario.
> >
> > How does this kind of account look like?  I'd like to see the contants
> > of name, domain, and the SID.  Isn't that just an account closely
> > resembling Micorosft Accounts or AzureAD accounts?  Can't we somehow
> > handle them alike?
>
> [...]
>
> What I _can_ do is try to recreate the problem (the report said that this
> happens in a Kudu console of an Azure Web App, see
> https://github.com/projectkudu/kudu/wiki/Kudu-console) by creating a new
> Azure Web App and opening that console and run Cygwin within it, which is
> what I am going to do now.

So here is what is going on:

- The domain is 'IIS APPPOOL'

- The name is the name of the Azure Web App

- The sid is 'S-1-5-82-3932326390-3052311582-2886778547-4123178866-1852425102'

The program I am trying to make work as expected (i.e. to respect the
`db_home: env` line in `/etc/nsswitch.conf` in conjunction with the `HOME`
variable being set to `C:\home`) is `ssh-keygen.exe`: We want it to
default to creating the file `/cygdrive/c/home/.ssh/id_rsa`. But what it
_does_, without this patch, is to default to creating the file
`//.ssh/id_rsa` (which does not make sense because that would refer to a
file share called `id_rsa` on a server whose name is `.ssh`).

Condensed to the bare minimum reproducer, the code boils down to this:

-- snip --
#include 
#include 
#include 
#include 

int main(int argc, char **argv)
{
uid_t uid = getuid();
struct passwd *pw = getpwuid(uid);

printf("uid=%u, pw_dir='%s'\n", (unsigned)uid, pw->pw_dir);

return 0;
}
-- snap --

In the Kudu console scenario, this program prints the UID 4294967295
(which is 0x) and _without_ this patch, it prints the `pw_dir` as
being `/`, even if the `HOME` environment variable should override that
for the current user.

_With_ patch 3/3, it prints out the same `uid`, but it does print the
`pw_dir` as `/cygdrive/c/home`.

I will distill the above into a new-and-improved commit message.

Ciao,
Johannes


Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna,

On Tue, 28 Mar 2023, Corinna Vinschen wrote:

> On Mar 28 10:17, Johannes Schindelin wrote:
> > In particular when we cannot figure out a uid for the current user, we
> > should still respect the `db_home: env` setting. Such a situation occurs
> > for example when the domain returned by `LookupAccountSid()` is not our
> > machine name and at the same time our machine is no domain member: In
> > that case, we have nobody to ask for the POSIX offset necessary to come
> > up with the uid.
> >
> > It is important that even in such cases, the `HOME` environment variable
> > can be used to override the home directory, e.g. when Git for Windows is
> > used by an account that was generated on the fly, e.g. for transient use
> > in a cloud scenario.
>
> How does this kind of account look like?  I'd like to see the contants
> of name, domain, and the SID.  Isn't that just an account closely
> resembling Micorosft Accounts or AzureAD accounts?  Can't we somehow
> handle them alike?

It took a good while to remind me what was going on there. Essentially, I
had to dig up a mail from 2016 that David Ebbo sent me via my work email
(because he was working on Kudu, the Azure shell, where this issue arose).
Sadly, David is no longer a colleague of mine (he seems to work at Google
now), so I cannot pester him about details. Besides, it might be too long
ago to remember details, anyways.

What I _can_ do is try to recreate the problem (the report said that this
happens in a Kudu console of an Azure Web App, see
https://github.com/projectkudu/kudu/wiki/Kudu-console) by creating a new
Azure Web App and opening that console and run Cygwin within it, which is
what I am going to do now.

> > Reported by David Ebbo.
>
> This should be
>
>   Reported-By: David Ebbo 

Will fix. Naturally, it won't be his Microsoft email address any longer,
but the recent patches I obtained from repositories at
https://github.com/davidebbo/ have a GMail address on record.

> > diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
> > index d493d29b3b..b01bcff5cb 100644
> > --- a/winsup/cygwin/uinfo.cc
> > +++ b/winsup/cygwin/uinfo.cc
> > @@ -883,6 +883,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, 
> > cygpsid , PCWSTR str,
> > case L'u':
> >   if (full_qualified)
> > {
> > + if (!dom)
> > +   break;
>
> No domain?  Really?

Yes, I distinctly remember that I had to do that, otherwise the code would
not work as intended.

Ciao,
Johannes


Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-03-28 Thread Corinna Vinschen
On Mar 28 10:17, Johannes Schindelin wrote:
> In particular when we cannot figure out a uid for the current user, we
> should still respect the `db_home: env` setting. Such a situation occurs
> for example when the domain returned by `LookupAccountSid()` is not our
> machine name and at the same time our machine is no domain member: In
> that case, we have nobody to ask for the POSIX offset necessary to come
> up with the uid.
> 
> It is important that even in such cases, the `HOME` environment variable
> can be used to override the home directory, e.g. when Git for Windows is
> used by an account that was generated on the fly, e.g. for transient use
> in a cloud scenario.

How does this kind of account look like?  I'd like to see the contants
of name, domain, and the SID.  Isn't that just an account closely
resembling Micorosft Accounts or AzureAD accounts?  Can't we somehow
handle them alike?

> Reported by David Ebbo.

This should be

  Reported-By: David Ebbo 

> Signed-off-by: Johannes Schindelin 
> ---
>  winsup/cygwin/uinfo.cc | 13 +++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
> index d493d29b3b..b01bcff5cb 100644
> --- a/winsup/cygwin/uinfo.cc
> +++ b/winsup/cygwin/uinfo.cc
> @@ -883,6 +883,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, 
> cygpsid , PCWSTR str,
>   case L'u':
> if (full_qualified)
>   {
> +   if (!dom)
> + break;

No domain?  Really?


Corinna


[PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-03-28 Thread Johannes Schindelin
In particular when we cannot figure out a uid for the current user, we
should still respect the `db_home: env` setting. Such a situation occurs
for example when the domain returned by `LookupAccountSid()` is not our
machine name and at the same time our machine is no domain member: In
that case, we have nobody to ask for the POSIX offset necessary to come
up with the uid.

It is important that even in such cases, the `HOME` environment variable
can be used to override the home directory, e.g. when Git for Windows is
used by an account that was generated on the fly, e.g. for transient use
in a cloud scenario.

Reported by David Ebbo.

Signed-off-by: Johannes Schindelin 
---
 winsup/cygwin/uinfo.cc | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index d493d29b3b..b01bcff5cb 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -883,6 +883,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, cygpsid 
, PCWSTR str,
case L'u':
  if (full_qualified)
{
+ if (!dom)
+   break;
  w = wcpncpy (w, dom, we - w);
  if (w < we)
*w++ = NSS_SEPARATOR_CHAR;
@@ -893,6 +895,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, cygpsid 
, PCWSTR str,
  w = wcpncpy (w, name, we - w);
  break;
case L'D':
+ if (!dom)
+   break;
  w = wcpncpy (w, dom, we - w);
  break;
case L'H':
@@ -2181,6 +2185,10 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t 
, cyg_ldap *pldap)
{
  /* Just some fake. */
  sid = csid.create (99, 1, 0);
+ if (arg.id == cygheap->user.real_uid)
+   home = cygheap->pg.get_home ((PUSER_INFO_3) NULL,
+cygheap->user.sid(),
+NULL, NULL, false);
  break;
}
   else if (arg.id >= UNIX_POSIX_OFFSET)
@@ -2710,10 +2718,11 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t 
, cyg_ldap *pldap)
  logon.  Unless it's the SYSTEM account.  This conveniently allows to
  logon interactively as SYSTEM for debugging purposes. */
   else if (acc_type != SidTypeUser && sid != well_known_system_sid)
-__small_sprintf (linebuf, "%W:*:%u:%u:U-%W\\%W,%s:/:/sbin/nologin",
+__small_sprintf (linebuf, "%W:*:%u:%u:U-%W\\%W,%s:%s:/sbin/nologin",
 posix_name, uid, gid,
 dom, name,
-sid.string ((char *) sidstr));
+sid.string ((char *) sidstr),
+home ? home : "/");
   else
 __small_sprintf (linebuf, "%W:*:%u:%u:%s%sU-%W\\%W,%s:%s%W:%s",
 posix_name, uid, gid,
--
2.40.0.windows.1


Re: how can i fix

2022-12-25 Thread cygwinautoreply--- via Cygwin
>1 [main] bash 6924 find_fast_cwd:WARNING: couldn't compute FAST_CWD pointer.


https://cygwin.com/faq.html#faq.using.fixing-find_fast_cwd-warnings

-- 
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


how can i fix

2022-12-25 Thread Ayenew Kassie via Cygwin
1 [main] bash 6924 find_fast_cwd:WARNING: couldn't compute FAST_CWD pointer.

-- 
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: Can I rename my C:\Cygwin64 directory to C:\Cygwin?

2022-11-17 Thread Jim Reisert AD1C
On Thu, Nov 17, 2022 at 11:35 AM Andrey Repin  wrote:

Please look for my earlier message[1](thread) regarding installation path
> changes for provided PowerShell script.
>
> > Where does setup.exe get its information from?  Is there a .ini file
> > that I will need to edit?
>
> The rest of the information is taken from `$InstallPath/etc/setup`
>
> > Is there anything else I'm missing?
>
> Depends on your setup, existing symlink targets may be a problem.
>
> [1] https://cygwin.com/pipermail/cygwin/2022-August/thread.html#252113
>

Thank you Andrey!

-- 
Jim Reisert AD1C, , https://ad1c.us

-- 
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: Can I rename my C:\Cygwin64 directory to C:\Cygwin?

2022-11-17 Thread Andrey Repin
Greetings, Jim Reisert AD1C!

> Now that Cygwin x86 is nearing/has reached end-of-life, I would like
> to rename my C:\Cygwin64 directory to C:\Cygwin.

> Other than updating my Windows environment variable (CYGROOT), are
> there any "gotchas" in doing this?  I already have a D:\Home directory
> specified in /etc/nsswitch.conf so I'm not expecting the move to break
> that.

Please look for my earlier message[1](thread) regarding installation path
changes for provided PowerShell script.

> Where does setup.exe get its information from?  Is there a .ini file
> that I will need to edit?

Whoever it gets the information, you could easily change it the first time you
update the installation at the new place.
Consider it a non-issue.
The rest of the information is taken from `$InstallPath/etc/setup`

> My main concern is that the Cygwin Perl installer may get confused.  I
> currently have this in my Cygwin environment.  It doesn't appear that
> such a change will be a problem:

>  
> PERL5LIB=/cygdrive/d/Home/perl5/lib/perl5:/cygdrive/d/Home/perl5/lib/perl5:/cygdrive/d/Home/perl5/lib/perl5

> Is there anything else I'm missing?

Depends on your setup, existing symlink targets may be a problem.

[1] https://cygwin.com/pipermail/cygwin/2022-August/thread.html#252113


-- 
With best regards,
Andrey Repin
Thursday, November 17, 2022 21:18:24

Sorry for my terrible english...


-- 
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


Can I rename my C:\Cygwin64 directory to C:\Cygwin?

2022-11-17 Thread Jim Reisert AD1C
Now that Cygwin x86 is nearing/has reached end-of-life, I would like
to rename my C:\Cygwin64 directory to C:\Cygwin.

Other than updating my Windows environment variable (CYGROOT), are
there any "gotchas" in doing this?  I already have a D:\Home directory
specified in /etc/nsswitch.conf so I'm not expecting the move to break
that.

Where does setup.exe get its information from?  Is there a .ini file
that I will need to edit?

My main concern is that the Cygwin Perl installer may get confused.  I
currently have this in my Cygwin environment.  It doesn't appear that
such a change will be a problem:

  
PERL5LIB=/cygdrive/d/Home/perl5/lib/perl5:/cygdrive/d/Home/perl5/lib/perl5:/cygdrive/d/Home/perl5/lib/perl5

Is there anything else I'm missing?

-- 
Jim Reisert AD1C, , https://ad1c.us

-- 
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: Cygport: How can I ignore duplicated files in packages

2022-09-25 Thread Hamish McIntyre-Bhatty

On 15/09/2022 20:24, Achim Gratz wrote:

Hamish McIntyre-Bhatty writes:

Today I'm attempting to update my python-imaging package, but I'm now
finding that cygport has made the warning about duplicated files an
error.


I don't think anything has changed there lately?


The source is at: https://gitlab.com/hamishmb/cygwin-python-imaging

Files are duplicated in these packages because there are .py files for
each python release in /usr/lib/python3.*.


A duplicate is a file that shows up at exactly the same path in more
than one package.  These files don't fit that description as files with
the same name are in separate paths, so what is the actual problem?


This doesn't seem to actually break package creation, but I'd like to
get this reproducing correctly in scallywag, which I think will flag
as failed because of this error.


I think you create it yourself here (and analogous for the other Python
versions):

--8<---cut here---start->8---
python36_imaging_CONTENTS="
--exclude=_imagingtk*
--exclude=ImageTk*
--exclude=SpiderImagePlugin*
${python36_imaging_CONTENTS}
"
--8<---cut here---end--->8---

which seems to package the same files twice in one archive when
expanded.


Regards,
Achim.


Ah right, okay. I'll see if I can get that fixed. It's strange, because 
I haven't changed this since the last build which didn't have any issues 
at all, but I'll give it another shot.


Hamish


[PATCH v3 3/3] Respect `db_home: env` even when no uid can be determined

2022-09-21 Thread Johannes Schindelin
In particular when we cannot figure out a uid for the current user, we
should still respect the `db_home: env` setting. Such a situation occurs
for example when the domain returned by `LookupAccountSid()` is not our
machine name and at the same time our machine is no domain member: In
that case, we have nobody to ask for the POSIX offset necessary to come
up with the uid.

It is important that even in such cases, the `HOME` environment variable
can be used to override the home directory, e.g. when Git for Windows is
used by an account that was generated on the fly, e.g. for transient use
in a cloud scenario.

Reported by David Ebbo.

Signed-off-by: Johannes Schindelin 
---
 winsup/cygwin/uinfo.cc | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 5e4243fa4e..b79c2b265d 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -904,6 +904,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, cygpsid 
, PCWSTR str,
case L'u':
  if (full_qualified)
{
+ if (!dom)
+   break;
  w = wcpncpy (w, dom, we - w);
  if (w < we)
*w++ = cygheap->pg.nss_separator ()[0];
@@ -914,6 +916,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, cygpsid 
, PCWSTR str,
  w = wcpncpy (w, name, we - w);
  break;
case L'D':
+ if (!dom)
+   break;
  w = wcpncpy (w, dom, we - w);
  break;
case L'H':
@@ -2200,6 +2204,10 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t 
, cyg_ldap *pldap)
{
  /* Just some fake. */
  sid = csid.create (99, 1, 0);
+ if (arg.id == cygheap->user.real_uid)
+   home = cygheap->pg.get_home ((PUSER_INFO_3) NULL,
+cygheap->user.sid(),
+NULL, NULL, false);
  break;
}
   else if (arg.id >= UNIX_POSIX_OFFSET)
@@ -2760,10 +2768,11 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t 
, cyg_ldap *pldap)
  logon.  Unless it's the SYSTEM account.  This conveniently allows to
  logon interactively as SYSTEM for debugging purposes. */
   else if (acc_type != SidTypeUser && sid != well_known_system_sid)
-__small_sprintf (linebuf, "%W:*:%u:%u:U-%W\\%W,%s:/:/sbin/nologin",
+__small_sprintf (linebuf, "%W:*:%u:%u:U-%W\\%W,%s:%s:/sbin/nologin",
 posix_name, uid, gid,
 dom, name,
-sid.string ((char *) sidstr));
+sid.string ((char *) sidstr),
+home ? home : "/");
   else
 __small_sprintf (linebuf, "%W:*:%u:%u:%s%sU-%W\\%W,%s:%s%W:%s",
 posix_name, uid, gid,
--
2.38.0.rc0.windows.1


Re: Cygport: How can I ignore duplicated files in packages

2022-09-15 Thread Achim Gratz
Hamish McIntyre-Bhatty writes:
> Today I'm attempting to update my python-imaging package, but I'm now
> finding that cygport has made the warning about duplicated files an
> error.

I don't think anything has changed there lately?

> The source is at: https://gitlab.com/hamishmb/cygwin-python-imaging
>
> Files are duplicated in these packages because there are .py files for
> each python release in /usr/lib/python3.*.

A duplicate is a file that shows up at exactly the same path in more
than one package.  These files don't fit that description as files with
the same name are in separate paths, so what is the actual problem?

> This doesn't seem to actually break package creation, but I'd like to
> get this reproducing correctly in scallywag, which I think will flag
> as failed because of this error.

I think you create it yourself here (and analogous for the other Python
versions):

--8<---cut here---start->8---
python36_imaging_CONTENTS="
--exclude=_imagingtk*
--exclude=ImageTk*
--exclude=SpiderImagePlugin*
${python36_imaging_CONTENTS}
"
--8<---cut here---end--->8---

which seems to package the same files twice in one archive when
expanded.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada


Re: Cygport: How can I ignore duplicated files in packages

2022-09-15 Thread Jon Turney

On 13/09/2022 11:46, Hamish McIntyre-Bhatty wrote:

Hi there,

Today I'm attempting to update my python-imaging package, but I'm now 
finding that cygport has made the warning about duplicated files an error.


I don't think that cygport's handling of duplicated files has changed.

That's not to say that cygport hasn't changed in some way which has 
broken things.



The source is at: https://gitlab.com/hamishmb/cygwin-python-imaging

Files are duplicated in these packages because there are .py files for 
each python release in /usr/lib/python3.*.


I'm not able to reproduce this problem.

Can you give a specific filename, check that it actually was present in 
multiple packages previously, and explain why it needs to be duplicated?


This doesn't seem to actually break package creation, but I'd like to 
get this reproducing correctly in scallywag, which I think will flag as 
failed because of this error.


I'm not sure if what you are saying here.  Is this an error or a warning?

scallywag doesn't do any additional checking beyond that which cygport does.

I'm not sure whether this indicates that I'm packaging things the wrong 
way. If so, I'd be happy to learn how to improve my packages.


In general, duplicated files are a bad idea, and we shouldn't allow them.

(although we don't currently have anything which checks for them in e.g. 
setup, so they can unfortunately occur between packages which aren't 
generated by the same cygport)




Cygport: How can I ignore duplicated files in packages

2022-09-13 Thread Hamish McIntyre-Bhatty

Hi there,

Today I'm attempting to update my python-imaging package, but I'm now 
finding that cygport has made the warning about duplicated files an error.


The source is at: https://gitlab.com/hamishmb/cygwin-python-imaging

Files are duplicated in these packages because there are .py files for 
each python release in /usr/lib/python3.*.


This doesn't seem to actually break package creation, but I'd like to 
get this reproducing correctly in scallywag, which I think will flag as 
failed because of this error.


I'm not sure whether this indicates that I'm packaging things the wrong 
way. If so, I'd be happy to learn how to improve my packages.


Hamish


Re: The "TrustedInstaller" user can not be found by ID

2022-07-07 Thread Corinna Vinschen
On Jul  6 23:45, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> > On Jul  6 13:32, Andrey Repin wrote:
> >> Greetings, All!
> >> 
> >> Been doing some housekeeping in my Cygwin installation at work, and wanted 
> >> to
> >> change the owner of the files to something other than myself.
> >> TrustedInstaller seemed like a good neutral target, but it took me a little
> >> while to find out it is
> >> 
> >> 1. …named "NT SERVICE+TrustedInstaller" actually (which is predictable
> >> somewhat);
> >> $ getent passwd | grep -i trust
> >> NT SERVICE+TrustedInstaller:*:328384:328384:U-NT 
> >> SERVICE\TrustedInstaller,S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464:/:/sbin/nologin
> >>
> >> 2. …can not be accessed by any other name (unlike "NT AUTHORITY\SYSTEM");
> >> $ getent passwd System
> >> system:*:18:18:U-NT AUTHORITY\system,S-1-5-18:/home/system:/bin/bash
> >> $ getent passwd 18
> >> система:*:18:18:U-NT AUTHORITY\система,S-1-5-18:/home/система:/bin/bash
> 
> > This is by design.  Only builtin stuff and the primary domain members
> > can be accessed name-only.  "NT SERVICE" is not builtin, but rather a
> > kind of foreign domain identifier (but don't take this literally), so
> > you have to use the full name "NT SERVICE+TrustedInstaller".  Note
> > that this is a restriction in the Windows function LookupAccountName,
> > as documented in the source:
> 
> > https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/uinfo.cc;hb=HEAD#l2032
> 
> That explains it, thank you.
> 
> >> 3. …can not be accessed by ID! Which is rather surprising.
> >> $ getent passwd 328384
> >> [2] <- user not found
> >> 
> >> Is this some special case of some kind of Windows' kinks?
> 
> > This is impossible with the current code.  Cygwin tries to perform
> > bijective SID<->id mappings, if possible.  "NT SERVICE" accounts are a
> > bit of a problem and TrustedInstaller is no exception in that the SIDs
> > don't follow the usual rules for BUILTIN / NT AUTHORITY / normal
> > accounts.  They are also not exactly predictable, even though
> > TrustedInstaller always has the same SID on all systems. To handle
> > 328384 as TrustedInstaller, it needs actual special casing.  We can add
> > that, but that would only allow the explicit mapping between "NT
> > SERVICE+TrustedInstaller" and uid/gid 328384.  This would not cover
> > other NT SERVICE accounts.
> 
> I was thinking cygserver could level such troubles.
> Since name resolution coming through it more or less, it could maintain the
> mappings of uid => SID of the accounts it had seen, and respond correctly if
> `db_enum` contains "cache".

Caching is just caching, not an entirely different algorithm.  When you
use cygserver, it just asks the Cygwin DLL on behalf of another process.
The caching itself actually occurs inside the Cygwin DLL and is always
present, even without cygserver:
https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-caching

Having said that, in my case, starting tcsh via mintty with no cygserver
running, I can request the info just fine:

$ getent passwd 328384
NT SERVICE+TrustedInstaller:*:328384:328384:U-NT 
SERVICE\TrustedInstaller,S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464:/:/sbin/nologin

If I start tcsh inside a Windows console, the above command fails, so I
guess mintty already requests the info under some circumstances so I can
happily request the cached passwd entry.

Having said that, caching doesn't help, if the info hasn't been
requested before.  You always need at least one request for "NT
SERVICE+TrustedInstaller" inside your process tree to allow a
subsequent successful reverse mapping.

Caching is nice and all, but fact is, that I can't get the info from the
OS, and that's the actual problem.

> > Given that TrustedInstaller is only used by the OS at installation time,
> > I always looked at it as a kind of "read-only account".  I'm really not
> > sure if it's worth special casing this account just to allow id->SID
> > mapping...


Corinna

-- 
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: The "TrustedInstaller" user can not be found by ID

2022-07-06 Thread Andrey Repin
Greetings, Corinna Vinschen!

> On Jul  6 13:32, Andrey Repin wrote:
>> Greetings, All!
>> 
>> Been doing some housekeeping in my Cygwin installation at work, and wanted to
>> change the owner of the files to something other than myself.
>> TrustedInstaller seemed like a good neutral target, but it took me a little
>> while to find out it is
>> 
>> 1. …named "NT SERVICE+TrustedInstaller" actually (which is predictable
>> somewhat);
>> $ getent passwd | grep -i trust
>> NT SERVICE+TrustedInstaller:*:328384:328384:U-NT 
>> SERVICE\TrustedInstaller,S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464:/:/sbin/nologin
>>
>> 2. …can not be accessed by any other name (unlike "NT AUTHORITY\SYSTEM");
>> $ getent passwd System
>> system:*:18:18:U-NT AUTHORITY\system,S-1-5-18:/home/system:/bin/bash
>> $ getent passwd 18
>> система:*:18:18:U-NT AUTHORITY\система,S-1-5-18:/home/система:/bin/bash

> This is by design.  Only builtin stuff and the primary domain members
> can be accessed name-only.  "NT SERVICE" is not builtin, but rather a
> kind of foreign domain identifier (but don't take this literally), so
> you have to use the full name "NT SERVICE+TrustedInstaller".  Note
> that this is a restriction in the Windows function LookupAccountName,
> as documented in the source:

> https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/uinfo.cc;hb=HEAD#l2032

That explains it, thank you.

>> 3. …can not be accessed by ID! Which is rather surprising.
>> $ getent passwd 328384
>> [2] <- user not found
>> 
>> Is this some special case of some kind of Windows' kinks?

> This is impossible with the current code.  Cygwin tries to perform
> bijective SID<->id mappings, if possible.  "NT SERVICE" accounts are a
> bit of a problem and TrustedInstaller is no exception in that the SIDs
> don't follow the usual rules for BUILTIN / NT AUTHORITY / normal
> accounts.  They are also not exactly predictable, even though
> TrustedInstaller always has the same SID on all systems. To handle
> 328384 as TrustedInstaller, it needs actual special casing.  We can add
> that, but that would only allow the explicit mapping between "NT
> SERVICE+TrustedInstaller" and uid/gid 328384.  This would not cover
> other NT SERVICE accounts.

I was thinking cygserver could level such troubles.
Since name resolution coming through it more or less, it could maintain the
mappings of uid => SID of the accounts it had seen, and respond correctly if
`db_enum` contains "cache".

> Given that TrustedInstaller is only used by the OS at installation time,
> I always looked at it as a kind of "read-only account".  I'm really not
> sure if it's worth special casing this account just to allow id->SID
> mapping...


-- 
With best regards,
Andrey Repin
Wednesday, July 6, 2022 22:35:01

Sorry for my terrible english...

-- 
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: The "TrustedInstaller" user can not be found by ID

2022-07-06 Thread Corinna Vinschen
On Jul  6 13:32, Andrey Repin wrote:
> Greetings, All!
> 
> Been doing some housekeeping in my Cygwin installation at work, and wanted to
> change the owner of the files to something other than myself.
> TrustedInstaller seemed like a good neutral target, but it took me a little
> while to find out it is
> 
> 1. …named "NT SERVICE+TrustedInstaller" actually (which is predictable
> somewhat);
> $ getent passwd | grep -i trust
> NT SERVICE+TrustedInstaller:*:328384:328384:U-NT 
> SERVICE\TrustedInstaller,S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464:/:/sbin/nologin
>
> 2. …can not be accessed by any other name (unlike "NT AUTHORITY\SYSTEM");
> $ getent passwd System
> system:*:18:18:U-NT AUTHORITY\system,S-1-5-18:/home/system:/bin/bash
> $ getent passwd 18
> система:*:18:18:U-NT AUTHORITY\система,S-1-5-18:/home/система:/bin/bash

This is by design.  Only builtin stuff and the primary domain members
can be accessed name-only.  "NT SERVICE" is not builtin, but rather a
kind of foreign domain identifier (but don't take this literally), so
you have to use the full name "NT SERVICE+TrustedInstaller".  Note
that this is a restriction in the Windows function LookupAccountName,
as documented in the source:

https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/uinfo.cc;hb=HEAD#l2032

> 3. …can not be accessed by ID! Which is rather surprising.
> $ getent passwd 328384
> [2] <- user not found
> 
> Is this some special case of some kind of Windows' kinks?

This is impossible with the current code.  Cygwin tries to perform
bijective SID<->id mappings, if possible.  "NT SERVICE" accounts are a
bit of a problem and TrustedInstaller is no exception in that the SIDs
don't follow the usual rules for BUILTIN / NT AUTHORITY / normal
accounts.  They are also not exactly predictable, even though
TrustedInstaller always has the same SID on all systems. To handle
328384 as TrustedInstaller, it needs actual special casing.  We can add
that, but that would only allow the explicit mapping between "NT
SERVICE+TrustedInstaller" and uid/gid 328384.  This would not cover
other NT SERVICE accounts.

Given that TrustedInstaller is only used by the OS at installation time,
I always looked at it as a kind of "read-only account".  I'm really not
sure if it's worth special casing this account just to allow id->SID
mapping...


Corinna

-- 
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


The "TrustedInstaller" user can not be found by ID

2022-07-06 Thread Andrey Repin
Greetings, All!

Been doing some housekeeping in my Cygwin installation at work, and wanted to
change the owner of the files to something other than myself.
TrustedInstaller seemed like a good neutral target, but it took me a little
while to find out it is

1. …named "NT SERVICE+TrustedInstaller" actually (which is predictable
somewhat);
$ getent passwd | grep -i trust
NT SERVICE+TrustedInstaller:*:328384:328384:U-NT 
SERVICE\TrustedInstaller,S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464:/:/sbin/nologin

2. …can not be accessed by any other name (unlike "NT AUTHORITY\SYSTEM");
$ getent passwd System
system:*:18:18:U-NT AUTHORITY\system,S-1-5-18:/home/system:/bin/bash
$ getent passwd 18
система:*:18:18:U-NT AUTHORITY\система,S-1-5-18:/home/система:/bin/bash

3. …can not be accessed by ID! Which is rather surprising.
$ getent passwd 328384
[2] <- user not found

Is this some special case of some kind of Windows' kinks?


-- 
With best regards,
Andrey Repin
Wednesday, July 6, 2022 13:22:14

Sorry for my terrible english...

-- 
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: Can the cygwin support scipy, pandas, sympy, jupyterlab?

2022-02-17 Thread Tatsuro MATSUOKA
> - Original Message -
> 
> From: "marco atzeri" 
> To: "Tatsuro MATSUOKA" 
> Cc: "cygwin
> Date: 2022/02/17 木 19:37
> Subject: Re: Can the cygwin support scipy, pandas, sympy, jupyterlab?
> 
> 
> On Thu, Feb 17, 2022 at 8:36 AM Tatsuro MATSUOKA  wrote:
> >
> > Can the cygwin support scipy, pandas, sympy, jupyterlab?
> > The above is very popular in scientific field but the cygwin does not have 
> > the package.
> > I used the internet search and was able to install those package python pip 
> > install.
> > However, if thtse package can be installed without pip install, it will be 
> > grateful.
> >
> > Tatsuro
> >
> 
> Hi Tatsuro,
> probably yes, but I have not tried all of them
> 
> adding to the TODO list
> 
> Regards
> Marco
> 

Hello Marco

Thank you for your affirmative reply.
 
The way I installed the packages are described the below


By setup-x86_64.exe, 
cython numpy, matplotlib, wheel, zmq, gcc, g++, gfortran, libopenblas, 
liblapack-develop packages are installed.

Using  pip, pybind11, scipy, pandas, sympy and jupyterlab are installed

$ python3.9 -m pip install pybind11
$ python3.9 -m pip install scipy==1.6.3
  # (for scipy 1.7.x, compile errors occurred concerning to the boost. The I 
instelled scipy-1.6.3.
  # BUG: SciPy 1.7.x build failure on Cygwin #15296  
https://github.com/scipy/scipy/issues/15296)
$ python3.9 -m pip install pandas
$ python3.9 -m pip install sympy
$ python3.9 -m pip install jupyterlab



Tatsuro


-- 
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: Can the cygwin support scipy, pandas, sympy, jupyterlab?

2022-02-17 Thread Russell VT
FWIW, the general answer to "Can Cygwin do..." ... that's generally a
"Yes." The REAL question is how much you want to do this on Cygwin, versus
trying to do it on just a plain UNIX desktop. But, ultimately, Cygwin can
get you most of the way there, pretty easily ... the very last pieces may
take some more effort.

That said, I believe you are just asking about Python modules. Most of
those may, generally, be easily built through 'pip` and similar
module tools. That said, please reach out if you are having specific
problems with anything in the normal distribution.

Read: Getting the proper X / graphics libraries included enough that you
can generate any specific graphic format may be a more-direct question.

Cheers -
RVT



On Wed, Feb 16, 2022 at 11:37 PM Tatsuro MATSUOKA 
wrote:

> Can the cygwin support scipy, pandas, sympy, jupyterlab?
> The above is very popular in scientific field but the cygwin does not have
> the package.
> I used the internet search and was able to install those package python
> pip install.
> However, if thtse package can be installed without pip install, it will be
> grateful.
>
> Tatsuro
>
>
> --
> 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
>


-- 
Russell M. Van Tassell 

-- 
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: Can the cygwin support scipy, pandas, sympy, jupyterlab?

2022-02-17 Thread marco atzeri
On Thu, Feb 17, 2022 at 8:36 AM Tatsuro MATSUOKA  wrote:
>
> Can the cygwin support scipy, pandas, sympy, jupyterlab?
> The above is very popular in scientific field but the cygwin does not have 
> the package.
> I used the internet search and was able to install those package python pip 
> install.
> However, if thtse package can be installed without pip install, it will be 
> grateful.
>
> Tatsuro
>

Hi Tatsuro,
probably yes, but I have not tried all of them

adding to the TODO list

Regards
Marco

-- 
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


Can the cygwin support scipy, pandas, sympy, jupyterlab?

2022-02-16 Thread Tatsuro MATSUOKA
Can the cygwin support scipy, pandas, sympy, jupyterlab? 
The above is very popular in scientific field but the cygwin does not have the 
package.
I used the internet search and was able to install those package python pip 
install.
However, if thtse package can be installed without pip install, it will be 
grateful.

Tatsuro


-- 
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


Can I install Cygwin on Windows 11?

2021-10-14 Thread Turritopsis Dohrnii Teo En Ming via Cygwin
Subject: Can I install Cygwin on Windows 11?

Good day from Singapore,

Can I install Cygwin on Windows 11?

Does it support Windows 11?

I am looking forward to your replies.

Thank you very much.

Mr. Turritopsis Dohrnii Teo En Ming, 43 years old as of 14 Oct 2021, is a 
TARGETED INDIVIDUAL living in Singapore. He is an IT Consultant with a Systems 
Integrator (SI)/computer firm in Singapore. He is an IT enthusiast.

-BEGIN EMAIL SIGNATURE-

The Gospel for all Targeted Individuals (TIs):

[The New York Times] Microwave Weapons Are Prime Suspect in Ills of U.S. 
Embassy Workers

Link:
https://www.nytimes.com/2018/09/01/science/sonic-attack-cuba-microwave.html



Singaporean Targeted Individual Mr. Turritopsis Dohrnii Teo En Ming's Academic 
Qualifications as at 14 Feb 2019 and refugee seeking attempts at the United 
Nations Refugee Agency Bangkok (21 Mar 2017), in Taiwan (5 Aug 2019) and 
Australia (25 Dec 2019 to 9 Jan 2020):

[1]
https://tdtemcerts.wordpress.com/

[2]
https://tdtemcerts.blogspot.sg/

[3]
https://www.scribd.com/user/270125049/Teo-En-Ming

-END EMAIL SIGNATURE-

Sent with [ProtonMail](https://protonmail.com/) Secure Email.

-- 
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: is there a limit on how many mintty terminals can be open at once?

2021-10-04 Thread Takashi Yano via Cygwin
On Mon, 4 Oct 2021 22:51:55 +0300
Andrey Repin wrote:
> Greetings, Brian Inglis!
> 
> > On 2021-10-03 13:58, Takashi Yano via Cygwin wrote:
> >> On Sun, 3 Oct 2021 12:25:15 -0400
> >> "Jason Pyeron" wrote:
> >>> I got the "Error: Could not fork child process: There are no
> >>> available terminals (-1)" error.
> >>> Closing N minty terminals allowed me to open exactly N more.
> >>> My google fu is poor, since I cannot seem to find relevant pages.
> >>> What is the limit?
> 
> >> In current cygwin, maximum number of pty is 128.
> >> It is hard coded and not configurable by user.
> >> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/tty.h#l15
> 
> > Why would you want and how could you use 128 local terminal windows on 
> > one system, where could you put them, and be able to read them, unless 
> > you are building some kind of control centre, and then wouldn't GUI 
> > processes forked under a windows system be more useful?
> 
> Won't SSH sessions allocate pty's ?

Incoming SSH session consumes pty. Therefore, up to 128 users (or sessions)
can login to the cygwin SSH server simultaneously. This is much less than
modern Linux (e.g. 4096 on debian).

-- 
Takashi Yano 

-- 
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: is there a limit on how many mintty terminals can be open at once?

2021-10-04 Thread Andrey Repin
Greetings, Brian Inglis!

> On 2021-10-03 13:58, Takashi Yano via Cygwin wrote:
>> On Sun, 3 Oct 2021 12:25:15 -0400
>> "Jason Pyeron" wrote:
>>> I got the "Error: Could not fork child process: There are no
>>> available terminals (-1)" error.
>>> Closing N minty terminals allowed me to open exactly N more.
>>> My google fu is poor, since I cannot seem to find relevant pages.
>>> What is the limit?

>> In current cygwin, maximum number of pty is 128.
>> It is hard coded and not configurable by user.
>> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/tty.h#l15

> Why would you want and how could you use 128 local terminal windows on 
> one system, where could you put them, and be able to read them, unless 
> you are building some kind of control centre, and then wouldn't GUI 
> processes forked under a windows system be more useful?

Won't SSH sessions allocate pty's ?


-- 
With best regards,
Andrey Repin
Monday, October 4, 2021 22:51:31

Sorry for my terrible english...


-- 
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: is there a limit on how many mintty terminals can be open at once?

2021-10-04 Thread Brian Inglis

On 2021-10-03 13:58, Takashi Yano via Cygwin wrote:

On Sun, 3 Oct 2021 12:25:15 -0400
"Jason Pyeron" wrote:

I got the "Error: Could not fork child process: There are no
available terminals (-1)" error.
Closing N minty terminals allowed me to open exactly N more.
My google fu is poor, since I cannot seem to find relevant pages.
What is the limit?



In current cygwin, maximum number of pty is 128.
It is hard coded and not configurable by user.
https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/tty.h#l15


Why would you want and how could you use 128 local terminal windows on 
one system, where could you put them, and be able to read them, unless 
you are building some kind of control centre, and then wouldn't GUI 
processes forked under a windows system be more useful?


There is no longer much of a limit on Cygwin 64 processes, so you could 
fork thousands of bash or any other exe processes under each terminal.


I know sysadmins who used dozens of terminal windows, but only a few 
active at a time, and they were ssh sessions to remote systems 
displaying X terminals on their desktop X server.


I've never needed more than a few terminal windows on a few systems at a 
time, but I come from the school of closing windows as soon as I don't 
need them, to reduce load, and avoid typing any command in the wrong 
window! One "Oh sh***!" is all you need ;^>


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

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

[The most I've deployed was a few stations at diverse locations with 12 
windows on six screens remoting into servers running 12 front ends for a 
trading platform to reduce latency of server process transaction 
execution to low ms.]


--
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: is there a limit on how many mintty terminals can be open at once?

2021-10-03 Thread Takashi Yano via Cygwin
On Sun, 3 Oct 2021 12:25:15 -0400
"Jason Pyeron" wrote:
> I got the "Error: Could not fork child process: There are no available 
> terminals (-1)" error.
> 
> Closing N minty terminals allowed me to open exactly N more.
> 
> My google fu is poor, since I cannot seem to find relevant pages.
> 
> What is the limit?

In current cygwin, maximum number of pty is 128.
It is hard coded and not configurable by user.
https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/tty.h#l15


-- 
Takashi Yano 

-- 
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


is there a limit on how many mintty terminals can be open at once?

2021-10-03 Thread Jason Pyeron
I got the "Error: Could not fork child process: There are no available 
terminals (-1)" error.

Closing N minty terminals allowed me to open exactly N more.

My google fu is poor, since I cannot seem to find relevant pages.

What is the limit?

Can the limit be configured?

$ ps -f | grep mintty | wc -l
42

$ dir /dev/ | grep pty | wc -l
46


CYGWIN_NT-10.0 hostname 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin

v/r,

Jason Pyeron

--
Jason Pyeron  | Architect
PD Inc| Certified SBA 8(a)
10 w 24th St  | Certified SBA HUBZone
Baltimore, MD | CAGE Code: 1WVR6
 
.mil: jason.j.pyeron@mail.mil
.com: jpye...@pdinc.us
tel : 202-741-9397




-- 
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: Can I request to add a software?

2021-07-09 Thread Ken Brown via Cygwin

On 7/9/2021 8:51 AM, ® Fxzx mic via Cygwin wrote:

Hello everyone,
I want to use this software: “kleopatra”, but the cygwin source does not have 
this software, so can I ask you to help add the cygwin version of this software?
Software source code here: PIM / Kleopatra · GitLab 
(kde.org)<https://invent.kde.org/pim/kleopatra>.


Are you offering to maintain it?  If so, start at

  https://cygwin.com/packages.html

and follow up on the cygwin-apps mailing list if you need help.  If not, it will 
get added if and when someone volunteers to maintain it.


Ken

--
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: Need admin privs before something can inherit them (was Re: ssh-host-config doesn't "inherit" user admin privilege)

2021-01-14 Thread Brian Inglis via Cygwin

On 2021-01-14 19:55, art wrote:
On Thursday, January 14, 2021 6:05 PM,  L A Walsh wrote: 

On 2021/01/14 17:21, art wrote:
I get a security code 5 when ssh-host-config tries to install cygsshd. I 
was logged into Win 10 pro/x64 as an admin user. The "fix" was to start a

Cygwin64 Terminal with Admin and then run ssh-host-config within this script.



You say ssh-host-config tries to install cygsshd.  How was ssh-host-config
called (started)?  When Cygwin64 Terminal was run, it was run with Admin
at the start.  Was that done when ssh-host-config was run?

How was it run?


Yes, I did a right-click on the cygwin terminal icon and chose a "run as 
administrator" option. This is like doing a sudo to start a linux shell... 
everything run in the shell inherits "admin"/"root" as appropriate. Followed

by using this shell to do:

cd /usr/bin
./ssh-host-config

I entered 'yes' responses to the various setup questions including yes to 
privileged separation. I never bumped into this sort of inheritance problem 
in Windows 7 and earlier. Seems to be a Windows 10 "feature". This past week

 I ran into the same problem using an Intel supplied command script to
install their hydra_mpi server. Another knowledgeable Windows 10 user reports
he, too, has encountered this issue.


It's been years but I don't remember anything being different under Win 7, for 
"non-native" Windows programs that are not prepared to handle elevation, whereas 
Cygwin setup is and does.


After installation I do some local tweaks to sshd_config such as disablng 
plain-text password logins. I'm able to succesfully connect using ssh/sftp 
from other platforms to this system using public key authentication. Windows

is configured to autostart cygsshd.

I can add that I previously added C:\cygwin64 to the list of Windows
Defender exceptions.


You always had to start cmd or bash with Run as Admin to run anything elevated 
e.g. C:\cygwin64\bin\bash /bin/script.


Similarly in Windows scheduled tasks: Run as SYSTEM, whether logged in or not, 
Do not store password, with highest privileges.


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

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
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: Need admin privs before something can inherit them (was Re: ssh-host-config doesn't "inherit" user admin privilege)

2021-01-14 Thread art
Yes, I did a right-click on the cygwin terminal icon and chose a "run as 
administrator" option. This is like doing a sudo to start a linux shell... 
everything run in the shell inherits "admin"/"root" as appropriate. Followed by 
using this shell to do:

cd /usr/bin
./ssh-host-config

I entered 'yes' responses to the various setup questions including yes to 
privileged separation. I never bumped into this sort of inheritance problem in 
Windows 7 and earlier. Seems to be a Windows 10 "feature". This past week I ran 
into the same problem using an Intel supplied command script to install their 
hydra_mpi server. Another knowledgeable Windows 10 user reports he, too, has 
encountered this issue.

After installation I do some local tweaks to sshd_config such as disablng 
plain-text password logins. I'm able to succesfully connect using ssh/sftp from 
other platforms to this system using public key authentication. Windows is 
configured to autostart cygsshd.

I can add that I previously added C:\cygwin64 to the list of Windows Defender 
exceptions.

Yes, I used to do a lot of work on Control Data Cyber205s, ETA-10s and Cray 
C90s. Practically speaking vector operations can make effective use of memory 
bandwidth.
In other words, a vector a day keeps the scalars away! 

Regards,

Art

-Original Message-
From: L A Walsh [mailto:cyg...@tlinx.org] 
Sent: Thursday, January 14, 2021 6:05 PM
To: art
Cc: 'cygwin@cygwin.com'
Subject: Need admin privs before something can inherit them (was Re: 
ssh-host-config doesn't "inherit" user admin privilege)

On 2021/01/14 17:21, art wrote:
> I get a security code 5 when ssh-host-config tries to install cygsshd. I was 
> logged into Win 10 pro/x64 as an admin user. The "fix" was to start a 
> Cygwin64 Terminal with Admin and then run ssh-host-config within this script. 
You say ssh-host-config tries to install cygsshd.  How was ssh-host-config
called (started)?  When Cygwin64 Terminal was run, it was run with Admin
at the start.  Was that done when ssh-host-config was run?

How was it run?

unrelated...:
> Veni, vidi, vectori! @1976, 2021
>   
---
You like vectoring, I take it?  :-)?
Cheers!
Linda
--
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


Need admin privs before something can inherit them (was Re: ssh-host-config doesn't "inherit" user admin privilege)

2021-01-14 Thread L A Walsh

On 2021/01/14 17:21, art wrote:
I get a security code 5 when ssh-host-config tries to install cygsshd. I was logged into Win 10 pro/x64 as an admin user. The "fix" was to start a Cygwin64 Terminal with Admin and then run ssh-host-config within this script. 

You say ssh-host-config tries to install cygsshd.  How was ssh-host-config
called (started)?  When Cygwin64 Terminal was run, it was run with Admin
at the start.  Was that done when ssh-host-config was run?

How was it run?

unrelated...:

Veni, vidi, vectori! @1976, 2021
  

---
You like vectoring, I take it?  :-)?
Cheers!
Linda
--
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: Fwd: Only console users can use startx

2020-09-06 Thread Jon Turney

On 02/09/2020 02:48, Jim McNamara via Cygwin wrote:

Hi all

I got tigervnc to work over ssh. I cant get past when I type startx into
the screen I logged into. It is the login screen like ctrl+f2. Any ideas?

I'm trying to look at xfce from cygwin.


There's a lot of detail missing here, so I'm forced to guess what you 
are trying to do.


Assuming it's something like 'use cygwin vncviewer to connect to a 
remote xfce session running on a vncserver through a ssh tunnel', startx 
isn't really the right tool to use here, instead adjust ~/.vnc/xstartup 
to run startxfce.

--
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


Fwd: Only console users can use startx

2020-09-01 Thread Jim McNamara via Cygwin
-- Forwarded message -
From: Jim McNamara 
Date: Tue, Sep 1, 2020, 9:46 PM
Subject: Only console users can use startx
To: 


Hi all

I got tigervnc to work over ssh. I cant get past when I type startx into
the screen I logged into. It is the login screen like ctrl+f2. Any ideas?

I'm trying to look at xfce from cygwin.

Thanks thor .
--
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


cygwin.com, how to grow your ecommerce business. Can i help

2020-09-01 Thread Clark Thompson
Hi, cygwin.com


I hope this email finds you well.

I believe you have bored with traditional SEO practice and with very less
return as compared to spending.

Hopefully, you must be aware of SEO audit, let get clear about the idea.

Auditing your website helps you discover why you are not getting more sales
& enough search traffic. In general terms, auditing is a systematic
examination of a concept, event or a result that is done in order to make
smarter decision where you stand and how to grow your business or sales.

In SEO world, auditing is a technique that will help you attract and retain
more customers. In this technique we are examining your overall site
performance setting new goals based on what you find, and implementing
tactics to reach those goals

If you want to reach your goals & grow your customer & sales, then you can
take this action now.


If you are interested in SEO audit, please reply to this email and one of
our consultants will share the detailed proposal


waiting for your response!!!

Kind Regards,

*Clark Thompson*! (SEO Specialist)

--

*Note:* Reply back with us “Interested” or engage me to send you No
Obligation Audit Report for your site.
[image: beacon]
--
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


cygport: calm can fail when BUILD_REQUIRES contains some newlines

2020-08-03 Thread Lemures Lemniscati via Cygwin
Hi!

It may cause an issue when BUILD_REQUIRES contains some newlines in
a cygport file. 

Because cygport-0.34-1 generates *src.hint with raw BUILD_REQUIRES, and
extra newlines in 'build-depends' may be rejected by calm when uploading
packages.


This is a work-around patch by squeezing white spaces in BUILD_REQUIRES.



diff -ur a/cygport-0.34.0/lib/pkg_pkg.cygpart
b/cygport-0.34.0/lib/pkg_pkg.cygpart
--- a/cygport-0.34.0/lib/pkg_pkg.cygpart2020-05-11 01:06:43.0 
+0900
+++ b/cygport-0.34.0/lib/pkg_pkg.cygpart2020-08-03 20:13:35.080509700 
+0900
@@ -915,7 +915,7 @@
then
cat > ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
 category: ${!pkg_category_var:-${CATEGORY}}
-build-depends: cygport ${BUILD_REQUIRES}
+build-depends: $(printf "%s" "cygport ${BUILD_REQUIRES}" | sed -ze 
's/[\t\n\f\r]/ /g;s/  */ /g;s/^ *//;s/ *$//')
 sdesc: "${!pkg_summary_var:-${SUMMARY}}"
 ldesc: 
"${!pkg_description_var:-${DESCRIPTION:-${!pkg_summary_var:-${SUMMARY"
 skip:




Regards, 

Lem
--
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: tcsh 6.22.02 , can we please get it for wildcard expansion bugfix?

2020-07-27 Thread Corinna Vinschen
On Jul 25 13:19, Reik Reid via Cygwin wrote:
> There is an unpleasant wildcard expansion bug in tcsh since around version
> 6.21.00, and that got fixed in 6.22.02. Can we please get 6.22.02 in cygwin?

I uploaded tcsh-6.22.02.  Thanks for the reminder.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
--
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


tcsh 6.22.02 , can we please get it for wildcard expansion bugfix?

2020-07-25 Thread Reik Reid via Cygwin
There is an unpleasant wildcard expansion bug in tcsh since around version
6.21.00, and that got fixed in 6.22.02. Can we please get 6.22.02 in cygwin?

Thx
RR
--
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


How can I access & save reg acls? RFE-/proc/registry passthrough ACL's?

2020-07-23 Thread L A Walsh
If you look in the registry editor, entry permissions similar to those
found on files -- complete access control lists for permissions,
auditing and integrity levels (MEDIUM, HIGH, SYSTEM 'Mandatory
Levels') are shown.  Also, a creation or last-mod time is stored that
may be the timestamp shown in /proc/registry.

I tried running getfacl on the /proc/registry entries, but it said it
wasn't supported.

Could, at least, R/O access to the ACL's be allowed through the proc/reg FS?

Is there some other way other than using the registry editor to look at them?

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: Where can I download the cygport source packages for a cygwin package

2020-06-29 Thread Ken Brown via Cygwin

On 6/29/2020 1:43 PM, Cary Lewis wrote:
I appreciate the reply, I found those links but they only list the files in the 
src ports - where can I download them from?


Most of the pages have links to the maintainer's source repository.  For 
example, if you to to https://cygwin.com/packages/src_package_list.html and 
click on php, you'll see the following at the bottom of the page:


  packaging repository: php.git,

where the latter is a link to

  https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/php.git

I think that's what you were asking for.

Ken
--
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: Where can I download the cygport source packages for a cygwin package

2020-06-29 Thread Cary Lewis via Cygwin
Thank you - I didn't realize that the php-7.3.7-1-src.tar.xz contains the
patches as well as the actual php src: php-7.3.7.tar.xz

the -src.tar.xz implies cygwin sources included patches, etc.



On Mon, Jun 29, 2020 at 3:19 PM Marco Atzeri via Cygwin 
wrote:

> On 29.06.2020 19:43, Cary Lewis via Cygwin wrote:
> > I appreciate the reply, I found those links but they only list the files
> in
> > the src ports - where can I download them from?
> >
>
> you can download with setup.
> The source package content will be installed in /usr/src
>
> Alternative you can download directly from any cygwin mirror, eg:
>
>
> ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/x86_64/release/php/
>
> Regards
> Marco
>
> --
> 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
>
--
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: Where can I download the cygport source packages for a cygwin package

2020-06-29 Thread Marco Atzeri via Cygwin

On 29.06.2020 19:43, Cary Lewis via Cygwin wrote:

I appreciate the reply, I found those links but they only list the files in
the src ports - where can I download them from?



you can download with setup.
The source package content will be installed in /usr/src

Alternative you can download directly from any cygwin mirror, eg:

ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/x86_64/release/php/

Regards
Marco

--
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: Where can I download the cygport source packages for a cygwin package

2020-06-29 Thread Rainer Emrich
Hi Carry,

Am 29.06.2020 um 19:43 schrieb Cary Lewis via Cygwin:
> I appreciate the reply, I found those links but they only list the files in
> the src ports - where can I download them from?
I had a short look on the cygwin webpag and indeed I didn't found any
information where to get the cygport source.

But a quick search on google shows you the right place:
https://github.com/cygwin/cygport

Cheers

Rainer


--
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: Where can I download the cygport source packages for a cygwin package

2020-06-29 Thread Cary Lewis via Cygwin
I appreciate the reply, I found those links but they only list the files in
the src ports - where can I download them from?

On Mon, Jun 29, 2020 at 11:04 AM Ken Brown via Cygwin 
wrote:

> On 6/29/2020 9:17 AM, Cary Lewis via Cygwin wrote:
> > I would like to build php locally. I know I can use the setup.exe
> installer
> > and select the src, but there must be a repo somewhere with the cygport
> > files?
>
> https://cygwin.com/packages/src_package_list.html
> --
> 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
>
--
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: Where can I download the cygport source packages for a cygwin package

2020-06-29 Thread Ken Brown via Cygwin

On 6/29/2020 9:17 AM, Cary Lewis via Cygwin wrote:

I would like to build php locally. I know I can use the setup.exe installer
and select the src, but there must be a repo somewhere with the cygport
files?


https://cygwin.com/packages/src_package_list.html
--
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


Where can I download the cygport source packages for a cygwin package

2020-06-29 Thread Cary Lewis via Cygwin
I would like to build php locally. I know I can use the setup.exe installer
and select the src, but there must be a repo somewhere with the cygport
files?

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: latest openssh can not connect to older server

2020-04-20 Thread Brian Inglis
On 2020-04-20 04:11, Thomas Wolff wrote:
> Am 19.04.2020 um 14:31 schrieb Sharuzzaman Ahmat Raslan via Cygwin:
>> On Sun, 19 Apr 2020, 8:13 pm David Balažic via Cygwin, wrote:
>>> I tried to backup some files from my server with scp and failed:
>>> $ scp  -v  root@the.server:/root/a.file  .
>>> Executing: program /usr/bin/ssh host the.server, user root, command
>>> scp -v -f /root/a.file
>>> OpenSSH_8.2p1, OpenSSL 1.1.1f  31 Mar 2020
>>> debug1: Connecting to the.server [192.168.1.11] port 22.
>>> debug1: Connection established.
>>> debug1: identity file /home/stein/.ssh/id_rsa type -1
>>> debug1: identity file /home/stein/.ssh/id_rsa-cert type -1
>>> debug1: identity file /home/stein/.ssh/id_dsa type -1
>>> debug1: identity file /home/stein/.ssh/id_dsa-cert type -1
>>> debug1: identity file /home/stein/.ssh/id_ecdsa type -1
>>> debug1: identity file /home/stein/.ssh/id_ecdsa-cert type -1
>>> debug1: identity file /home/stein/.ssh/id_ecdsa_sk type -1
>>> debug1: identity file /home/stein/.ssh/id_ecdsa_sk-cert type -1
>>> debug1: identity file /home/stein/.ssh/id_ed25519 type -1
>>> debug1: identity file /home/stein/.ssh/id_ed25519-cert type -1
>>> debug1: identity file /home/stein/.ssh/id_ed25519_sk type -1
>>> debug1: identity file /home/stein/.ssh/id_ed25519_sk-cert type -1
>>> debug1: identity file /home/stein/.ssh/id_xmss type -1
>>> debug1: identity file /home/stein/.ssh/id_xmss-cert type -1
>>> debug1: Local version string SSH-2.0-OpenSSH_8.2
>>> debug1: Remote protocol version 2.0, remote software version
>>> dropbear_2011.54
>>> debug1: no match: dropbear_2011.54
>>> debug1: Authenticating to the.server:22 as 'root'
>>> debug1: SSH2_MSG_KEXINIT sent
>>> debug1: SSH2_MSG_KEXINIT received
>>> debug1: kex: algorithm: (no match)
>>> Unable to negotiate with 192.168.1.11 port 22: no matching key
>>> exchange method found. Their offer:
>>> diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
>>> I tried OpenSSH_8.0p1-2 which is still available in the cygwin
>>> setup-x86_64.exe wizard and that version works fine.
>>> (the version above is 8.2.p1-1 in the setup wizard)
>> New OpenSSH client will not connect to server that use SHA1.
>> Please refer to this: https://www.openssh.com/legacy.html
>> You should configure your old server to use more modern cipher

> This isn't always a feasible approach. I access a WD MybookLive NAS storage
> via ssh. It still works with current openssh (8.2) but I wouldn't know how to
> find out the methods supported by my server and wouldn't like to risk the
> adventure to upgrade such a device. Therefore I'd suggest to configure in
> "legacy" methods in the cygwin openssh package as mentioned under the link
> above, to avoid such trouble.
Many corps maintain legacy applications on legacy systems using legacy devices,
and not everyone can afford (especially nowadays) the money or the effort or the
expertise, nor should they ever be forced (remember freedom) to upgrade legacy
devices, systems, or applications, as the vendor and/or code may be long gone.

When browsers and security libraries decided to incompatibly totally drop all
support for legacy SSL, rather than make continued use configurable on a per
site basis, I had to quickly reconfigure my recently purchased (and still CVE
free) router to downgrade from HTTPS to HTTP local port access to be able to
continue having access to it.
I could perhaps have tried to keep a legacy copy of some browser around, but
parallel releases are unsupported, and package upgrades try hard to ensure old
releases are eliminated.

[ToWo: From WD support, your NAS is EoL and unsupported, and the forums indicate
you may have a bigger problem (soon?) as Windows appears to be dropping support
for SMB1 required to access your NAS.
For OpenSSH, your best approach may be to get sources for it and its library
dependencies, and ensure that you can build them with cygport, so if all support
is dropped from OpenSSH as I would expect, you still have access. The advantage
of freedom!]

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

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
--
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: latest openssh can not connect to older server

2020-04-20 Thread Thomas Wolff

Am 19.04.2020 um 14:31 schrieb Sharuzzaman Ahmat Raslan via Cygwin:

Hi.

New OpenSSH client will not connect to server that use SHA1.

Please refer to this: https://www.openssh.com/legacy.html

You should configure your old server to use more modern cipher
This isn't always a feasible approach. I access a WD MybookLive NAS 
storage via ssh. It still works with current openssh (8.2) but I 
wouldn't know how to find out the methods supported by my server and 
wouldn't like to risk the adventure to upgrade such a device. Therefore 
I'd suggest to configure in "legacy" methods in the cygwin openssh 
package as mentioned under the link above, to avoid such trouble.

Thomas


Thank you

On Sun, 19 Apr 2020, 8:13 pm David Balažic via Cygwin, 
wrote:


Hi!

I tried to backup some files from my server with scp and failed:

$ scp  -v  root@the.server:/root/a.file  .
Executing: program /usr/bin/ssh host the.server, user root, command
scp -v -f /root/a.file
OpenSSH_8.2p1, OpenSSL 1.1.1f  31 Mar 2020
debug1: Connecting to the.server [192.168.1.11] port 22.
debug1: Connection established.
debug1: identity file /home/stein/.ssh/id_rsa type -1
debug1: identity file /home/stein/.ssh/id_rsa-cert type -1
debug1: identity file /home/stein/.ssh/id_dsa type -1
debug1: identity file /home/stein/.ssh/id_dsa-cert type -1
debug1: identity file /home/stein/.ssh/id_ecdsa type -1
debug1: identity file /home/stein/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/stein/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/stein/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/stein/.ssh/id_ed25519 type -1
debug1: identity file /home/stein/.ssh/id_ed25519-cert type -1
debug1: identity file /home/stein/.ssh/id_ed25519_sk type -1
debug1: identity file /home/stein/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/stein/.ssh/id_xmss type -1
debug1: identity file /home/stein/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2
debug1: Remote protocol version 2.0, remote software version
dropbear_2011.54
debug1: no match: dropbear_2011.54
debug1: Authenticating to the.server:22 as 'root'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: (no match)
Unable to negotiate with 192.168.1.11 port 22: no matching key
exchange method found. Their offer:
diffie-hellman-group1-sha1,diffie-hellman-group14-sha1


I tried OpenSSH_8.0p1-2 which is still available in the cygwin
setup-x86_64.exe wizard and that version works fine.
(the version above is 8.2.p1-1 in the setup wizard)

Regards,
David
--
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


--
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


--
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: latest openssh can not connect to older server

2020-04-19 Thread Sharuzzaman Ahmat Raslan via Cygwin
Hi.

New OpenSSH client will not connect to server that use SHA1.

Please refer to this: https://www.openssh.com/legacy.html

You should configure your old server to use more modern cipher

Thank you

On Sun, 19 Apr 2020, 8:13 pm David Balažic via Cygwin, 
wrote:

> Hi!
>
> I tried to backup some files from my server with scp and failed:
>
> $ scp  -v  root@the.server:/root/a.file  .
> Executing: program /usr/bin/ssh host the.server, user root, command
> scp -v -f /root/a.file
> OpenSSH_8.2p1, OpenSSL 1.1.1f  31 Mar 2020
> debug1: Connecting to the.server [192.168.1.11] port 22.
> debug1: Connection established.
> debug1: identity file /home/stein/.ssh/id_rsa type -1
> debug1: identity file /home/stein/.ssh/id_rsa-cert type -1
> debug1: identity file /home/stein/.ssh/id_dsa type -1
> debug1: identity file /home/stein/.ssh/id_dsa-cert type -1
> debug1: identity file /home/stein/.ssh/id_ecdsa type -1
> debug1: identity file /home/stein/.ssh/id_ecdsa-cert type -1
> debug1: identity file /home/stein/.ssh/id_ecdsa_sk type -1
> debug1: identity file /home/stein/.ssh/id_ecdsa_sk-cert type -1
> debug1: identity file /home/stein/.ssh/id_ed25519 type -1
> debug1: identity file /home/stein/.ssh/id_ed25519-cert type -1
> debug1: identity file /home/stein/.ssh/id_ed25519_sk type -1
> debug1: identity file /home/stein/.ssh/id_ed25519_sk-cert type -1
> debug1: identity file /home/stein/.ssh/id_xmss type -1
> debug1: identity file /home/stein/.ssh/id_xmss-cert type -1
> debug1: Local version string SSH-2.0-OpenSSH_8.2
> debug1: Remote protocol version 2.0, remote software version
> dropbear_2011.54
> debug1: no match: dropbear_2011.54
> debug1: Authenticating to the.server:22 as 'root'
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug1: kex: algorithm: (no match)
> Unable to negotiate with 192.168.1.11 port 22: no matching key
> exchange method found. Their offer:
> diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
>
>
> I tried OpenSSH_8.0p1-2 which is still available in the cygwin
> setup-x86_64.exe wizard and that version works fine.
> (the version above is 8.2.p1-1 in the setup wizard)
>
> Regards,
> David
> --
> 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
>
--
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


latest openssh can not connect to older server

2020-04-19 Thread David Balažic via Cygwin
Hi!

I tried to backup some files from my server with scp and failed:

$ scp  -v  root@the.server:/root/a.file  .
Executing: program /usr/bin/ssh host the.server, user root, command
scp -v -f /root/a.file
OpenSSH_8.2p1, OpenSSL 1.1.1f  31 Mar 2020
debug1: Connecting to the.server [192.168.1.11] port 22.
debug1: Connection established.
debug1: identity file /home/stein/.ssh/id_rsa type -1
debug1: identity file /home/stein/.ssh/id_rsa-cert type -1
debug1: identity file /home/stein/.ssh/id_dsa type -1
debug1: identity file /home/stein/.ssh/id_dsa-cert type -1
debug1: identity file /home/stein/.ssh/id_ecdsa type -1
debug1: identity file /home/stein/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/stein/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/stein/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/stein/.ssh/id_ed25519 type -1
debug1: identity file /home/stein/.ssh/id_ed25519-cert type -1
debug1: identity file /home/stein/.ssh/id_ed25519_sk type -1
debug1: identity file /home/stein/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/stein/.ssh/id_xmss type -1
debug1: identity file /home/stein/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2
debug1: Remote protocol version 2.0, remote software version dropbear_2011.54
debug1: no match: dropbear_2011.54
debug1: Authenticating to the.server:22 as 'root'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: (no match)
Unable to negotiate with 192.168.1.11 port 22: no matching key
exchange method found. Their offer:
diffie-hellman-group1-sha1,diffie-hellman-group14-sha1


I tried OpenSSH_8.0p1-2 which is still available in the cygwin
setup-x86_64.exe wizard and that version works fine.
(the version above is 8.2.p1-1 in the setup wizard)

Regards,
David
--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread René Berber via Cygwin

On 4/15/2020 1:39 PM, Paul Moore via Cygwin wrote:


https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats

Look for "DOS device paths"


Thanks. That's \\?\C:\... and what I'm seeing is \??\C:\...

Is that just a typo/bug? That's the discrepancy that was confusing me :-(


A bug.

If setup.exe stores those paths, then its a bug there.

You could have tested that easily, on a cmd window:


C:\Users\reneb>dir \\?\C:\
 Volume in drive \\?\C: is OS
 Volume Serial Number is 922E-C431

 Directory of \\?\C:

12/09/2019  02:52 PM  Apps
01/04/2020  03:11 PM  Boot
04/05/2020  12:12 PM  cygwin64
...
12/24/2019  08:09 PM  Users
04/14/2020  05:45 PM  Windows
   0 File(s)  0 bytes
  14 Dir(s)   0 bytes free

C:\Users\reneb>dir \?\C:\
The filename, directory name, or volume label syntax is incorrect.
--
R.B.
--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread Paul Moore via Cygwin
On Wed, 15 Apr 2020 at 19:31, René Berber via Cygwin  wrote:
>
> On 4/15/2020 1:10 PM, Paul Moore via Cygwin wrote:
>
> [snip]
> > Thanks. Can you explain what the \?? prefix on the Installations
> > values is about? I'm nervous that there's something going on there
> > that means that just ignoring the first 3 characters isn't
> > sufficient... ;-)
>
> https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats
>
> Look for "DOS device paths"

Thanks. That's \\?\C:\... and what I'm seeing is \??\C:\...

Is that just a typo/bug? That's the discrepancy that was confusing me :-(

Paul
--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread René Berber via Cygwin

On 4/15/2020 1:10 PM, Paul Moore via Cygwin wrote:

[snip]

Thanks. Can you explain what the \?? prefix on the Installations
values is about? I'm nervous that there's something going on there
that means that just ignoring the first 3 characters isn't
sufficient... ;-)


https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats

Look for "DOS device paths"
--
R.B.
--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread Paul Moore via Cygwin
On Wed, 15 Apr 2020 at 16:54, Marco Atzeri via Cygwin  wrote:
>
> Am 15.04.2020 um 15:29 schrieb Paul Moore via Cygwin:
> > On Wed, 15 Apr 2020 at 11:54, Csaba Ráduly via Cygwin  
> > wrote:
> >
> >> On my machine, I have a
> >>
> >> HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
> >>
> >> key, which contains a string value named "rootdir" with the date 
> >> "C:\cygwin64".
> >
> > Thanks, that looks more useful. I didn't think to check there as I
> > didn't recall having run the setup as "All users" so I assumed
> > everything would be in HKCU. I should have checked!
> > Paul
> > --
>
>
> Pay attention that Setup links to the last updated one 64 or 32bit
>
> Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Setup
> Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Cygwin\Setup
>
> Installations report all if more are installed (borderline case, maybe)
>
> Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
> Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Cygwin\Installations
>
> both version 32 and 64 bit are reported on
>
> Computer\HKEY_CURRENT_USER\Software\Cygwin\Installations

Thanks. Can you explain what the \?? prefix on the Installations
values is about? I'm nervous that there's something going on there
that means that just ignoring the first 3 characters isn't
sufficient... ;-)

Paul
--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread Marco Atzeri via Cygwin

Am 15.04.2020 um 15:29 schrieb Paul Moore via Cygwin:

On Wed, 15 Apr 2020 at 11:54, Csaba Ráduly via Cygwin  wrote:


On my machine, I have a

HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup

key, which contains a string value named "rootdir" with the date "C:\cygwin64".


Thanks, that looks more useful. I didn't think to check there as I
didn't recall having run the setup as "All users" so I assumed
everything would be in HKCU. I should have checked!
Paul
--



Pay attention that Setup links to the last updated one 64 or 32bit

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Setup
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Cygwin\Setup

Installations report all if more are installed (borderline case, maybe)

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Cygwin\Installations

both version 32 and 64 bit are reported on

Computer\HKEY_CURRENT_USER\Software\Cygwin\Installations

--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread Paul Moore via Cygwin
On Wed, 15 Apr 2020 at 13:43, Thomas Wolff  wrote:

> >> There's HKCU\Software\Cygwin\Installations, but that seems to use \??
> >> prefixes on the PATH, which I'm not sure how to interpret
> Running that script within cygwin? `mount | grep " / "`

As I said, I'm trying to find cygwin, so I can't run anything from
within cygwin at this point :-(

Paul
--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread Paul Moore via Cygwin
On Wed, 15 Apr 2020 at 11:54, Csaba Ráduly via Cygwin  wrote:

> On my machine, I have a
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
>
> key, which contains a string value named "rootdir" with the date 
> "C:\cygwin64".

Thanks, that looks more useful. I didn't think to check there as I
didn't recall having run the setup as "All users" so I assumed
everything would be in HKCU. I should have checked!
Paul
--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread Thomas Wolff

Am 15.04.2020 um 12:51 schrieb Csaba Raduly via Cygwin:

Hi Paul,

On Wed, Apr 15, 2020 at 12:30 PM Paul Moore via Cygwin 
wrote:


I'm trying to write an automation script that works on a number of
machines. I know that on all machines Cygwin will be installed, but I
cannot guarantee that (1) it will be in the same location on each PC,
or (2) that it will be in PATH.

There's HKCU\Software\Cygwin\Installations, but that seems to use \??
prefixes on the PATH, which I'm not sure how to interpret

Running that script within cygwin? `mount | grep " / "`



On my machine, I have a

HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup

key, which contains a string value named "rootdir" with the date
"C:\cygwin64".

Csaba



--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread Csaba Ráduly via Cygwin

Hi Paul,

On 15/04/2020 12:29, Paul Moore via Cygwin wrote:

I'm trying to write an automation script that works on a number of
machines. I know that on all machines Cygwin will be installed, but I
cannot guarantee that (1) it will be in the same location on each PC,
or (2) that it will be in PATH.

There's HKCU\Software\Cygwin\Installations, but that seems to use \??
prefixes on the PATH, which I'm not sure how to interpret 

...

On my machine, I have a

HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup

key, which contains a string value named "rootdir" with the date "C:\cygwin64".

Csaba

--
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
--
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: Can I find where cygwin is installed (for automation purposes)

2020-04-15 Thread Csaba Raduly via Cygwin
Hi Paul,

On Wed, Apr 15, 2020 at 12:30 PM Paul Moore via Cygwin 
wrote:

> I'm trying to write an automation script that works on a number of
> machines. I know that on all machines Cygwin will be installed, but I
> cannot guarantee that (1) it will be in the same location on each PC,
> or (2) that it will be in PATH.
>
> There's HKCU\Software\Cygwin\Installations, but that seems to use \??
> prefixes on the PATH, which I'm not sure how to interpret
>
On my machine, I have a

HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup

key, which contains a string value named "rootdir" with the date
"C:\cygwin64".

Csaba

-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant
way
to get the wrong information: this is what you want. - Scott Meyers
(C++TDaWYK)
--
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


  1   2   3   4   5   6   7   8   9   10   >