Re: POSIX permission mapping and NULL SIDs

2016-06-29 Thread Bill Zissimopoulos
On 6/29/16, 1:21 AM, "Corinna Vinschen"  wrote:


>If that's the case, then why do you explain all these things to me?  I'm
>a bit at a loss to see the difference between me explaining things to
>you you already know vs. you explaing things to me I already know.
>Aren't we kind of on par here?

Yes, we are.

Perhaps I spoke “out of turn” as the Americans say. I am sorry if it also
felt like I was explaining things that you know.

>>In any case I will use your mapping of S-1-0-65534 <-> 65534.
>
>Thanks.  Do you want to add handling for this mapping to
>pwdgrp::fetch_account_from_windows yourself or shall I do it?  I could
>come up with a patch in the next couple of days.  I will prepare a
>developer's snapshot then, so you can immediately test if it works as
>desired.

I have already added the mapping to WinFsp-FUSE. I can look into what is
required to patch Cygwin.

>>How do we avoid name collisions?  I can easily see admins creating an
>>AD account called "nobody".
>>Shall we fake a "WinFSP" domain such that the name is "WinFSP+nobody"?
>
>Preliminary patch attached.

Ok, looks like you have patched it already. Thanks for this.

BTW, if the name is case-sensitive (strcmp) I usually use the “WinFsp”
capitalization, if it makes a difference.

Also do you foresee any situation where the “nobody” mapping might be
useful outside of WinFsp? Perhaps it would make more sense to name it
“nodomain+nobody”? Just a suggestion.

Many thanks.

Bill



Use of spawnvp function makes console window appear.

2016-06-29 Thread Kaz Kylheku

Hi all,

I've encountered a strange behavior. When a Cygwin C application that is
compiled with "-mwindows" tries to spawn another program, that 
application

suddenly gets a console window!

Here is a simple, complete, repro case, that demonstrates the problem
under Cygwin 2.5.2, on Windows 7:

#include 
#include 

int main(void)
{
   const char * const argv[] = {
 "c:/Windows/System32/notepad.exe",
 0
   };

   Sleep(5000);
   return spawnvp(_P_WAIT, argv[0], argv);
}

This is compiled as:

gcc -mwindows spawn.c -o spawn

If we launch this from the Windows Shell, then, correctly, it runs
with no console window. Nothing appears on the display for five
seconds, while it sits in the Sleep call.

Then, a console window opens with spawn.exe in its title,
immediately followed by the Notepad window over top.

What the heck?

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



Re: Why does ldd not show cyg*.dll in its output?

2016-06-29 Thread David Macek
On 20. 5. 2016 3:20, Warren Young wrote:
> On May 19, 2016, at 5:21 PM, Hans-Bernhard Bröker  
> wrote:
>>
>> Does not WFM:
> 
> [snip]
> 
>> This is with ldd.exe from cygwin-2.5.1-1, on Win10 64bit, installed into 
>> c:\cygwin64

Just bumped into this as well.

Win10 64bit (1607 build 14367) with MSYS2 64bit:

$ ldd /usr/bin/ls
ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7fff19e6)
KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7fff198a)
KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7fff1724)

Win8.x 64bit with MSYS2 64bit:

$ ldd /usr/bin/ls
ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffda381)
KERNEL32.DLL => /c/Windows/system32/KERNEL32.DLL (0x7ffda331)
KERNELBASE.dll => /c/Windows/system32/KERNELBASE.dll (0x7ffda0d8)
msys-intl-8.dll => /usr/bin/msys-intl-8.dll (0x430b3)
msys-2.0.dll => /usr/bin/msys-2.0.dll (0x18004)
msys-iconv-2.dll => /usr/bin/msys-iconv-2.dll (0x3ff76)

Both installations are up to date and should have identical binaries.

Looking into procmon, the only relevant difference I see is `sysmain.sdb` being 
checked right after `ls.exe` process creation, but that could very well be a 
red herring. Unfortunately, ACT seems to be broken on Win10.

I can try watching them side by side in debuggers tomorrow, maybe I'll find 
something.

-- 
David Macek



smime.p7s
Description: S/MIME Cryptographic Signature


Re: ldd differences

2016-06-29 Thread David Macek
Sorry to hijack an old thread, but I think maybe the problem is not with ldd 
not understanding the binary, but with 64-bit libraries being mixed in (due to 
the WOW64 redirection not being enabled in some place).

-- 
David Macek



smime.p7s
Description: S/MIME Cryptographic Signature


RE: Cygwin IPC - ftok() returns negative values - Bug Report

2016-06-29 Thread Stanisław Wawszczak
>
> Do you have the cygserver service running?  (See
> /usr/share/doc/Cygwin/cygserver.README.)
> 
> Ken
Yes, I have. And I have believed that defaults are as stated in config file, 
but they aren't.
Just after uncommenting the
 kern.ipc.semmsl 60
config line and restarting the cygserver it started working.
Thank you for help.

Best Regards,
Stanislaw
--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin IPC - ftok() returns negative values - Bug Report

2016-06-29 Thread Ken Brown

On 6/29/2016 3:20 PM, Stanisław Wawszczak wrote:

On 29/06/2016 18:06, Stanisław Wawszczak wrote:

*Real question is why Cygwin's implementation of getsem() is not allowing to 
ask for more than nsems == 1?*
Here is stated, that the platform is limiting the nsems value: 
http://pubs.opengroup.org/onlinepubs/9699919799/functions/semget.html#tag_16_512
This code is not working, return errno == 22 (EINVAL, I guess...)
#include 
#include 
#include 
#include 

int main(int argc, char**argv)
{
int provs = 100;
key_t semHandle = ftok("/etc/fstab", 'A');
int sfcbSem = -1;
printf("semHandle <= 0 ; (semHandle = %lld)\n", semHandle);
if ((sfcbSem = semget(semHandle, 2, IPC_CREAT | IPC_EXCL | 0600)) == -1)
{
printf("error semget, errno = %d\n", errno);
}
printf("finished\n");
return 0;
}


