[RFC] Removing .la files from x86

2016-08-02 Thread Yaakov Selkowitz
Libtool .la files are generally a waste of time and space.  They slow 
down linking of other libraries with libtool, and they cause otherwise 
unnecessary private dependencies to be pulled in by -devel packages. 
Therefore, the major distros generally remove them from their packages 
unless they are really necessary.


When we first enabled Cygwin for x86_64, as we had no backwards 
compatibility to worry about, I made removing all .la files the default. 
 AFAIK this has worked well, and any missing link libraries that the 
presence thereof would have masked have already been fixed.


In order to do the same for x86 without breaking builds of other 
packages, AFAICS we would need a perpetual postinstall script which will 
continually remove them.  The downside is that (unless the script is 
made a *LOT* more complicated) a number of -devel packages will show up 
as "Incomplete" until such time they are rebuilt with a new version of 
cygport.


Any objections?

--
Yaakov


Re: /dev/ptmx fails with Azure accounts

2016-08-02 Thread rm...@aboutgolf.com
[I'm so sorry I'm messing up the mailing list by not replying to the proper 
email I only just got it through my thick skull now to subscribe to the 
mailing list. I think my brain is on vacation already]


Unfortunately your prediction was correct - RunAs Administrator CMD gives this:

C:\WINDOWS\system32>whoami
azuread\russellmora

C:\WINDOWS\system32>whoami /all

USER INFORMATION


User Name   SID
=== ===
azuread\russellmora S-1-12-1-2043906341-1249388050-2635137163-399631282


GROUP INFORMATION
-

Group NameType SID  
Attributes
=  
 
===
Mandatory Label\High Mandatory Level  LabelS-1-16-12288
Everyone  Well-known group S-1-1-0  
Mandatory group, Enabled by default, Enabled 
group
BUILTIN\AdministratorsAliasS-1-5-32-544 
Mandatory group, Enabled by default, Enabled 
group, Group owner
BUILTIN\Users AliasS-1-5-32-545 
Mandatory group, Enabled by default, Enabled 
group
NT AUTHORITY\INTERACTIVE  Well-known group S-1-5-4  
Mandatory group, Enabled by default, Enabled 
group
CONSOLE LOGON Well-known group S-1-2-1  
Mandatory group, Enabled by default, Enabled 
group
NT AUTHORITY\Authenticated Users  Well-known group S-1-5-11 
Mandatory group, Enabled by default, Enabled 
group
NT AUTHORITY\This OrganizationWell-known group S-1-5-15 
Mandatory group, Enabled by default, Enabled 
group
LOCAL Well-known group S-1-2-0  
Mandatory group, Enabled by default, Enabled 
group
  Unknown SID type 
S-1-12-1-2741946010-1181797680-2322883994-3292483823 Mandatory group, Enabled 
by default, Enabled group
NT AUTHORITY\Cloud Account Authentication Well-known group S-1-5-64-36  
Mandatory group, Enabled by default, Enabled 
group


PRIVILEGES INFORMATION
--

Privilege Name  Description   State
=== = 

SeLockMemoryPrivilege   Lock pages in memory  
Disabled
SeIncreaseQuotaPrivilegeAdjust memory quotas for a process
Disabled
SeSecurityPrivilege Manage auditing and security log  
Disabled
SeTakeOwnershipPrivilegeTake ownership of files or other objects  
Disabled
SeLoadDriverPrivilege   Load and unload device drivers
Disabled
SeSystemProfilePrivilegeProfile system performance
Disabled
SeSystemtimePrivilege   Change the system time
Disabled
SeProfileSingleProcessPrivilege Profile single process
Disabled
SeIncreaseBasePriorityPrivilege Increase scheduling priority  
Disabled
SeCreatePagefilePrivilege   Create a pagefile 
Disabled
SeBackupPrivilege   Back up files and directories 
Disabled
SeRestorePrivilege  Restore files and directories 
Disabled
SeShutdownPrivilege Shut down the system  
Disabled
SeDebugPrivilegeDebug programs
Disabled
SeSystemEnvironmentPrivilegeModify firmware environment values
Disabled
SeChangeNotifyPrivilege Bypass traverse checking  
Enabled
SeRemoteShutdownPrivilege   Force shutdown from a remote system   
Disabled
SeUndockPrivilege   Remove computer from docking station  
Disabled
SeManageVolumePrivilege Perform volume maintenance tasks  
Disabled
SeImpersonatePrivilege  Impersonate a client after authentication 
Enabled
SeCreateGlobalPrivilege Create global objects 
Enabled
SeIncreaseWorkingSetPrivilege   Increase a process working set
Disabled
SeTimeZonePrivilege Change the time zone  
Disabled
SeCreateSymbolicLinkPrivilege   Create symbolic links 
Disabled


