Re: Deltacopy issue

2023-08-19 Thread cygwinautoreply--- via Cygwin
>Error in rsync protocol data stream
>Rsync.exe returned an error. Will try again. This is retry number 3 of 5

>Executing: rsync.exe  -v -rlt -z --chmod=a=rw,Da+x --delete
>"/cygdrive/D/SMS/" "
>  1 [main] rsync 26360 find_fast_cwd: WARNING: Couldn't compute
>FAST_CWD pointer.  Please report this problem to
>the public mailing list cygwin@cygwin.com

>Jhunior Leandro Payero
>305-417-3767


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


Deltacopy issue

2023-08-19 Thread Jhunior Payero via Cygwin
Error in rsync protocol data stream
Rsync.exe returned an error. Will try again. This is retry number 3 of 5

Executing: rsync.exe  -v -rlt -z --chmod=a=rw,Da+x --delete
"/cygdrive/D/SMS/" "
  1 [main] rsync 26360 find_fast_cwd: WARNING: Couldn't compute
FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com

-- 
Jhunior Leandro Payero
305-417-3767

-- 
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 pathconf() query filesystem kernel data? Re: How does Cygwin detect MSFT NFSv3 file system? Re: Weird (path) problems with cygwin test release 3.5.0-0.384.g9939aa7d0945.x86_64 ...

2023-08-19 Thread Brian Inglis via Cygwin

On 2023-08-18 07:09, Martin Wege via Cygwin wrote:

On Fri, Aug 18, 2023 at 10:44 AM Corinna Vinschen via Cygwin
 wrote:


On Aug 17 20:49, Martin Wege via Cygwin wrote:

On Mon, Aug 14, 2023 at 10:56 PM Corinna Vinschen via Cygwin
 wrote:

and the result is the same.  Note that Cygwin supports MSFT NFSv3 but
not CITI NFSv4.1 internally.  No gurantee that Cygwin always does what
is necessary for that other NFS.


1. How does Cygwin detect whether something is a MSFT NFSv3, or not?
Cygwin /bin/mount lists the CITI NFSv4.1 as 'nfs', so there *IS*
something which detects that?


The filesystem name returned by NtQueryVolumeInformationFile is "NFS".
If any other NFS returns the same filesystem name, it will be treated
just like MSFT NFSv3.


2. Are Cygwin soft link handing depend on MSFT NFSv3 or not, i.e. does
the Cygwin soft link code behave differently for MSFT NFSv3 file
systems?


Yes.  NFS doesn't support symlink creation and symlink reading via
the usual functions, because Windows symlinks are created as reparse
points.  NFS doesn't support reparse points.  So the developers of
the MSFT NFS client had to invent their own way to create and
read NFS symlinks:

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

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


3. Does Cygwin implement the pathconf() api?


Yes.  Surprisingly, you can check this yourself by just calling the
function and trying to compile your code.


Apologies, how do we say in German? "Ich sollte meine Frage konkretisieren:"

Does the Cygwin implementation of pathconf() support query data of the
underlying filesystem based on data from the kernel, as UNIX does? So
pathconf() returns different values for NTFS, ReFS, or Windows builtin
NFSv3?

I am asking, because as far as I know the Linux implementation is not
a syscall, and instead glibc guesses values based on builtin static
data, and whatever fstatfs() has to offer. Compared to that UNIX
(Solaris, AIX, HPUX, ...) have pathconf() as a syscall, and actually
ask the filesystem itself.


Many library functions are implemented as documented either in the Cygwin 
packages cygwin-doc and man-pages-posix available for installation; and use as 
e.g. `man 3p fpathconf`, also available online at:

https://pubs.opengroup.org/onlinepubs/9699919799/functions/fpathconf.html or
https://man7.org/linux/man-pages/man3/fpathconf.3p.html
and for comparison and reference we make Cygwin package man-pages-linux 
available for installation; and use as e.g. `man -m linux 3 fpathconf`, also 
available online at:


https://man7.org/linux/man-pages/man3/fpathconf.3.html

suggestions for setup are in the package announcements made every 9-12 weeks 
when the latest Linux man-pages package is released and updated on Cygwin.


Please also note that the getconf(1) program is installed as part of Cygwin and 
can access f/pathconf variables associated with a pathname argument, as shown in 
getconf(1) `man 1 getconf` and getconf(1p) `man 1p getconf`.



--
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: Test for Windows Administrator permissions from Cygwin terminal|script?

2023-08-19 Thread Bill Stewart via Cygwin
On Sat, Aug 19, 2023 at 2:15 AM ASSI wrote:

Windows really doesn't have a defined notion of what is or is not an
> "administrator".  Each particular definition will be insufficient or
> invalid in certain contexts.
>

There is a definition of administrator in Windows: Your account is a
member, either directly or indirectly, of the Administrators group (SID
1-5-32-544).