Do you have the cygserver service running?  (See 
/usr/share/doc/Cygwin/cygserver.README.)


Ken

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



RE: Cygwin IPC - ftok() returns negative values - Bug Report

2016-06-29 Thread Stanisław Wawszczak
>On 29/06/2016 18:06, Stanisław Wawszczak wrote:
>> Dear Corinna,
>>
>> I am sorry about confusing you.
>> Simply:
>>
>> - Issue 
>> 
>> Call to ftok() returns negative value
>
> Hi Stanisław,
>
> may be I am missing somthing, but nothing on 
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftok.html
> 
> suggest me that the return value must be positive

Hi Marco,

You are absolutely right. But all code examples, what I have seen including 
sblim-sfcbd (what I have to compile) is testing result from ftok() as positive 
value.
The case-test code is working on native linux with positive value returned from 
ftok().

I have made some tests and I have stated that making call to getsem() on Cygwin 
with nsems == 1 is working with negative key returned from ftok.

So this is not my case at all. I am really sorry about wrong question. 

*Real question is why Cygwin's implementation of getsem() is not allowing to 
ask for more than nsems == 1?*
Here is stated, that the platform is limiting the nsems value: 
http://pubs.opengroup.org/onlinepubs/9699919799/functions/semget.html#tag_16_512
This code is not working, return errno == 22 (EINVAL, I guess...)
#include 
#include 
#include 
#include 

int main(int argc, char**argv)
{
int provs = 100;
key_t semHandle = ftok("/etc/fstab", 'A');
int sfcbSem = -1;
printf("semHandle <= 0 ; (semHandle = %lld)\n", semHandle);
if ((sfcbSem = semget(semHandle, 2, IPC_CREAT | IPC_EXCL | 0600)) == -1)
{
printf("error semget, errno = %d\n", errno);
}
printf("finished\n");
return 0;
}

> Regards
> Marco


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



Re: mintty issue with version 2.3.7

2016-06-29 Thread Thomas Wolff

Am 29.06.2016 um 11:56 schrieb Christoph Zimmermann:

After the recent update to version 2.3.7 mintty prints the error message

Error: could not open log file: File exists.
: File exists 

I suppose you have set Log=something in your .minttrc;
the described behaviour is actually on purpose;
if there a exists a log file with the requested name already, it is 
assumed that it may contain valuable logging information

and shouldn't inadvertently be overwritten.
To configure logging in .minttyrc, you should use some % placeholders 
(see manual page) to create distinct log files.

I will amend the manual page for clarification.

Thomas

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



Re: Cygwin IPC - ftok() returns negative values - Bug Report

2016-06-29 Thread Marco Atzeri

On 29/06/2016 18:06, Stanisław Wawszczak wrote:

Dear Corinna,

I am sorry about confusing you.
Simply:

- Issue 
Call to ftok() returns negative value


Hi Stanisław,

may be I am missing somthing, but nothing on
http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftok.html

suggest me that the return value must be positive

Regards
Marco


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



cygwin@cygwin.com

2016-06-29 Thread Morten Kjærulff
Hi,

I am trying to use less with an initial command of &pattern:

printf 'A\nB\n' | less '+&B'

Give me the text "&/B" at the topleft of my screen, and I have to press
ENTER to do the actual filtering.

Is this as it should be?

(
printf 'A\nB\n' | less '+/B'
Here line B is at top of screen, without the need for pressing ENTER
)


/Morten

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



RE: Cygwin IPC - ftok() returns negative values - Bug Report

2016-06-29 Thread Stanisław Wawszczak
Dear Corinna,

I am sorry about confusing you.
Simply:

- Issue 
Call to ftok() returns negative value

- Conditions -
Windows 2012 R2 with latest patches
Cygwin x64 installed from exe installer got two weeks ago
$ cygcheck -V
cygcheck (cygwin) 2.5.2
System Checker for Cygwin
Copyright (C) 1998 - 2016 Cygwin Authors
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

- Test case ---
#include 
#include 

int main(int argc, char**argv)
{
key_t semHandle = ftok("/etc/fstab", 'A');
printf("started\n");
if(semHandle <= 0)
{
printf("semHandle <= 0 ; (semHandle = %lld)\n", semHandle);
}
else
{
printf("semHandle > 0 ; (semHandle = %lld)\n", semHandle);
}
printf("finished\n");
return 0;
}

--- Result ---
$ ./test.exe
started
semHandle <= 0 ; (semHandle = -5833568887996598975)
finished



Pozdrawiam/Best Regards,

Stanisław Wawszczak
Architekt Systemowy

ISCG Sp. z o.o.
Poland


-Original Message-
From: cygwin-ow...@cygwin.com [mailto:cygwin-ow...@cygwin.com] On Behalf Of 
Corinna Vinschen
Sent: Wednesday, June 29, 2016 5:15 PM
To: cygwin@cygwin.com
Subject: Re: Cygwin IPC - ftok() returns negative values - Bug Report

On Jun 29 13:14, Stanisław Wawszczak wrote:
> Dear All,
>  
> I have had to compile sblim-sfcbd-1.4.10 on Cygwin. It is using IPC 
> semaphores.
> Unfortunately it is returning wrong value as the result of complicated 
> bit-wise logical operations.
> I have tried to “hack the system” and make multiplication of returned 
> value by -1, but it triggers error in semget()
> Environment:
> Windows 2012 R2 with latest patches
> I have installed Cygwin from official installer couple days ago.
>  
> I have attached the gdb session from such invocation. You can see the path 
> and id in arguments are correct and stat() function returns correct values.
> Finally result in %rax is negative:
> rax    0xaf0b000701cc1d53   -5833568862233420461