C:\WINDOWS\system32>


-Original Message-
From: "rm...@aboutgolf.com" 
Sent: Tuesday, 

Re: /dev/ptmx fails with Azure accounts

2016-08-02 Thread Corinna Vinschen
Hi,

On Aug  2 11:44, rm...@aboutgolf.com wrote:
> 

Thank you!  Just a small request, please don't cc the corinna-cygwin
account, just send to the list.  Thank you.

> C:\Users\RussellMora>whoami /all
> 
> USER INFORMATION
> 
> 
> User Name   SID
> === ===
> azuread\russellmora S-1-12-1-2043906341-1249388050-2635137163-399631282
> 
> 
> GROUP INFORMATION
> -
> 
> Group NameType SID
>   Attributes
> =  
>  
> ==
> Mandatory Label\Medium Mandatory LevelLabelS-1-16-8192
> Everyone  Well-known group S-1-1-0
>   Mandatory group, Enabled by default, 
> Enabled group
> BUILTIN\AdministratorsAliasS-1-5-32-544   
>   Group used for deny only
> BUILTIN\Users AliasS-1-5-32-545   
>   Mandatory group, Enabled by default, 
> Enabled group
> NT AUTHORITY\INTERACTIVE  Well-known group S-1-5-4
>   Mandatory group, Enabled by default, 
> Enabled group
> CONSOLE LOGON Well-known group S-1-2-1
>   Mandatory group, Enabled by default, 
> Enabled group
> NT AUTHORITY\Authenticated Users  Well-known group S-1-5-11   
>   Mandatory group, Enabled by default, 
> Enabled group
> NT AUTHORITY\This OrganizationWell-known group S-1-5-15   
>   Mandatory group, Enabled by default, 
> Enabled group
> LOCAL Well-known group S-1-2-0
>   Mandatory group, Enabled by default, 
> Enabled group
>   Unknown SID type 
> S-1-12-1-2741946010-1181797680-2322883994-3292483823 Mandatory group, Enabled 
> by default, Enabled group

^^
Yuk!

This is not nice.  Can you try to repeat this call to `whoami /all'
in an elevated shell?  I doubt it will chnage the outcome in terms
of this "Unknown SID", but let's at least try...

I think I will have to come up with a test application as well,
but this might take a day or two...


Thanks,
Corinna

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


signature.asc
Description: PGP signature


Re: Cygwin got V E R Y slow after network switchover

2016-08-02 Thread Jim Reisert AD1C
On Tue, Aug 2, 2016 at 2:26 AM, Andrey Repin wrote:

> You could probably speed it up by running cygserver, which will provide
> credentials caching for all Cygwin processes running in the system.

Thanks for suggesting this.  I ran the setup script and verified the
cygserver service was running.  It helped in the DOS box where only
uname is run.  But a Cygwin Terminal is still taking an abnormally
long time to get to the command prompt.  In fact, I think it's taking
even longer than before.  Even moving .bashrc out of the way, it still
takes several seconds for the Cygwin prompt.  I have no ~/.login.  My
~/.profile does nothing other than source ~/.bashrc if it exists.

> On another note, this is most unsettling to hear.
> Do you run latest Cygwin? Are you connected directly to the network, or
> remotely?

I'm running:

  CYGWIN_NT-6.1 LTDENA-REISERT 2.6.0(0.300/5/3) 2016-07-29 12:14 x86_64 Cygwin

I am plugged into the network.

>> db_home:  /cygdrive/c/Users/jr920141/Box%_Sync/Home
>
> That's one very wrong db_home…

I disagree.  That same path has been working fine for the past month.
It's equivalent to this, with the blank space escaped:

>> db_home:  /cygdrive/c/Users/jr920141/Box Sync/Home

-- 
Jim Reisert AD1C, , http://www.ad1c.us

--
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: /dev/ptmx fails with Azure accounts

2016-08-02 Thread rm...@aboutgolf.com


Though I am going on vacation in a couple of days until the 15th

C:\Users\RussellMora>whoami
azuread\russellmora

C:\Users\RussellMora>whoami /fqdn
ERROR: Unable to get Fully Qualified Distinguished Name (FQDN) as the current
   logged-on user is not a domain user.

C:\Users\RussellMora>whoami /all

USER INFORMATION


User Name   SID
=== ===
azuread\russellmora S-1-12-1-2043906341-1249388050-2635137163-399631282


GROUP INFORMATION
-

Group NameType SID  
Attributes
=  
 
==
Mandatory Label\Medium Mandatory LevelLabelS-1-16-8192
Everyone  Well-known group S-1-1-0  
Mandatory group, Enabled by default, Enabled 
group
BUILTIN\AdministratorsAliasS-1-5-32-544 
Group used for deny only
BUILTIN\Users AliasS-1-5-32-545 
Mandatory group, Enabled by default, Enabled 
group
NT AUTHORITY\INTERACTIVE  Well-known group S-1-5-4  
Mandatory group, Enabled by default, Enabled 
group
CONSOLE LOGON Well-known group S-1-2-1  
Mandatory group, Enabled by default, Enabled 
group
NT AUTHORITY\Authenticated Users  Well-known group S-1-5-11 
Mandatory group, Enabled by default, Enabled 
group
NT AUTHORITY\This OrganizationWell-known group S-1-5-15 
Mandatory group, Enabled by default, Enabled 
group
LOCAL Well-known group S-1-2-0  
Mandatory group, Enabled by default, Enabled 
group
  Unknown SID type 
S-1-12-1-2741946010-1181797680-2322883994-3292483823 Mandatory group, Enabled 
by default, Enabled group
NT AUTHORITY\Cloud Account Authentication Well-known group S-1-5-64-36  
Mandatory group, Enabled by default, Enabled 
group


PRIVILEGES INFORMATION
--

Privilege NameDescription  State
=  
SeShutdownPrivilege   Shut down the system Disabled
SeChangeNotifyPrivilege   Bypass traverse checking Enabled
SeUndockPrivilege Remove computer from docking station Disabled
SeIncreaseWorkingSetPrivilege Increase a process working set   Disabled
SeTimeZonePrivilege   Change the time zone Disabled


C:\Users\RussellMora>



On Aug  1 22:24, Thomas Wolff wrote:
> For Azure Domain users (and I do not really know what that means),
> pts handling does not seem to work, at least not for mintty, where forkpt=
y()
> fails.
> Please check https://github.com/mintty/mintty/issues/563 for a discussion,
> and my comment
> https://github.com/mintty/mintty/issues/563#issuecomment-235310199
>=20
> Also, there has been a similar report here:
> https://sourceware.org/ml/cygwin/2016-02/msg00046.html
>=20
> I have no idea how to establish a working startup of mintty for those use=
rs.

The problem here is that it's impossible to generate access
permissions for the pty with those weird accounts.  I like it
how Microsoft screws up otherwise working software with this
strange domain handling.

To fix this we have to be able to come up with a working user and group
account for these cases.  For that I need at least output from `whoami
/all'.  I wonder why supposedly nobody tried that after /fqdn didn't
work.