With the introduction of User Account Control (UAC) in Windows Vista, if
you log on as a member of this group, processes are normally started with
the Administrators group disabled (i.e, the process is not running as a
member of Administrators). The "run as administrator" action starts a
process with the group enabled. This is commonly referred to as
"elevation." [Side note: As I understand it, one of the reasons UAC was
introduced was made was to break (some?) software developers' habits of
assuming their programs run as administrator, and to choose better data
storage paths, registry paths, etc. See
https://techcommunity.microsoft.com/t5/windows-blog-archive/faq-why-can-8217-t-i-bypass-the-uac-prompt/ba-p/701510
for a nice summary. Also helpful is the current docs on SIDs:
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers
]

On a domain, the Domain Admins group (which has a relative identifier, or
RID, of 512) is by default a member of the Administrators group. The
Administrators group is still there (same SID, S-1-5-32-544), and is called
a "Domain Local Security Group" (i.e., it's a local group that's shared by
all domain controllers.)

Hope this helps clarify.

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


[ANNOUNCEMENT] Updated: pkgconf 2.0.2-1

2023-08-19 Thread ASSI via Cygwin


The following packages have been uploaded to the Cygwin distribution:

 libpkgconf-devel-2.0.2-1
 libpkgconf4-2.0.2-1
 pkg-config-2.0.2-1
 pkgconf-2.0.2-1

pkgconf is a program which helps to configure compiler and linker flags 
for development frameworks.  It is an alternative to pkg-config.

This is an update to the latest upstream release.  The cross-pkg-config 
commands have been switched to symlinks based on upstream advice.

-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

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

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

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

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

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

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


Updated: pkgconf 2.0.2-1

2023-08-19 Thread ASSI


The following packages have been uploaded to the Cygwin distribution:

 libpkgconf-devel-2.0.2-1
 libpkgconf4-2.0.2-1
 pkg-config-2.0.2-1
 pkgconf-2.0.2-1

pkgconf is a program which helps to configure compiler and linker flags 
for development frameworks.  It is an alternative to pkg-config.

This is an update to the latest upstream release.  The cross-pkg-config 
commands have been switched to symlinks based on upstream advice.

-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

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

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

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

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

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


[ANNOUNCEMENT] Updated: {mingw64-{i686,x86_64}-,}zlib-1.3-1

2023-08-19 Thread ASSI via Cygwin


The following packages have been uploaded to the Cygwin distribution:

* zlib0-1.3-1
* zlib-devel-1.3-1
* mingw64-i686-zlib-1.3-1
* mingw64-x86_64-zlib-1.3-1

zlib is designed to be a free, general-purpose, lossless
data-compression library for use on virtually any computer hardware and
operating system.  The zlib data format is itself portable across
platforms.

This is an update to the latest upstream release.

-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

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

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

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

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

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

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


Updated: {mingw64-{i686,x86_64}-,}zlib-1.3-1

2023-08-19 Thread ASSI


The following packages have been uploaded to the Cygwin distribution:

* zlib0-1.3-1
* zlib-devel-1.3-1
* mingw64-i686-zlib-1.3-1
* mingw64-x86_64-zlib-1.3-1

zlib is designed to be a free, general-purpose, lossless
data-compression library for use on virtually any computer hardware and
operating system.  The zlib data format is itself portable across
platforms.

This is an update to the latest upstream release.

-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

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

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

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

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

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


Re: Persistent and same Cygwin session for Windows login and ssh login?

2023-08-19 Thread Dr Bean via Cygwin
On Thu, 17 Aug 2023, Dr Bean via Cygwin wrote:

> On Thu, 17 Aug 2023, Cedric Blancher via Cygwin wrote:
> 
> > Good evening!
> > 
> > How can I get a Cygwin session for one Windows login, and get the same
> > Cygwin session when I log into the same Windows machine via ssh?
> 
> 
> Following 
> https://learn.microsoft.com/ja-jp/windows-server/administration/openssh/openssh_server_configuration
> 
> and substituting cygwin bash's
> path for powershell's, I get
> a cygwin bash shell.
> 
> But $HOME is Window's and .bashrc
> is not executed.
> 
> Let me see if I can set HOME.

I appear to have answered a
question which wasn't asked,
how to get Microsoft's
implementation of sshd working.

i have run up against the problem 
of the OP, trying and failing
to reattach a detached screen
session over ssh.

Solving my own problem of wrong
HOME and no execution of bashrc,
a Windows batch file that sets HOME
and invokes bash with
interactive, login and rcfile
options did the trick.

But is there an official way
to run cygwin with MS's sshd?

> > 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
> -- 
> Greg Matheson  Theory and practice. In theory, they are the same 
> thing.
> http://drbean.sdf.org  In practice, they are different.
> drb...@freeshell.org   --https://quoteinvestigator.com/2018/04/14/theory/

-- 
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: Test for Windows Administrator permissions from Cygwin terminal|script?

2023-08-19 Thread ASSI via Cygwin
Martin Wege via Cygwin writes:
> How can I find out whether the current Cygwin terminal has
> Administrator rights? I want to safeguard our admin scripts with a
> simple test and bail out with an error if someone wants to do admin
> stuff (say: regtool) without admin privileges.