Ok,  but what's the exact problem?  Following a GDB session is kind of a lot of 
work.  Simple, very short, self-contained testcase, perhaps?


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


Re: POSIX permission mapping and NULL SIDs

2016-06-29 Thread Corinna Vinschen
On Jun 29 15:45, Corinna Vinschen wrote:
> Hi Bill,
> 
> On Jun 29 10:21, Corinna Vinschen wrote:
> > On Jun 28 18:06, Bill Zissimopoulos wrote:
> > > In any case I will use your mapping of S-1-0-65534 <-> 65534.
> > 
> > Thanks.  Do you want to add handling for this mapping to
> > pwdgrp::fetch_account_from_windows yourself or shall I do it?  I could
> > come up with a patch in the next couple of days.  I will prepare a
> > developer's snapshot then, so you can immediately test if it works as
> > desired.
> 
> How do we avoid name collisions?  I can easily see admins creating an
> AD account called "nobody".
> 
> Shall we fake a "WinFSP" domain such that the name is "WinFSP+nobody"?

Preliminary patch attached.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
From a0bdba1cc4b8515e933e1c1caf59fcc310c48613 Mon Sep 17 00:00:00 2001
From: Corinna Vinschen 
Date: Wed, 29 Jun 2016 17:12:38 +0200
Subject: [PATCH] Handle WinFSP nobody account

Per discussion started at
https://cygwin.com/ml/cygwin/2016-06/msg00347.html

S-1-0-65534 == WinFSP\nobody == WinFSP+nobody == uid/gid 65534
---
 winsup/cygwin/uinfo.cc | 25 +
 1 file changed, 25 insertions(+)

diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 247131d..af1a4e5 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -1894,6 +1894,14 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t 
&arg, cyg_ldap *pldap)
}
   if (!ret)
{
+ if (!strcmp (arg.name, "WinFSP+nobody"))
+   {
+ /* Special case "nobody" for reproducible construction of a
+nobody SID for WinFSP.  We use the value 65534 which is
+-2 with 16 bit uid/gids. */
+ csid.create (0, 1, 0xfffe);
+ break;
+   }
  debug_printf ("LookupAccountNameW (%W), %E", name);
  return NULL;
}
@@ -2004,6 +2012,15 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t 
&arg, cyg_ldap *pldap)
  sid = logon_sid;
  break;
}
+  else if (arg.id == 0xfffe)
+   {
+ /* Special case "nobody" for reproducible construction of a
+nobody SID for WinFSP.  We use the value 65534 which is
+-2 with 16 bit uid/gids. */
+ csid.create (0, 1, 0xfffe);
+ sid = csid;
+ break;
+   }
   else if (arg.id < 0x1)
{
  /* Nothing. */
@@ -2428,6 +2445,14 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t 
&arg, cyg_ldap *pldap)
  return NULL;
}
 } 
+  else if (sid_id_auth (sid) == 0 && sid_sub_auth (sid, 0) == 0xfffe)
+{
+  uid = gid = 0xfffe;
+  wcpcpy (dom, L"WinFSP");
+  wcpcpy (name = namebuf, L"nobody");
+  fully_qualified_name = true;
+  acc_type = SidTypeUnknown;
+}
   else if (sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
   && sid_sub_auth (sid, 0) == SECURITY_LOGON_IDS_RID)
 {
-- 
2.5.5



signature.asc
Description: PGP signature


Re: Cygwin IPC - ftok() returns negative values - Bug Report

2016-06-29 Thread Corinna Vinschen
On Jun 29 13:14, Stanisław Wawszczak wrote:
> Dear All,
>  
> I have had to compile sblim-sfcbd-1.4.10 on Cygwin. It is using IPC 
> semaphores.
> Unfortunately it is returning wrong value as the result of complicated 
> bit-wise logical operations.
> I have tried to “hack the system” and make multiplication of returned value 
> by -1, but it triggers error in semget()
> Environment:
> Windows 2012 R2 with latest patches
> I have installed Cygwin from official installer couple days ago.
>  
> I have attached the gdb session from such invocation. You can see the path 
> and id in arguments are correct and stat() function returns correct values.
> Finally result in %rax is negative:
> rax    0xaf0b000701cc1d53   -5833568862233420461

Ok,  but what's the exact problem?  Following a GDB session is kind
of a lot of work.  Simple, very short, self-contained testcase, perhaps?


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature


Re: POSIX permission mapping and NULL SIDs

2016-06-29 Thread Corinna Vinschen
Hi Bill,

On Jun 29 10:21, Corinna Vinschen wrote:
> On Jun 28 18:06, Bill Zissimopoulos wrote:
> > In any case I will use your mapping of S-1-0-65534 <-> 65534.
> 
> Thanks.  Do you want to add handling for this mapping to
> pwdgrp::fetch_account_from_windows yourself or shall I do it?  I could
> come up with a patch in the next couple of days.  I will prepare a
> developer's snapshot then, so you can immediately test if it works as
> desired.

How do we avoid name collisions?  I can easily see admins creating an
AD account called "nobody".

Shall we fake a "WinFSP" domain such that the name is "WinFSP+nobody"?


Thanks,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature


[ANNOUNCEMENT] Updated : netcdf / netcdf-cxx4 / netcdf-fortran

2016-06-29 Thread Marco Atzeri

Version 4.4.1-1 of

  libnetcdf-devel
  libnetcdf11
  netcdf

Version 4.3.0-1 of
  libnetcdf-cxx4-devel
  libnetcdf-cxx4_1

Version 4.4.4-1
  libnetcdf-fortran-devel
  libnetcdf-fortran_6

are available in the Cygwin distribution.

CHANGES
Latest upstream versions


DESCRIPTION
NetCDF (network Common Data Form) is a set of software libraries
and machine-independent data formats that support the creation,
access, and sharing of array-oriented scientific data.

HOMEPAGE
http://www.unidata.ucar.edu/software/netcdf/

Marco Atzeri

If you have questions or comments, please send them to the
cygwin mailing list at: cygwin (at) cygwin (dot) com .

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



[ANNOUNCEMENT] Updated: octave-4.0.1-2

2016-06-29 Thread Marco Atzeri

New versions 4.0.1-2 of

   octave,
   octave-devel,
   octave-doc

are available in the Cygwin distribution:


CYGWIN CHANGES
rebuilt for shared lib dependency update
https://cygwin.com/ml/cygwin/2016-06/msg00267.html

CHANGES
Upstream bugfix release
http://www.gnu.org/software/octave/bug-fixes-4-0-1.html

Full changes:
http://www.gnu.org/software/octave/NEWS-4.0.html

GENERAL 4.0.x NOTE
there are 2 octave main binaries
octave-cli  command line inteface
octave-gui  graphical interface
octave  default to graphical version

OCTAVE-FORGE NOTE
You need to install with setup the specific forge package
you are looking for.

The update of the global pkg database is now managed
by cygwin setup during the postinstall phase.
A semaphore system is in place to update the database only when needed
and just one time, also when multiple forge packages are added or removed.

DESCRIPTION
The GNU Octave language for numerical computations is a (mostly Matlab (R)
compatible) high-level language, primarily intended for numerical
computations.  It provides a convenient command-line interface for solving
linear and nonlinear problems numerically.

HOMEPAGE
http://www.gnu.org/software/octave/


Marco Atzeri

If you have questions or comments, please send them to the
cygwin mailing list at: cygwin (at) cygwin (dot) com .

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



Re: Anecdotal: Rebase and Visual Studio 2015 and /etc

2016-06-29 Thread Eliot Moss

On 6/29/2016 8:24 AM, KARL BOTTS wrote:


2) I always have cygdrive-prefix set to /, so that I can do, e.g. "cd /c".
But when you reinstall cygwin, you must do it again with "mount -c".  And then
immediately do "mount -m > /etc/fstab", so that it sticks.  Then, you should
patch up the symlinks in /etc/{hosts,services,couple-more}; find them with
readlink.  There are some more in some fonts dir, but I ignore those: don't
care.