This may be fixable by somebody with such an account and willing to hack
on the Cygwin function pwdgrp::fetch_account_from_windows().  There's
already some code for the so-called "Windows accounts" which seem to
work in a similar fashion (albeit in this case the user has a local
account SID).

Alternatively I need at least a guinea pig with such an account,


Corinna





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



[PATCH setup 10/10] Reserve paths starting "." for package metadata

2016-08-02 Thread Jon Turney
Reserve pathnames starting "." (i.e. dotfiles in the root directory) for
package metadata, so don't extract them.

There are no current uses of these pathnames
---
 install.cc | 9 +
 1 file changed, 9 insertions(+)

diff --git a/install.cc b/install.cc
index f54acdc..8aad3a5 100644
--- a/install.cc
+++ b/install.cc
@@ -471,6 +471,15 @@ Installer::installOne (packagemeta , const 
packageversion ,
   while ((fn = tarstream->next_file_name ()).size ())
 {
   std::string canonicalfn = prefixPath + fn;
+
+  // pathnames starting "." (i.e. dotfiles in the root directory) are
+  // reserved for package metadata.  Don't extract them.
+  if (fn[0] == '.')
+{
+  tarstream->skip_file ();
+  continue;
+}
+
   Progress.SetText3 (canonicalfn.c_str ());
   Log (LOG_BABBLE) << "Installing file " << prefixURL << prefixPath
   << fn << endLog;
-- 
2.8.3



[PATCH setup 09/10] Add an additional filter view, showing packages which were user picked

2016-08-02 Thread Jon Turney
Add an additional filter view, showing installed packages which were
selected for installation by the user, not installed as dependencies.

Future work:

Why is PickView::views is not an enum?

The view button would make more sense as a pop-up menu, allowing a specific
filter view to be directly selected, rather than cycling around the possible
filter views (and this situation is made worse by adding another filter
view)
---
 PickView.cc | 16 
 PickView.h  |  4 ++--
 res.rc  |  5 -
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/PickView.cc b/PickView.cc
index 4630ee9..c784a2a 100644
--- a/PickView.cc
+++ b/PickView.cc
@@ -57,8 +57,9 @@ const PickView::views PickView::views::Unknown (0);
 const PickView::views PickView::views::PackageFull (1);
 const PickView::views PickView::views::Package (2);
 const PickView::views PickView::views::PackageKeeps (3);
-const PickView::views PickView::views::PackageSkips = PickView::views (4);
-const PickView::views PickView::views::Category (5);
+const PickView::views PickView::views::PackageSkips (4);
+const PickView::views PickView::views::PackageUserPicked (5);
+const PickView::views PickView::views::Category (6);
 
 ATOM PickView::WindowClassAtom = 0;
 
@@ -92,7 +93,8 @@ PickView::set_header_column_order (views vm)
   if (vm == views::Unknown)
 return -1;
   else if (vm == views::PackageFull || vm == views::Package
-  || vm == views::PackageKeeps || vm == views::PackageSkips)
+   || vm == views::PackageKeeps || vm == views::PackageSkips
+   || vm == views::PackageUserPicked)
 {
   headers = pkg_headers;
   current_col = 0;
@@ -197,7 +199,11 @@ PickView::setViewMode (views mode)
 
   // "Not installed"
   || (view_mode == PickView::views::PackageSkips &&
-  (!pkg.desired && !pkg.installed)))
+  (!pkg.desired && !pkg.installed))
+
+  // "UserPick" : installed packages that were picked by user
+  || (view_mode == PickView::views::PackageUserPicked &&
+  (pkg.installed && pkg.user_picked)))
 {
   // Filter by package name
   if (packageFilterString.empty ()
@@ -246,6 +252,8 @@ PickView::views::caption ()
 case 4:
   return "Not Installed";
 case 5:
+  return "Picked";
+case 6:
   return "Category";
 default:
   return "";
diff --git a/PickView.h b/PickView.h
index 0ce7581..fd20dc9 100644
--- a/PickView.h
+++ b/PickView.h
@@ -104,15 +104,15 @@ public:
 static const views Package;
 static const views PackageKeeps;
 static const views PackageSkips;
+static const views PackageUserPicked;
 static const views Category;
-static const views NView;
   views ():_value (0)
 {
 };
 views (int aInt)
 {
   _value = aInt;
-  if (_value < 0 || _value > 5)
+  if (_value < 0 || _value > 6)
_value = 0;
 }
 views & operator++ ();
diff --git a/res.rc b/res.rc
index f1cf406..de75da8 100644
--- a/res.rc
+++ b/res.rc
@@ -551,7 +551,10 @@ BEGIN
"are at the desired version already.\r\n"
"\r\n"
"Not installed: Show packages that are are not currently installed "
-   "and haven't been selected for installation."
+   "and haven't been selected for installation.\r\n"
+   "\r\n"
+   "Picked: Show installed packages that were selected, not installed "
+   "as a dependency."
 IDS_HIDEOBS_TOOLTIP "If selected, setup will hide packages in 
categories "
"with names that begin with '_'.  Such packages are usually empty "
"placeholders for packages that have been removed or renamed, or are "
-- 
2.8.3



[PATCH setup 04/10] Downgrade "Running preremove script" logging to debug

2016-08-02 Thread Jon Turney
This is emitted for every package, regardless of it has any scripts or not.
Actual script execution is logged separately.

Also a cosmetic fix to remove a doubled space.
---
 install.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install.cc b/install.cc
index 2b714bc..f54acdc 100644
--- a/install.cc
+++ b/install.cc
@@ -159,7 +159,7 @@ Installer::preremoveOne (packagemeta & pkg)
 {
   Progress.SetText1 ("Running preremove script...");
   Progress.SetText2 (pkg.name.c_str());
-  Log (LOG_PLAIN) << "Running preremove script for  " << pkg.name << endLog;
+  Log (LOG_BABBLE) << "Running preremove script for " << pkg.name << endLog;
   const unsigned numexts = 4;
   const char* exts[numexts] = { ".dash", ".sh", ".bat", ".cmd" };
   for (unsigned i = 0; i < numexts; i++)
-- 
2.8.3



[PATCH setup 05/10] Properly report progress in PrereqChecker::isMet

2016-08-02 Thread Jon Turney
Properly report progress in PrereqChecker::isMet after additional dependency
work is found.
---
 prereq.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/prereq.cc b/prereq.cc
index bdc609e..a5083ed 100644
--- a/prereq.cc
+++ b/prereq.cc
@@ -238,6 +238,7 @@ PrereqChecker::isMet ()
 {
   // newly found dependency: add to worklist
   todo.push (dep);
+  max++;
 }
   unmet[dep].push_back (pack);
 }
-- 
2.8.3



[PATCH setup 06/10] Remove obsolete installed_from member from packagemeta

2016-08-02 Thread Jon Turney
This just stores a made-up tarfile name read from installed.db, and is never
used.
---
 package_db.cc   |  2 +-
 package_meta.cc |  2 +-
 package_meta.h  | 11 ++-
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/package_db.cc b/package_db.cc
index 73dfbf6..87da922 100644
--- a/package_db.cc
+++ b/package_db.cc
@@ -96,7 +96,7 @@ packagedb::packagedb ()
  packagemeta *pkg = findBinary (PackageSpecification(pkgname));
  if (!pkg)
{
- pkg = new packagemeta (pkgname, inst);
+ pkg = new packagemeta (pkgname);
  packages.insert 
(packagedb::packagecollection::value_type(pkgname, pkg));
  /* we should install a new handler then not check this...
   */
diff --git a/package_meta.cc b/package_meta.cc
index 34ff78c..21b21ef 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -91,7 +91,7 @@ packagemeta::_actions::caption ()
 }
 
 packagemeta::packagemeta (packagemeta const ) :
-  name (rhs.name), key (rhs.name), installed_from (), 
+  name (rhs.name), key (rhs.name),
   categories (rhs.categories), versions (rhs.versions),
   installed (rhs.installed), prev (rhs.prev),
   curr (rhs.curr),
diff --git a/package_meta.h b/package_meta.h
index b24d4fc..3d6ccd2 100644
--- a/package_meta.h
+++ b/package_meta.h
@@ -35,17 +35,11 @@ public:
   static void ScanDownloadedFiles (bool);
   packagemeta (packagemeta const &);
   packagemeta (const std::string& pkgname)
-  : name (pkgname), key(pkgname), installed_from (), user_picked (false),
+  : name (pkgname), key(pkgname), user_picked (false),
 architecture (), priority(), visited_(false)
   {
   }
 
-  packagemeta (const std::string& pkgname, const std::string& installedfrom)
-  : name (pkgname), key(pkgname), installed_from (installedfrom),
-user_picked (false), architecture (), priority(), visited_(false)
-  {
-  }
-
   ~packagemeta ();
 
   void add_version (packageversion &);
@@ -118,8 +112,7 @@ public:
 
   std::string name;/* package name, like "cygwin" */
   std::string key;
-  /* legacy variable used to output data for installed.db versions <= 2 */
-  std::string installed_from;
+
   /* true if package was selected on command-line. */
   bool isManuallyWanted() const;
   /* true if package was deleted on command-line. */
-- 
2.8.3



[PATCH setup 03/10] Add lex and yacc generated files to .gitignore

2016-08-02 Thread Jon Turney
---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitignore b/.gitignore
index 2186aac..8b81166 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,6 @@ make.out
 CVS
 tags
 autoconf.h.in*
+inilex.cc
+iniparse.cc
+iniparse.hh
-- 
2.8.3



Re: Size limitation for NcFsd drive?

2016-08-02 Thread Corinna Vinschen
Hi Franz,

On Aug  2 16:26, Franz Sirl wrote:
> Am 2016-07-29 um 16:38 schrieb Corinna Vinschen:
> > On Jul 29 16:18, Corinna Vinschen wrote:
> > > In the first place it would be prudent to find out why the
> > > FileAllInformation info class fails on this drive.  And in the second
> > > place it would be important to find out how to fix this.  Potential
> > > checks:
> > > 
> > > - Buffer alignment of the FILE_ALL_INFORMATION member in class
> > >   path_conv_handle.
> > > 
> > > - Buffer size of the FILE_ALL_INFORMATION member.  For instance,
> > >   does it work if the buffer is 1 byte bigger?  Or perhaps if
> > >   the buffer is NAME_MAX bigger?
> > 
> > - There's also a chance (albeit minor) that the FileAllInformation call
> >   actually worked and the weird status code is just wrong.  After all,
> >   returning from this call with STATUS_BUFFER_OVERFLOW is valid, too,
> >   so I'd check for this as well here.
> 
> Hi Corinna,
> 
> no, the error code isn't influenced by alignment or size. For local drives
> and SMB shares the STATUS_BUFFER_OVERFLOW turns into STATUS_SUCCESS as soon
> as there is enough room for the share path in the
> FILE_NAME_INFORMATION.FileName flexible array member (actually, why isn't
> path_conv_handle.attribs._fai larger? performance? FileNameInformation
> usually not needed?).

FileNameInformation is the full path to the file.  It's not only not
needed, but for full long pathname support the buffer would have to
be sizeof (FILE_ALL_INFORMATION) + 32767 * sizeof (WCHAR), thus more
than 64K in size.

FileAllInformation is designed so that you can ask for all information
except the filename by just ignoring the name buffer requirements.  In
that case NtQueryInformationFile returns STATUS_BUFFER_OVERFLOW, which
can be ignored.

> But for the NCP share the strange error code for
> FileAllInformation remains. Checking all the members of FileAllInformation
> one by one, it turned out that it's the FileInternalIformation member that
> fails. I've reported it as a bug to Novell.

Cool.  NtQueryInformationFile is supposed to just set all unsupported
members to 0, see the Remarks section of
https://msdn.microsoft.com/en-us/library/windows/hardware/ff567052(v=vs.85).aspx

However, do we need a workaround?  Kind of like this:

diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 970a0fe..d9ed357 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1307,6 +1307,19 @@ file_get_fai (HANDLE h, PFILE_ALL_INFORMATION pfai)
   FileAllInformation);
   if (status == STATUS_BUFFER_OVERFLOW)
 status = STATUS_SUCCESS;
+  /* Filesystems with broken FileAllInformation exist, too.  See the thread
+ starting with https://cygwin.com/ml/cygwin/2016-07/msg00350.html. */
+  else if (!NT_SUCCESS (status) && status != STATUS_ACCESS_DENIED)
+{
+  memset (pfai, 0, sizeof *pfai);
+  status = NtQueryInformationFile (h, , >BasicInformation,
+  sizeof pfai->BasicInformation,
+  FileBasicInformation);
+  if (NT_SUCCESS (status))
+   status = NtQueryInformationFile (h, , >StandardInformation,
+sizeof pfai->StandardInformation,
+FileStandardInformation);
+}
   return status;
 }
 