Windows really doesn't have a defined notion of what is or is not an
"administrator".  Each particular definition will be insufficient or
invalid in certain contexts.  When you're dealing with hardened
installations (via group policies or otherwise), large windows domains
and/or server administration you may have to be way more specific than
just looking at one simple indication.

That said, most commonly the presence of SID S-1-5-32-544 in your user
token (in Cygwin: gid=544, unless you override it in the group config)
will be the best simple approximation.  Incidentally, this is what tcsh
is using on Cygwin to define the "superuser" for the purpose of setting
the prompt with "%#":
https://github.com/tcsh-org/tcsh/blob/d075ab5b4155ebff9d30e765733c030c3da5e362/tc.prompt.c#L212

For (ba)sh scripts you can parse the output from id along the lines of

id -G | grep -q '\<544\>' && echo admin || echo "not admin"

should be most workable.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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


[PATCH] Cygwin: pty: Fix failure to clear switch_to_nat_pipe flag.

2023-08-19 Thread Takashi Yano
After the commit fbfea31dd9b9, switch_to_nat_pipe is not cleared
properly when non-cygwin app is terminated in the case where the
pseudo console is disabled. This is because get_winpid_to_hand_over()
sometimes returns PID of cygwin process even though it should return
only PID of non-cygwin process. This patch fixes the issue by adding
a new argument which requests only PID of non-cygwin process to
get_console_process_id().

Fixes: fbfea31dd9b9 ("Cygwin: pty: Avoid cutting the branch the pty master is 
sitting on.")
Signed-off-by: Takashi Yano 
---
 winsup/cygwin/fhandler/pty.cc   | 11 ---
 winsup/cygwin/local_includes/fhandler.h |  3 ++-
 winsup/cygwin/release/3.4.9 |  6 ++
 3 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 winsup/cygwin/release/3.4.9

diff --git a/winsup/cygwin/fhandler/pty.cc b/winsup/cygwin/fhandler/pty.cc
index 607333f52..3f4bc56b5 100644
--- a/winsup/cygwin/fhandler/pty.cc
+++ b/winsup/cygwin/fhandler/pty.cc
@@ -85,7 +85,8 @@ inline static bool process_alive (DWORD pid);
  stub_only: return only stub process's pid of non-cygwin process. */
 DWORD
 fhandler_pty_common::get_console_process_id (DWORD pid, bool match,
-bool cygwin, bool stub_only)
+bool cygwin, bool stub_only,
+bool nat)
 {
   tmp_pathbuf tp;
   DWORD *list = (DWORD *) tp.c_get ();
@@ -109,6 +110,8 @@ fhandler_pty_common::get_console_process_id (DWORD pid, 
bool match,
else
  {
pinfo p (cygwin_pid (list[i]));
+   if (nat && !!p && !ISSTATE(p, PID_NOTCYGWIN))
+ continue;
if (!!p && p->exec_dwProcessId)
  {
res_pri = stub_only ? p->exec_dwProcessId : list[i];
@@ -3511,9 +3514,11 @@ fhandler_pty_slave::get_winpid_to_hand_over (tty *ttyp,
 {
   /* Search another native process which attaches to the same console */
   DWORD current_pid = myself->exec_dwProcessId ?: myself->dwProcessId;
-  switch_to = get_console_process_id (current_pid, false, true, true);
+  switch_to = get_console_process_id (current_pid,
+ false, true, true, true);
   if (!switch_to)
-   switch_to = get_console_process_id (current_pid, false, true, false);
+   switch_to = get_console_process_id (current_pid,
+   false, true, false, true);
 }
   return switch_to;
 }
diff --git a/winsup/cygwin/local_includes/fhandler.h 
b/winsup/cygwin/local_includes/fhandler.h
index 03b51a7e4..9af5f716c 100644
--- a/winsup/cygwin/local_includes/fhandler.h
+++ b/winsup/cygwin/local_includes/fhandler.h
@@ -2399,7 +2399,8 @@ class fhandler_pty_common: public fhandler_termios
   void resize_pseudo_console (struct winsize *);
   static DWORD get_console_process_id (DWORD pid, bool match,
   bool cygwin = false,
-  bool stub_only = false);
+  bool stub_only = false,
+  bool nat = false);
   bool to_be_read_from_nat_pipe (void);
   static DWORD attach_console_temporarily (DWORD target_pid);
   static void resume_from_temporarily_attach (DWORD resume_pid);
diff --git a/winsup/cygwin/release/3.4.9 b/winsup/cygwin/release/3.4.9
new file mode 100644
index 0..d089e5a9a
--- /dev/null
+++ b/winsup/cygwin/release/3.4.9
@@ -0,0 +1,6 @@
+Bug Fixes
+-
+
+- Fix a bug introduced in cygwin 3.4.0 that switch_to_nat_pipe flag is
+  not cleared properly when non-cygwin app is terminated in the case
+  where pseudo console is not activated.
-- 
2.39.0