A minor suggestion here:

I have had less trouble by linking individual drives, e.g.,

/c -> /cygdrive/c

This does not get you every one of them, but you can set more
(/d -> /cygdrive/d, etc.) and cover them over time.

May not be for everyone, but setting that prefix to / seems
to be potentially problematic.

More broadly, and this may be something for the cygwin / rebaseall
maintainers, it would have helped me to have clear instructions as
to how to blow away the rebase database so that I can force it to
be rebuilt.  Installations and upgrades do sometimes get me into
rebase issues, and sometimes it seems that rebuilding the database
(and (often) rebooting as well) are needed to fix it.  Having those
instructions in the documentation (man page, etc.) for rebase and
friends would have saved me time figuring it out.  The docs seem
somewhat to pre-date the advent of the rebase database and incremental
rebasing.

Regards -- Eliot Moss

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



Cygwin IPC - ftok() returns negative values - Bug Report

2016-06-29 Thread Stanisław Wawszczak
Dear All,
 
I have had to compile sblim-sfcbd-1.4.10 on Cygwin. It is using IPC semaphores.
Unfortunately it is returning wrong value as the result of complicated bit-wise 
logical operations.
I have tried to “hack the system” and make multiplication of returned value by 
-1, but it triggers error in semget()
Environment:
Windows 2012 R2 with latest patches
I have installed Cygwin from official installer couple days ago.
 
I have attached the gdb session from such invocation. You can see the path and 
id in arguments are correct and stat() function returns correct values.
Finally result in %rax is negative:
rax    0xaf0b000701cc1d53   -5833568862233420461

Best Regards,
Stanislaw Wawszczak
Iscg Poland 

###
# GDB session
###
 