> Nevertheless I believe the fallback to
> NtQueryDirectoryFile(FileIdBothDirectoryInformation) does not do what you
> want if the path is the root directory of a share. But that's not the cause
> of this problem.

Yeah, as I wrote in my reply, the NtQueryDirectoryFile branch isn't
supposed to be hit in this scenario.  It's solely for "access denied"
situations.

Are you set up to build your own Cygwin DLL so you can test the above
patch locally?


Thanks,
Corinna

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


signature.asc
Description: PGP signature


Re: Size limitation for NcFsd drive?

2016-08-02 Thread Franz Sirl

Am 2016-07-29 um 16:38 schrieb Corinna Vinschen:

On Jul 29 16:18, Corinna Vinschen wrote:

In the first place it would be prudent to find out why the
FileAllInformation info class fails on this drive.  And in the second
place it would be important to find out how to fix this.  Potential
checks:

- Buffer alignment of the FILE_ALL_INFORMATION member in class
  path_conv_handle.

- Buffer size of the FILE_ALL_INFORMATION member.  For instance,
  does it work if the buffer is 1 byte bigger?  Or perhaps if
  the buffer is NAME_MAX bigger?


- There's also a chance (albeit minor) that the FileAllInformation call
  actually worked and the weird status code is just wrong.  After all,
  returning from this call with STATUS_BUFFER_OVERFLOW is valid, too,
  so I'd check for this as well here.