Breakpoint 1, ftok (path=0x4b11f1912  "/usr/local/sbin/sfcbd.exe", 
id=83) at /usr/src/debug/cygwin-2.5.2-1/winsup/cygwin/ipc.cc:18
18  {
(gdb) x/5i
   0x4b1201438 :   (bad)
   0x4b1201439 : add    %al,(%rax)
   0x4b120143b : add    %al,(%rdi)
   0x4b120143d : add    %al,(%rax)
   0x4b120143f : add    %al,(%rbx)
(gdb) x/5i
   0x4b1201441 :   add    %al,(%rax)
   0x4b1201443 :   add    %al,0x0(%rip)    # 
0x4b1201449 
   0x4b1201449 :  add    %al,(%rax)
   0x4b120144b :  add    %al,(%rax)
  0x4b120144d :  add    %al,(%rax)
(gdb) x/5i $pc
=> 0x1800c6e50 :    push   %rbx
   0x1800c6e51 :  sub    $0xa0,%rsp
   0x1800c6e58 :  mov    %edx,%ebx
  0x1800c6e5a : lea    0x20(%rsp),%rdx
   0x1800c6e5f : callq  0x180144970 
(gdb) x/5i
   0x1800c6e64 : test   %eax,%eax
   0x1800c6e66 : jne    0x1800c6ec0 
   0x1800c6e68 : mov    0x20(%rsp),%edx
   0x1800c6e6c : mov    0x28(%rsp),%r8
   0x1800c6e71 : mov    %edx,%eax
(gdb) x/5i
   0x1800c6e73 : movzbl %dl,%edx
   0x1800c6e76 : and    $0xff,%eax
   0x1800c6e7b : shl    $0x30,%rdx
   0x1800c6e7f : shl    $0x28,%rax
   0x1800c6e83 : or %rdx,%rax
(gdb) x/5i
   0x1800c6e86 : movabs $0xc000,%rdx
   0x1800c6e90 : and    %r8,%rdx
   0x1800c6e93 : and    $0x3f,%r8d
   0x1800c6e9a : shr    $0x10,%rdx
   0x1800c6e9e : shl    $0x8,%r8
(gdb) x/5i
   0x1800c6ea2 : or %rdx,%rax
   0x1800c6ea5 : mov    %rax,%rcx
   0x1800c6ea8 : movzbl %bl,%eax
   0x1800c6eab : or %r8,%rax
   0x1800c6eae : or %rcx,%rax
(gdb) x/5i
   0x1800c6eb1 : add    $0xa0,%rsp
   0x1800c6eb8 :    pop    %rbx
   0x1800c6eb9 :    retq
   0x1800c6eba :    nopw   0x0(%rax,%rax,1)
   0x1800c6ec0 :    mov    $0x,%rax
(gdb) x/5i
   0x1800c6ec7 :    jmp    0x1800c6eb1 
   0x1800c6ec9 :  nop
   0x1800c6eca :  nop
   0x1800c6ecb :  nop
   0x1800c6ecc :  nop
(gdb) ni
0x0001800c6e51  18  {
(gdb) ni
18  {
(gdb) ni
21    if (stat64 (path, &statbuf))
(gdb) x/5i $pc
=> 0x1800c6e5a : lea    0x20(%rsp),%rdx
   0x1800c6e5f : callq  0x180144970 
   0x1800c6e64 : test   %eax,%eax
   0x1800c6e66 : jne    0x1800c6ec0 
   0x1800c6e68 : mov    0x20(%rsp),%edx
(gdb) ni
0x0001800c6e5f  21    if (stat64 (path, &statbuf))
(gdb) x/5i $pc
=> 0x1800c6e5f : callq  0x180144970 
   0x1800c6e64 : test   %eax,%eax
   0x1800c6e66 : jne    0x1800c6ec0 
   0x1800c6e68 : mov    0x20(%rsp),%edx
   0x1800c6e6c : mov    0x28(%rsp),%r8
(gdb) ni
0x0001800c6e64  21    if (stat64 (path, &statbuf))
(gdb) x/5i $pc
=> 0x1800c6e64 : test   %eax,%eax
   0x1800c6e66 : jne    0x1800c6ec0 
   0x1800c6e68 : mov    0x20(%rsp),%edx
   0x1800c6e6c : mov    0x28(%rsp),%r8
   0x1800c6e71 : mov    %edx,%eax
(gdb) r %eax
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) info registers
rax    0x0  0
rbx    0x53 83
rcx    0x7ffa7b5dac7a   140713788288122 rdx    0x0  0 rsi   
 0x4  4 rdi    0x10040596e  4299184494 rbp    
0x4b1201464  0x4b1201464  rsp    0xc930   
0xc930
r8 0xc768   4294952808
r9 0x4b1201464  20151538788
r10    0x0  0
r11    0x203    515
r12    0x4b11ef0c0  20151464128
r13    0x20 32
r14    0x0  0
r15    0x5  5
rip    0x1800c6e64  0x1800c6e64  eflags  
   0x202    [ IF ] cs 0x33 51 ss 0x2b 43 ds 
    0x2b 43 es 0x2b 43 fs 0x53 83 
gs 0x2b 43
(gdb) ni
0x0001800c6e66  21    if (stat64 (path, &statbuf))
(gdb) r %eax
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) x/5i $pc
=> 0x1800c6e66 : jne    0x1800c6ec0 
   0x1800c6e68 : mov    0x20(%rsp),%edx

Anecdotal: Rebase and Visual Studio 2015 and /etc

2016-06-29 Thread KARL BOTTS

A couple of weeks ago I installed Visual Studio 2015 (aka VS14) onto a machine
that was already running Windows 10 and had VS2013 (aka VS12) on it.  The
machine was once updated from Windows 7, but that was months ago, had been
fine.  It is a huge install -- 20GB disk space, more than an hour, a couple of
reboots.

After that, I had the now semi-familiar problems with cygwin -- "cannot fork,
cannot load dlls", that kind of stuff.

I went thru several variations of the rebase procedures, following various
advice on cygwin web site, and emails from this list.  I could not get cygwin
back to fully normal.

Eventually, I reinstalled a fresh cygwin, right after a reboot, rebooted
again.  Now all has been good for a couple weeks.

I have a couple of anecdotal impressions, from this experience and others:

1) After you do the full rebase, before you even start anything cygwin, reboot
Windows, then start a bash or something.  Reboot Windows, early and often,
whenever upgrading anything.  This has helped me before.  I suspect that I
forgot it this last time.  I _suspect_ that had I followed that, I would not
have had to reinstall cygwin.  Maybe.

2) I always have cygdrive-prefix set to /, so that I can do, e.g. "cd /c". 
But when you reinstall cygwin, you must do it again with "mount -c".  And then
immediately do "mount -m > /etc/fstab", so that it sticks.  Then, you should
patch up the symlinks in /etc/{hosts,services,couple-more}; find them with
readlink.  There are some more in some fonts dir, but I ignore those: don't
care.

3) Once you have a cygwin you like, you can _usually_ copy it to other hosts. 
Use cygwin cp or tar.  Do not use XCOPY: does not handle links right. 
ROBOCOPY can be used in a pinch.  What goes wrong, maybe one time in four, is
rebase troubles: goto (1).  Once you know you can copy cygwin from host A to
host B, you can generally do it again, to keep cygwin up to date across hosts.
 I _think_ that once you have a DLL-load-address compatible install of cygwin
across several hosts, you can freely copy between them.

4) Keep yourself a list of cygwin packages you know you need, keep it small if
you can.  Makes a cygwin install much easier.  I have maybe 30.  I just enter
then in to the cygwin-setup GUI: is painful, but reliable.  I have had trouble
with the "setup -P", sometimes, but I think you could get that to work.