Hi Corinna,

no, the error code isn't influenced by alignment or size. For local 
drives and SMB shares the STATUS_BUFFER_OVERFLOW turns into 
STATUS_SUCCESS as soon as there is enough room for the share path in the 
FILE_NAME_INFORMATION.FileName flexible array member (actually, why 
isn't path_conv_handle.attribs._fai larger? performance? 
FileNameInformation usually not needed?). But for the NCP share the 
strange error code for FileAllInformation remains. Checking all the 
members of FileAllInformation one by one, it turned out that it's the 
FileInternalIformation member that fails. I've reported it as a bug to 
Novell.


Nevertheless I believe the fallback to 
NtQueryDirectoryFile(FileIdBothDirectoryInformation) does not do what 
you want if the path is the root directory of a share. But that's not 
the cause of this problem.


Franz.



--
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: /dev/ptmx fails with Azure accounts

2016-08-02 Thread Corinna Vinschen
On Aug  2 11:54, Corinna Vinschen wrote:
> On Aug  1 22:24, Thomas Wolff wrote:
> > For Azure Domain users (and I do not really know what that means),
> > pts handling does not seem to work, at least not for mintty, where forkpty()
> > fails.
> > Please check https://github.com/mintty/mintty/issues/563 for a discussion,
> > and my comment
> > https://github.com/mintty/mintty/issues/563#issuecomment-235310199
> > 
> > Also, there has been a similar report here:
> > https://sourceware.org/ml/cygwin/2016-02/msg00046.html
> > 
> > I have no idea how to establish a working startup of mintty for those users.
> 
> The problem here is that it's impossible to generate access
> permissions for the pty with those weird accounts.  I like it
> how Microsoft screws up otherwise working software with this
> strange domain handling.
> 
> To fix this we have to be able to come up with a working user and group
> account for these cases.  For that I need at least output from `whoami
> /all'.  I wonder why supposedly nobody tried that after /fqdn didn't
> work.
> 
> This may be fixable by somebody with such an account and willing to hack
> on the Cygwin function pwdgrp::fetch_account_from_windows().  There's
> already some code for the so-called "Windows accounts" which seem to
> work in a similar fashion (albeit in this case the user has a local
> account SID).
> 
> Alternatively I need at least a guinea pig with such an account,

There's another problem with those accounts.  If they act like a domain
account, but there's no valid domain info on the machine (*), then who
should Cygwin ask for shell and home dir?

(*) That's the cause of the "Unknown domain AzureAD".  Usually the local
machine has a list of domains which is refreshed once in a while.
Even the local machine SAM is a domain in this view.

However, while the LookupAccountSid function seems to return
"AzureAD" as the domain name for this account, the domain list on
the local machine does not contain this domain.


Corinna

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


signature.asc
Description: PGP signature


Re: [PATCH setup] (Usability improvement) Implement half-second wait for user to finish typing before searching packages

2016-08-02 Thread Jon Turney

On 02/08/2016 04:17, Ronald Ramos wrote:

@@ -397,10 +396,10 @@ ChooserPage::OnMessageCmd (int id, HWND hwndctl,
UINT code)
 {
 case IDC_CHOOSE_CLEAR_SEARCH:
   {
-std::string value;
-eset (GetHWND (), IDC_CHOOSE_SEARCH_EDIT, value);
-chooser->SetPackageFilter (value);
-chooser->refresh ();
+std::string value;
+eset (GetHWND (), IDC_CHOOSE_SEARCH_EDIT, value);
+chooser->SetPackageFilter (value);
+chooser->refresh ();


Shouldn't the timer be cancelled here, to avoid potentially doing a 
refresh() twice?





Re: [PATCH setup] (Usability improvement) Implement half-second wait for user to finish typing before searching packages

2016-08-02 Thread Thomas Wolff

Am 02.08.2016 um 11:22 schrieb Corinna Vinschen:

On Aug  1 23:17, Ronald Ramos wrote:

commit 357c1e7576586349efb8514dc9d8d03950e225ee
Author: Ronald Ramos 
Date:   Mon Aug 1 23:05:44 2016 -0400

 * proppage.h (PropertyPage)
 New member OnTimerMessage (delegates similarly to OnMouseWheel)

 * proppage.cc
 (DialogProc) Added handling of WM_TIMER

 * choose.h (ChooserPage)
 (OnTimerMessage) New function prototype
 (timer_id) New member variable
 Added DEFINE-ed default values for timer_id and search timer delay
 Reorganized private members for consistency

 * choose.cc
 (constructor) Initialize timer_id
 (OnMessageCmd) Replaced search-refresh with a SetTimer
 (OnSearchTimer) New; contains search-refresh removed from
OnMessageCmd

Neat!  Applied.  Personally I would rather see a shorter timeout like,
say, 300ms, but I guess we shouldn't take for granted that everybody is
typing fast.  Even with 500ms timeout it's now much more convenient than
the old "search after each keypress" method.
I agree with Corinna. Great enhancement, but 300ms should be a good 
trade-off for unpatient people...

Thomas


Re: /dev/ptmx fails with Azure accounts

2016-08-02 Thread Corinna Vinschen
On Aug  1 22:24, Thomas Wolff wrote:
> For Azure Domain users (and I do not really know what that means),
> pts handling does not seem to work, at least not for mintty, where forkpty()
> fails.
> Please check https://github.com/mintty/mintty/issues/563 for a discussion,
> and my comment
> https://github.com/mintty/mintty/issues/563#issuecomment-235310199
> 
> Also, there has been a similar report here:
> https://sourceware.org/ml/cygwin/2016-02/msg00046.html
> 
> I have no idea how to establish a working startup of mintty for those users.

The problem here is that it's impossible to generate access
permissions for the pty with those weird accounts.  I like it
how Microsoft screws up otherwise working software with this
strange domain handling.

To fix this we have to be able to come up with a working user and group
account for these cases.  For that I need at least output from `whoami
/all'.  I wonder why supposedly nobody tried that after /fqdn didn't
work.