5) Again, reboot Windows between any steps.  Maybe not always necessary, but
can't hurt: you want to know that it _will_ reboot, anyhow.  And, it moves
DLLs around, even installs more, on the way back up.  You want to be sure it
has done all that.

6) Once you get this all working, it is pretty reliable: I have to fuss with
this stuff maybe a couple times a year.


Cygwin is worth it.  I still don't understand why MS did not just help cygwin
get a better installation/maintenance procedure, and fix the damn fork
problems, instead of going down the UbuntuOnWindows path.  But that's another
discussion... 


---
Karl Botts, kdbo...@usa.net


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



[ANNOUNCEMENT] Updated: {xfig/xfig-lib}-3.2.5c-3: An interactive drawing tool

2016-06-29 Thread Dr . Volker Zell
Hi

New versions of 'xfig/xfig-lib' have been uploaded to a server near you.

 o Build for cygwin 2.5.2 with gcc-5.4.0
 o Fixed: xfig 3.2-5c crashes with dash-dotted lines on cygwin
   see --> https://cygwin.com/ml/cygwin/2016-02/msg00066.html
 o Fixed: xfig-3.2.5c crashes on "Open File", "Save as" or "Export"
   see --> https://cygwin.com/ml/cygwin/2015-11/msg00018.html
 o Fixed: xfig-3.2.5c crashes on exit


***


To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page.  This downloads setup.exe to your
system.  Then, run setup and answer all of the questions.

  *** 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.com_at_cygwin.com

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

http://cygwin.com/lists.html#subscribe-unsubscribe

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

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



[ANNOUNCEMENT] Updated: tin-2.3.4-1

2016-06-29 Thread Corinna Vinschen
I've just updated the Cygwin version of tin to 2.3.4-1.

This is a new upstream release, mainly bugfixes and updated translations.
For a list of changes see

  ftp://ftp.tin.org/pub/news/clients/tin/v2.3/CHANGES


Have fun,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

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



[ANNOUNCEMENT] Updated: {ghostscript/libgs9/libgs-devel}-9.19-1: GPL PostScript interpreter

2016-06-29 Thread Dr . Volker Zell
Hi

New versions of 'ghostscript/libgs9/libgs-devel' have been uploaded to a server 
near you.

 o Update to latest upstream
 o Build for cygwin 2.5.2 with gcc-5.4.0


ghostscript NEWS:
===

 o http://www.ghostscript.com/doc/9.19/History9.htm#Version9.19
 o http://www.ghostscript.com/doc/9.19/History9.htm#Version9.18  
 o http://www.ghostscript.com/doc/9.19/History9.htm#Version9.16

***


To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page.  This downloads setup.exe to your
system.  Then, run setup and answer all of the questions.

  *** 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.com_at_cygwin.com

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

http://cygwin.com/lists.html#subscribe-unsubscribe

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

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



Re: rebaseall ate my homework (Windows 10 install, that is)?

2016-06-29 Thread Henry S. Thompson
Achim Gratz writes:

> Henry S. Thompson  inf.ed.ac.uk> writes:
>> But I guess I now have to do one last reinstall of Windows, in order to
>> repair all the dlls that I trashed by mistake.
>
> sfc/scannow should find and repair these.