This may be fixable by somebody with such an account and willing to hack
on the Cygwin function pwdgrp::fetch_account_from_windows().  There's
already some code for the so-called "Windows accounts" which seem to
work in a similar fashion (albeit in this case the user has a local
account SID).

Alternatively I need at least a guinea pig with such an account,


Corinna

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


signature.asc
Description: PGP signature


Re: [PATCH setup] (Usability improvement) Implement half-second wait for user to finish typing before searching packages

2016-08-02 Thread Corinna Vinschen
On Aug  1 23:17, Ronald Ramos wrote:
> commit 357c1e7576586349efb8514dc9d8d03950e225ee
> Author: Ronald Ramos 
> Date:   Mon Aug 1 23:05:44 2016 -0400
> 
> * proppage.h (PropertyPage)
> New member OnTimerMessage (delegates similarly to OnMouseWheel)
> 
> * proppage.cc
> (DialogProc) Added handling of WM_TIMER
> 
> * choose.h (ChooserPage)
> (OnTimerMessage) New function prototype
> (timer_id) New member variable
> Added DEFINE-ed default values for timer_id and search timer delay
> Reorganized private members for consistency
> 
> * choose.cc
> (constructor) Initialize timer_id
> (OnMessageCmd) Replaced search-refresh with a SetTimer
> (OnSearchTimer) New; contains search-refresh removed from
> OnMessageCmd

Neat!  Applied.  Personally I would rather see a shorter timeout like,
say, 300ms, but I guess we shouldn't take for granted that everybody is
typing fast.  Even with 500ms timeout it's now much more convenient than
the old "search after each keypress" method.

However.  Your MUA seems to scramble patches as part of the mail text,
e.g., it adds line breaks which break `patch' or `git am'.

It would be nice if you could fix this.  Alternatively, just attach the
output from `git format-patch' as mail attachment.  That usually works
nicely.


Thanks,
Corinna

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


signature.asc
Description: PGP signature


Re: [PATCH setup] README: Fixed mailing list address (typo)

2016-08-02 Thread Corinna Vinschen
On Aug  1 20:24, Ronald Ramos wrote:
> commit 5d7c3beee3317926eb3256dd7a1bed8f55a6952b
> Author: Ronald Ramos 
> Date:   Mon Aug 1 20:21:47 2016 -0400
> 
> * README: Fixed which mailing list this app belongs to
> 
> diff --git a/README b/README
> index 9ad78b6..a05b18f 100644
> --- a/README
> +++ b/README
> @@ -70,7 +70,7 @@ Follow the general directions given in the Cygwin
> contributions document:
>  The appropriate mailing list for this project is cygwin-apps
>  (rather than cygwin-patches). Thus, the appropriate final command would be:
> 
> -   $ git send-email --to="cygwin-patc...@cygwin.com"
> +   $ git send-email --to="cygwin-apps@cygwin.com"
> 
> 
>  WISHLIST:

Applied.


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


signature.asc
Description: PGP signature


Re: Cygwin got V E R Y slow after network switchover

2016-08-02 Thread Andrey Repin
Greetings, Jim Reisert AD1C!

> Our company recently switched to an "active directory" network, with
> different login credentials.  Don't ask me what that is exactly.  Ever
> since, anything having to do with Cygwin takes seconds or minutes,
> whereas it used to be instantaneous.  Even having "uname -a" in a Take
> Command (like CMD.EXE) shell causes the shell window to take seconds
> to come up.  Comment out the uname, and the shell window comes up
> instantaneously.  You don't want to know how long I have to wait for
> an Xterm to start so I can run Emacs to open a file...

You could probably speed it up by running cygserver, which will provide
credentials caching for all Cygwin processes running in the system.
On another note, this is most unsettling to hear.
Do you run latest Cygwin? Are you connected directly to the network, or
remotely?

> My /etc/nsswitch.conf is as follows (the only thing I define is db_home).

> # passwd:   files db
> # group:files db
> # db_enum:  cache builtin
> # db_home:  /home/%U
> db_home:  /cygdrive/c/Users/jr920141/Box%_Sync/Home

That's one very wrong db_home…

> # db_shell: /bin/bash
> # db_gecos: 

> I've attached cygcheck.out but don't know if that will help.

> It's the exact same laptop.  I don't know why a network change would
> cause Cygwin to slow down so much.  Suggestions or speculations would
> be appreciated!


-- 
With best regards,
Andrey Repin
Tuesday, August 2, 2016 11:24:43

Sorry for my terrible english...

Re: Emacs will not execute, always reports 24.5.1 as version

2016-08-02 Thread Marco Atzeri

On 01/08/2016 23:16, Brian Kuhn wrote:


Thanks for the response. Same result with 'emacs -Q' as well, i'm afraid.



Then maybe an strace will help.  Please give the following command:

  strace -o strace.out /usr/bin/emacs-nox.exe -Q


This is interseting.

$ strace -o strace.out /usr/bin/emacs-nox.exe -Q
Segmentation fault


Then look at the output file strace.out to see if it provides a clue as to
what's going wrong.  If you don't see anything, compress the file and send
it to me as an attachment off list.



I could send that, but it would just be a zero-byte file.   :-)

$ ls -l | grep strace.out
-rwxr-xr-x 1 ME Domain Users 0 Aug  1 15:43 strace.out


Ken





I saw before this. It is an antivirus.
The seg fault is coming from strace as the AV is blocking the
loading of dll's of emacs.

Try disabling it.

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