I have tried that in the past, with no success -- Dism doesn't work
either :-(.

ht
-- 
   Henry S. Thompson, School of Informatics, University of Edinburgh
  10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: h...@inf.ed.ac.uk
   URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

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



Re: rebaseall ate my homework (Windows 10 install, that is)?

2016-06-29 Thread Achim Gratz
Henry S. Thompson  inf.ed.ac.uk> writes:
> But I guess I now have to do one last reinstall of Windows, in order to
> repair all the dlls that I trashed by mistake.

sfc/scannow should find and repair these.


Regards,
Achim.


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



mintty issue with version 2.3.7

2016-06-29 Thread Christoph Zimmermann

After the recent update to version 2.3.7 mintty prints the error message

Error: could not open log file: File exists.
: File exists 

every time I open a mintty window. I've tracked this down to the 
following snippet (around line # 228) in child.c:


   char * logf = newn(char, MAX_PATH + 1);
strftime (logf, MAX_PATH, log, localtime (& now.tv_sec));
free(log);
log = logf;
  }

  log_fd = open(log, O_WRONLY | O_CREAT | O_EXCL, 0600);
  if (log_fd < 0) {
// report message and filename:
childerror("could not open log file", false);
childerror(log, false);
  }

The culprit seems to be the open invocation with the combination of 
flags; possibly pointing to

a problem in the corresponding cygwin.dll implementation.

Please let me know if you need more details.

Thanks, Chris

--

This email account is monitored seven days a week.

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



Re: rebaseall ate my homework (Windows 10 install, that is)?

2016-06-29 Thread Henry S. Thompson
Achim Gratz writes:

> Henry S. Thompson  inf.ed.ac.uk> writes:
>> Not sure how to execute "[recovery] by doing a full rebase" -- I tried a
>> vanilla rebaseall, but that doesn't seem to have flushed the database,
>> although the date on it did change. . .
>
> rebase-trigger fullrebase
>
> The full rebase will be done the next time setup runs autorebase.

Right, that ran OK, and no mention of system32 in logs or new rebase.db

But I guess I now have to do one last reinstall of Windows, in order to
repair all the dlls that I trashed by mistake.

Thanks again _very_ much for your help.

ht
-- 
   Henry S. Thompson, School of Informatics, University of Edinburgh
  10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: h...@inf.ed.ac.uk
   URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

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



Re: rebaseall ate my homework (Windows 10 install, that is)?

2016-06-29 Thread Corinna Vinschen
On Jun 29 10:20, Henry S. Thompson wrote:
> Achim Gratz writes:
> 
> > Henry S. Thompson  inf.ed.ac.uk> writes:
> >> > You'll have to find out why rebase gets into your Windows system 
> >> > directory.
> >> >  Check which files in /var/cache/rebase have these
> >> 
> >> > [...]
> >> >   /c/WINDOWS/system32/imgutil.dll
> >> >   /c/WINDOWS/system32/msshooks.dll
> >> > [...]
> >> 
> >> None of them do .
> >
> > That is only possible then if you've tried some manual rebase and have these
> > DLL still recorded in /etc/rebase.db.* -- in which case you should be able
> > to recover by doing a full rebase (which removes the existing rebase
> > database as the first step).
> >
> >> To be careful and clear, the _first_ time the problem happened (i.e.,
> >> Windows became unusable after a reboot), was after a normal run of
> >> setup-x86_64 which updated Cygwin to 2.5.2.
> >
> > Again, given what you say about the content of /var/cache/rebase this is
> > only possible if you've previously added those DLL to the rebase database.
> 
> Thanks, that's it!  A week or so ago I did a rebase of some of my own
> compiled dlls, and that seems to have added a large volume of windows
> dlls to rebase.db.x86_64, including hal.dll :-(.
> 
> Not sure how to execute "[recovery] by doing a full rebase" -- I tried a
> vanilla rebaseall, but that doesn't seem to have flushed the database,
> although the date on it did change. . .

Yuk.  Maybe it would make sense to have a safety net in rebase so that
it refuses to rebase any DLL below a dir called system32 or SysWOW64?

If anybody wants to take stab:

https://cygwin.com/git/gitweb.cgi?p=cygwin-apps/rebase.git


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature


Re: rebaseall ate my homework (Windows 10 install, that is)?

2016-06-29 Thread Achim Gratz
Henry S. Thompson  inf.ed.ac.uk> writes:
> Not sure how to execute "[recovery] by doing a full rebase" -- I tried a
> vanilla rebaseall, but that doesn't seem to have flushed the database,
> although the date on it did change. . .

rebase-trigger fullrebase

The full rebase will be done the next time setup runs autorebase.


Regards,
Achim



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



Re: rebaseall ate my homework (Windows 10 install, that is)?

2016-06-29 Thread Henry S. Thompson
Achim Gratz writes:

> Henry S. Thompson  inf.ed.ac.uk> writes:
>> > You'll have to find out why rebase gets into your Windows system directory.
>> >  Check which files in /var/cache/rebase have these
>> 
>> > [...]
>> >   /c/WINDOWS/system32/imgutil.dll
>> >   /c/WINDOWS/system32/msshooks.dll
>> > [...]
>> 
>> None of them do .
>
> That is only possible then if you've tried some manual rebase and have these
> DLL still recorded in /etc/rebase.db.* -- in which case you should be able
> to recover by doing a full rebase (which removes the existing rebase
> database as the first step).
>
>> To be careful and clear, the _first_ time the problem happened (i.e.,
>> Windows became unusable after a reboot), was after a normal run of
>> setup-x86_64 which updated Cygwin to 2.5.2.
>
> Again, given what you say about the content of /var/cache/rebase this is
> only possible if you've previously added those DLL to the rebase database.

Thanks, that's it!  A week or so ago I did a rebase of some of my own
compiled dlls, and that seems to have added a large volume of windows
dlls to rebase.db.x86_64, including hal.dll :-(.

Not sure how to execute "[recovery] by doing a full rebase" -- I tried a
vanilla rebaseall, but that doesn't seem to have flushed the database,
although the date on it did change. . .

Thanks again,

ht
-- 
   Henry S. Thompson, School of Informatics, University of Edinburgh
  10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: h...@inf.ed.ac.uk
   URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

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



Re: rebaseall ate my homework (Windows 10 install, that is)?

2016-06-29 Thread Achim Gratz
Henry S. Thompson  inf.ed.ac.uk> writes:
> > You'll have to find out why rebase gets into your Windows system directory.
> >  Check which files in /var/cache/rebase have these
> 
> > [...]
> >   /c/WINDOWS/system32/imgutil.dll
> >   /c/WINDOWS/system32/msshooks.dll
> > [...]
> 
> None of them do .

That is only possible then if you've tried some manual rebase and have these
DLL still recorded in /etc/rebase.db.* -- in which case you should be able
to recover by doing a full rebase (which removes the existing rebase
database as the first step).

> To be careful and clear, the _first_ time the problem happened (i.e.,
> Windows became unusable after a reboot), was after a normal run of
> setup-x86_64 which updated Cygwin to 2.5.2.

Again, given what you say about the content of /var/cache/rebase this is
only possible if you've previously added those DLL to the rebase database.


Regards,
Achim.


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



Re: rebaseall ate my homework (Windows 10 install, that is)?

2016-06-29 Thread Henry S. Thompson
Achim Gratz writes:

> Henry S. Thompson  inf.ed.ac.uk> writes:
>> I [just sent] setup.log.full, which I don't _think_ shows anything going
>> wrong...
>
> You'll have to find out why rebase gets into your Windows system directory.
>  Check which files in /var/cache/rebase have these

> [...]
>   /c/WINDOWS/system32/imgutil.dll
>   /c/WINDOWS/system32/msshooks.dll
> [...]

None of them do :-(.

> and what the content of /var/lib/rebase/* is.

Just perl and python in dynbase.d, pointing to /usr/lib/perl5/site_perl
and /usr/lib/python2.7/site-packages respecively.

> When you say "reinstall", was that a clean install into a new "C:\C64"
> directory 

To be careful and clear, the _first_ time the problem happened (i.e.,
Windows became unusable after a reboot), was after a normal run of
setup-x86_64 which updated Cygwin to 2.5.2.  The subsequent timeline
was:

 Reinstall Windows 10, preserving partitions/files
  (this works for some time, as do Cygwin tools after I add
   /c/C64/bin to my PATH.  A number of reboots, w/o difficulty)

 Run setup-x86_64, pointing to local disk for packages and installing
 into C:\C64, and downgrade Cygwin to 2.5.1 (only because setup didn't offer to
 reinstall 2.5.2).  No other packages installed.
  (again, this works for a while)

 First reboot fails, Windows is unusable
  My suspicions are aroused that the 2.5.2 / 2.5.1 installs are causing
  the problem, just because of the proximity of the failures

 Reinstall Windows 10 _again_, again preserving partitions/files
 
 Immediately run setup, reinstall 2.5.1 (again, from local disk and to
 C:\C64) and reboot
  Windows is unusable

> or did you try to install over an older installation?

So I never changed my Cygwin install directory, as I wanted to keep my
(large) home directory in play

> If the latter, did you perhaps link into the Windows systems directory
> from somewhere inside your Cygwin installation?

I don't _think_ so.  What kind of link (cygwin vs. windows) would have
even been able to confuse rebase?

> Also, you seem to have modified the cygpath prefix, which potentially
> might be the source of your problem.

I did that five years ago at least, and it's a modification many others
do as well, I believe, so not sure how that could explain things.

Thanks very much for suggestions, please keep them coming!  As I guess
should be clear, I _can_ access my disk from the Windows recovery
console, and even run individual (Cygwin) programs, so further
archaeology is still possible.

ht
-- 
   Henry S. Thompson, School of Informatics, University of Edinburgh
  10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: h...@inf.ed.ac.uk
   URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

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



Re: POSIX permission mapping and NULL SIDs

2016-06-29 Thread Corinna Vinschen
On Jun 28 18:06, Bill Zissimopoulos wrote:
> On 6/28/16, 3:27 AM, "Corinna Vinschen"  of corinna-cyg...@cygwin.com> wrote:
> 
> 
> >>Ok.  Please keep in mind that
> >
> >a) there can't be a bijective mapping between arbitrary length SIDs
> >   and a 32 bit uid/gid.
> >
> >b) The mapping used in Cygwin is not self-created but (mostly, except
> >   for a single deviation) identical to the Interix mapping.  The code
> >   basically follows how this mapping has been defined by Microsoft.
> 
> Corinna, please stop explaining things to me that I already know.

Sorry but I don't grok this.  During this discussion you were explaining
things to me which I obviously had to know.  If I'm explainig things to
you you already know, well, sorry about that.  Your attempt at creating
an artificial SID just to prove that a collision could be constructed
looked like you didn't understand how well-known Windows SIDs work and
are constructed, and that there's no way for a collision from a valid
Windows SID here.

> >> BTW, I have here a partitioning of the UID namespace that may help
> >>choose
> >> the right mapping:
> >> 
> >> /*
> >>  * UID namespace partitioning (from [IDMAP] rules):
> >>  *
> >>  * 0x00 + RID  S-1-5-RID,S-1-5-32-RID
> >>  * 0x000ffeOtherSession
> >>  * 0x000fffCurrentSession
> >>  * 0x001000 * X + RID  S-1-5-X-RID ([WKSID]:
> >> X=1-15,17-21,32,64,80,83)
> >>  * 0x01 + 0x100 * X + YS-1-X-Y ([WKSID]: X=1,2,3,4,5,9,16)
> >>  * 0x03 + RID  S-1-5-21-X-Y-Z-RID
> >>  * 0x06 + RID  S-1-16-RID
> >>  * 0x10 + RID  S-1-5-21-X-Y-Z-RID
> >>  */
> >
> >You're aware that I wrote the code for this mapping as well as its
> >documentation? :)
> 
> Corinna, of course I am aware of that. I have found your original post to
> this list about it. Why would you think otherwise? And why would it change
> anything?

If that's the case, then why do you explain all these things to me?  I'm
a bit at a loss to see the difference between me explaining things to
you you already know vs. you explaing things to me I already know.
Aren't we kind of on par here?

But, never mind.

> >>With all that and to help conclude this thread I gather here all the
> >> proposed mappings. Corinna, I will use the one which you prefer the
> >>most:
> >> 
> >> S-1-0-65534<-> 65534
> >
> >This one is still my favorite.  Again, the range from 0x1000 up to
> >0x is unused.  Right now any incoming uid/gid value in this range
> >for a reverse SID lookup is treated as invalid SID.
> 
> I disagree. You are saying that it is unused, but a (perhaps erroneous)
> SID would map into that space.

Yes that's possible.  However, where would this erroneous SID come from?

The chances that a SID comes in which gets converted to uid/gid 0xfffe
is actually higher.  See UNIX_POSIX_OFFSET.

> In any case I will use your mapping of S-1-0-65534 <-> 65534.

Thanks.  Do you want to add handling for this mapping to
pwdgrp::fetch_account_from_windows yourself or shall I do it?  I could
come up with a patch in the next couple of days.  I will prepare a
developer's snapshot then, so you can immediately test if it works as
desired.


Thanks again,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature


[ANNOUNCEMENT] Updated: {pstoedit/libpstoedit0/pstoedit-devel}-3.70-2: A tool converting PostScript and PDF files into various vector graphic formats

2016-06-29 Thread Dr . Volker Zell
Hi

New versions of 'pstoedit/libpstoedit0/pstoedit-devel' have been uploaded to a 
server near you.

 o Build for cygwin 2.5.2 with gcc-5.4.0
 o Fixes pkgconfig file
   see --> https://cygwin.com/ml/cygwin/2016-05/msg00204.html


***


To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page.  This downloads setup.exe to your
system.  Then, run setup and answer all of the questions.

  *** 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.com_at_cygwin.com

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

http://cygwin.com/lists.html#subscribe-unsubscribe

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

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