Re: Bugreport: openldap 2.4.48-1 ldapsearch coredump

2019-09-06 Thread Quanah Gibson-Mount




--On Wednesday, September 4, 2019 2:47 PM +0300 Alexander Voropay 
 wrote:



Hi!

Ildapsearch coredumps on (semi) complicated filter on MS AD LDAP
(Filtered request to find all non-blocked users w/o e-mail address).

The _same_ request works on the RHEL 7 ldapsearch
"openldap-2.4.44-21.el7_6"


Does it work on RHEL7 with OpenLDAP 2.4.48?

You can get RHEL7 packages from <https://repo.symas.com/sofl/rhel7/> or 
<https://ltb-project.org/documentation/openldap-rpm#yum_repository>


--Quanah


--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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: Bug report: Killing a native process may not actually kill it

2019-08-28 Thread Quanah Gibson-Mount
--On Wednesday, August 28, 2019 2:33 PM -0700 Kaz Kylheku 
<920-082-4...@kylheku.com> wrote:



Cygwin can't introduce Unix-like shutdown mechanisms (like the
handling a non-fatal signal) into non-Cygwin processes which have
no concept of that. It makes no sense.


My original post contained a link to a patch allowing for Cygwin to 
correctly terminate native Windows processes.  I understand it is not the 
position of the Cygwin project to deal with situation, so I think we can 
just let it drop.


Regards,
Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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: Bug report: Killing a native process may not actually kill it

2019-08-28 Thread Quanah Gibson-Mount




--On Wednesday, August 28, 2019 6:45 PM +0200 Corinna Vinschen 
 wrote:



Not likely.  Cygwin handles Ctrl-C by generating SIGINT.  This only
works reliably with Cygwin processes.  There's

  $ /bin/kill -f 

to call the Win32 function TerminateProcess(pid) on a non-Cygwin
process or an unresponsive Cygwin process.


As I noted, it was not unique to control-C.  In any case, unfortunate to 
hear that Cygwin will not address this issue.  kill -f is clearly not 
desirable for doing a clean shutdown of a process.


--Quanah


--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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: Bug report: Killing a native process may not actually kill it

2019-08-28 Thread Quanah Gibson-Mount




--On Thursday, July 25, 2019 11:32 AM -0700 Quanah Gibson-Mount 
 wrote:



As found and reported to the MSYS team back in 2006 by Howard Chu, if a
native process is spawned, control-C, the kill command, etc, may not
actually kill the process.  Details are here:


I haven't seen a reply to this, so I just wanted to confirm that the Cygwin 
project is aware and (hopefully) will be able to do something to fix this 
in the long term.


Thanks!

Regards,
Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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: More on Win7 update messing up HOME

2019-08-16 Thread Quanah Gibson-Mount




--On Saturday, August 17, 2019 12:28 AM +0300 Andrey Repin 
 wrote:



Greetings, David Karr!


> I wish I could get my own messages on this list, so I could add more
> information to my first note.

Just reply to your own initial message. Or better yet, subscribe.




I am subscribed.  I can't reply to my own initial message because I never
receive my own postings, I only receive notes sent by other people.


You WROTE it. No need to receive to reply to it.


As a subscriber, I receive a copy of every mail I send to the list (and I 
prefer it that way).  Seems to be the default list setting.  Perhaps David 
changed his list preferences at some point or there was a different default 
setting for the list at the time he subscribed?  It's pretty common for 
this to be the default behavior for a mailing list.  For one thing, it 
ensures you know that your email to the list was actually delivered.


--Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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: Openldap 2.4.48-1 vs my company's pki

2019-08-05 Thread Quanah Gibson-Mount
--On Monday, August 05, 2019 5:06 PM -0400 David Goldberg 
 wrote:



Correct, openssl s_client works, as does the older build of ldapsearch.  I
can't find any .ldaprc nor ldap.conf files on my system.

Unfortunately I've only set up my system for end user purposes. Building
from source will be a challenge. Any guidance (a link is fine) on what
packages to install to set that up? And do I need to worry about the
.cygport and patch files in the source distribution or will configure pick
them up?


I would start with executing ldapsearch with the -d -1 flag added in (full 
debugging) to see what the client is doing.


I.e., if you're doing startTLS, then something like

ldapsearch -x -ZZ -d -1 -H ldap:// -s base -b ""

Or if you're using ldaps, then something like:

ldapsearch -x -d -1 -H ldaps:// -s base -b ""

Regards,
Quanah


--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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: Openldap 2.4.48-1 vs my company's pki

2019-08-05 Thread Quanah Gibson-Mount
--On Monday, August 05, 2019 9:22 AM -0400 David Goldberg 
 wrote:



Sorry, was away from work over the weekend. I just tested with openssl
s_client and it works just fine.  Version is 1.1.1.  there is no self
signed certificate. It's signed with the company pki rather than
commercial and I've properly installed that chain. The problem send to be
with the new build, at least the weird ldd output leads me to that
conclusion. I'll try to find some time to build from source and see if it


Do you mean you connected to the ldap server using OpenSSL s_client to 
confirm that works?  If that works and the ldapsearch (or other ldap 
client) binary does not, then you likely have a global /etc/ldap.conf (or 
whereever this build looks for it) or a ~/.ldaprc file that defines the 
path or file to find the CA certificate that would need updating.


Regards,
Quanah


--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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: Openldap 2.4.48-1 vs my company's pki

2019-08-02 Thread Quanah Gibson-Mount
--On Friday, August 02, 2019 12:45 PM -0400 David Goldberg 
 wrote:



I updated openldap from 2.4.42-1 to 2.4.48-1 this morning and now
ldapsearch will not connect, complaining that the server provided
certificate is self signed. I have set up /etc/pki with my company's
certificate chain and that allows 2.4.42-1 (and earlier) and other
applications to properly authenticate local services. What has changed in
2.4.48-1 that causes this to not work and how can I fix it. I've
downgraded for now; that is not a good long term solution of course.


What SSL library is being used for each of the two builds (I.e., gnutls? 
openssl? moznss?)  What SSL library version did 2.4.42 link to?  What SSL 
library version does 2.4.48 link to?  Generally OpenLDAP should be linked 
to OpenSSL which uses PEM formatted certificates.  Also check whether you 
have a global ldap.conf file (usually something like 
/etc/openldap/ldap.conf or /etc/ldap.conf, etc, depending on how OpenLDAP 
was built) that defines where to find the CA Cert(s), or a ~user/.ldaprc, 
etc.  OpenLDAP client utilities generally by default do not search for a 
global list of CA certificates.


--Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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: openldap on Cygwin

2019-07-25 Thread Quanah Gibson-Mount
--On Thursday, July 25, 2019 9:30 PM +0200 Achim Gratz  
wrote:



Quanah Gibson-Mount writes:
[…]

Sorry for wedging in sideways, but I've looked into building a more
up-to-date openldap and there's missing detection / configuration for
Cygwin.  Specifically, there's code trying to use robust POSIX mutexes,
which Cygwin doesn't have.  As there is no configure option (that I
could find), the solution is a bit invasive: either feeding in a number
of preprocessor defines or patching in the recognition of Cygwin into
libraries/liblmdb/mdb.c to define the correct options there.

Any chance the upcoming release would have a fix for that?


Hi Achim,

I would suggest filing a report in the OpenLDAP issue tracker at:

<https://www.openldap.org/its>

I use MSYS2 for my OpenLDAP on windows builds, so haven't any direct 
experience at the moment with building it via cygwin.


Regards,
Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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



Bug report: Killing a native process may not actually kill it

2019-07-25 Thread Quanah Gibson-Mount
As found and reported to the MSYS team back in 2006 by Howard Chu, if a 
native process is spawned, control-C, the kill command, etc, may not 
actually kill the process.  Details are here:


<http://mingw.5.n7.nabble.com/Re-Ctrl-Break-handler-td28010.html>

as well as here:

<https://sourceforge.net/p/mingw/bugs/1783/>

Given that there is now 64-bit windows, the issue would be a bit more 
complex to resolve, as an updated patch would need to query first to see if 
the target process is 32-bit or 64-bit, and then a 64-bit version of the 
patch needs to be created.


The inability to properly kill such a spawned process can lead to things 
like the dreaded "Device or resource busy" error, since the process that is 
using the related file has actually never terminated.


It's fairly trivial to reproduce this in the OpenLDAP test suite, 
particularly test001, which spawns a slapd process, kills it, then spawns 
another slapd process, which will fail because the original slapd never 
actually got killed.


Regards,
Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.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: Oddities with file deletion on CIFS drive

2010-09-12 Thread Quanah Gibson-Mount

--On Sunday, September 12, 2010 1:43 PM +0200 Corinna Vinschen wrote:


On Sep 11 12:41, Corinna Vinschen wrote:

On Sep 10 10:48, Quanah Gibson-Mount wrote:
 --On Friday, September 10, 2010 7:09 PM +0200 Corinna Vinschen wrote:

  Let me know if there is anything else I can provide.
 
  I'm not sure.  I don't think so.  The problem is that the unlink(2)
  function in Cygwin does not get any error code from any of the OS
  functions it calls.  So, from the Cygwin POV everything worked fine.
  How is it supposed to know that anything has gone wrong, if the
  underlying OS doesn't tell?

 Heh, magic I guess.  If I mount the drive as a CIFS drive from a Linux
 box, I can delete the files just fine, so for now that gives me a
 workaround (I'll move my deletion process to a Linux box).

This morning I had an idea.  While we were looking into the ACL, we
neglected the DOS attributes.  When you call `attrib' on one of the
files for which you didn't call chmod yet, is the R/O attribute set?

If so, it *could* explain why Cygwin thought it has successfully deleted
the file, but it hasn't.  I also might have a workaround for this.


I've checked in a change which probably fixed your issue.  The only
exception are Cygwin symlinks of the old .lnk type, which has more
than one link.  That should occur rather seldom.  Please test the
next developer's snapshot from http://cygwin.com/snapshots/


Hi Corinna,

I will give the snapshot a test.  Here is the output of attrib:

bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/ZDESKTOP-608/20100912050101_ZDESKTOP/ZimbraBuild/templates

$ attrib BUILD_ISYNC_template
AR 
Z:\current\WINDOWS\ZDESKTOP-608\20100912050101_ZDESKTOP\ZimbraBuild\templates\BUILD_ISYNC_template



--Quanah


--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Oddities with file deletion on CIFS drive

2010-09-12 Thread Quanah Gibson-Mount

--On Sunday, September 12, 2010 2:21 PM -0700 Quanah Gibson-Mount wrote:


Hi Corinna,

I will give the snapshot a test.  Here is the output of attrib:

bu...@zre-win-002
/cygdrive/z/current/WINDOWS/ZDESKTOP-608/20100912050101_ZDESKTOP/ZimbraBu
ild/templates
$ attrib BUILD_ISYNC_template
AR
Z:\current\WINDOWS\ZDESKTOP-608\20100912050101_ZDESKTOP\ZimbraBuild\templ
ates\BUILD_ISYNC_template


Hi Corinna,

With the snapshot in place, I can now remove the files.

With plain rm, it prompts (as it should) and succeeds if I answer yes.
With rm -f, no prompt, and it succeeds.

--Quanah


--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Oddities with file deletion on CIFS drive

2010-09-10 Thread Quanah Gibson-Mount

--On Friday, September 10, 2010 11:16 AM +0200 Corinna Vinschen  wrote:


On Sep  8 15:17, Quanah Gibson-Mount wrote:

I have a CIFS drive I connect to as the windows user.  I can write
to the drive with no problem.  However, when I go to delete files
from the drive, Cygwin behaves very oddly.

bu...@zre-win-002
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/tem
plates $ rm -f *


If you call rm w/o the -f flag, what error message do you get?
Just a simple Permission denied, I guess.


Nope.  It doesn't give any error.

bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates

$ rm BUILD_ISYNC_template
rm: remove write-protected regular file `BUILD_ISYNC_template'? y

bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates

$ ls -l BUILD_ISYNC_template
-r-xr-xr-x 1   1453 2010-09-08 13:31 BUILD_ISYNC_template


bu...@zre-win-002
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/tem
plates $ ls -l
total 104
-r-xr-xr-x 1   1362 2010-09-08 13:31 BUILD_EVO_template
-r-xr-xr-x 1   1453 2010-09-08 13:31 BUILD_ISYNC_template
[...]
Now, if I modify the file to be +w, then -w, so it returns to its
original permissions, I can suddenly delete it:


Did you create the files with a Cygwin aplication or with a native Win32
application?  In theory, there's nothing mysterious here, if the
permissions of the file are so that the DELETE permission for your user
or group is missing in the file's ACL.  For obvious reasons the POSIX
permission bits can't reflect the complexity of the original NT ACL.
The chmod +w/-w somehow overwrite the original permissions with POSIX
permissions as Cygwin generates them and the result is more DELETE
friendly.  Did you try to compare the ACL before and after the chmod?
The output of `cacls filename' is probably different.


The files are created with a native Win32 application (Perforce), where it 
is checking these files out of the Perforce repository.


Here is the output from cacls prior to +w/-w:
bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates

$ cacls BUILD_ISYNC_template
Z:\current\WINDOWS\main\20100908131458_ZDESKTOP\ZimbraBuild\templates\BUILD_ISYNC_template
Everyone:F
Account Domain not foundF
Account Domain not foundR
Everyone:R


Here is cacls after +w/-w:
Z:\current\WINDOWS\main\20100908131458_ZDESKTOP\ZimbraBuild\templates\BUILD_ISYNC_template 
Account Domain not found(special access:)


STANDARD_RIGHTS_ALL

DELETE

READ_CONTROL

WRITE_DAC

WRITE_OWNER

SYNCHRONIZE

STANDARD_RIGHTS_REQUIRED

FILE_GENERIC_READ

FILE_GENERIC_EXECUTE

FILE_READ_DATA

FILE_READ_EA

FILE_EXECUTE

FILE_READ_ATTRIBUTES

FILE_WRITE_ATTRIBUTES


Account Domain not foundR

Everyone:R



This behavior is quite bizarre.  I should be able to delete the
files I created with the -f option to rm.


Well, in theory, yes.  However, it's possible that your CIFS drive
has semantics which disallow this with the original ACL for some
reason.  Can you pleae run `strace -o rm.trace rm some_file' on a
file which has the original ACL (before the chmod call) and send the
rm.trace file?


Done.  I've provided strace output from both rm FILE and rm -f FILE

Let me know if there is anything else I can provide.

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

rm.trace.gz
Description: Binary data


rmf.trace.gz
Description: Binary data
--
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: Oddities with file deletion on CIFS drive

2010-09-10 Thread Quanah Gibson-Mount

--On Friday, September 10, 2010 7:09 PM +0200 Corinna Vinschen wrote:


Let me know if there is anything else I can provide.


I'm not sure.  I don't think so.  The problem is that the unlink(2)
function in Cygwin does not get any error code from any of the OS
functions it calls.  So, from the Cygwin POV everything worked fine.
How is it supposed to know that anything has gone wrong, if the
underlying OS doesn't tell?


Heh, magic I guess.  If I mount the drive as a CIFS drive from a Linux box,
I can delete the files just fine, so for now that gives me a workaround
(I'll move my deletion process to a Linux box).

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration
Zimbra ::  the leader in open source messaging and collaboration

--
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: Oddities with file deletion on CIFS drive

2010-09-09 Thread Quanah Gibson-Mount
--On Wednesday, September 08, 2010 10:50 PM -0400 Larry Hall (Cygwin) 
reply-to-list-only...@cygwin.com wrote:



Yeah, there's been plenty of these network appliances that really foul up
their implementation of permissions.  MVFS and NetApp are a couple in the
past that have had problems.  If you have the csih package installed, run
/usr/lib/csih/getVolInfo drive letter:/ and send the results here.  And
then wait for the groans. ;-)


Ok, here is the results. ;)

$ /usr/lib/csih/getVolInfo /cygdrive/z
Device Type: 7
Characteristics: 10
Volume Name: 121
Serial Number  : 27
Max Filenamelength : 255
Filesystemname : NTFS
Flags  : 4007e
 FILE_CASE_SENSITIVE_SEARCH  : FALSE
 FILE_CASE_PRESERVED_NAMES   : TRUE
 FILE_UNICODE_ON_DISK: TRUE
 FILE_PERSISTENT_ACLS: TRUE
 FILE_FILE_COMPRESSION   : TRUE
 FILE_VOLUME_QUOTAS  : TRUE
 FILE_SUPPORTS_SPARSE_FILES  : TRUE
 FILE_SUPPORTS_REPARSE_POINTS: FALSE
 FILE_SUPPORTS_REMOTE_STORAGE: FALSE
 FILE_VOLUME_IS_COMPRESSED   : FALSE
 FILE_SUPPORTS_OBJECT_IDS: FALSE
 FILE_SUPPORTS_ENCRYPTION: FALSE
 FILE_NAMED_STREAMS  : TRUE
 FILE_READ_ONLY_VOLUME   : FALSE
 FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
 FILE_SUPPORTS_TRANSACTIONS  : FALSE

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

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



Oddities with file deletion on CIFS drive

2010-09-08 Thread Quanah Gibson-Mount
I have a CIFS drive I connect to as the windows user.  I can write to the 
drive with no problem.  However, when I go to delete files from the drive, 
Cygwin behaves very oddly.


bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates

$ rm -f *

bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates

$ ls -l
total 104
-r-xr-xr-x 1   1362 2010-09-08 13:31 BUILD_EVO_template
-r-xr-xr-x 1   1453 2010-09-08 13:31 BUILD_ISYNC_template
-r-xr-xr-x 1    636 2010-09-08 13:31 BUILD_LABEL_template
-r-xr-xr-x 1   1536 2010-09-08 13:31 
BUILD_WIN_UPDATE_template

-r-xr-xr-x 1   1699 2010-09-08 13:31 BUILD_template
-r-xr-xr-x 1   4508 2010-09-08 13:31 BUILD_template_FOSS
-r-xr-xr-x 1   7118 2010-09-08 13:31 
BUILD_template_FOSS_ThirdParty

-r-xr-xr-x 1   1453 2010-09-08 13:31 BUILD_template_ISYNC
-r-xr-xr-x 1   5535 2010-09-08 13:31 BUILD_template_NETWORK
-r-xr-xr-x 1   7975 2010-09-08 13:31 
BUILD_template_NETWORK_ThirdParty

-r-xr-xr-x 1   1463 2010-09-08 13:31 BUILD_template_TOASTER
-r-xr-xr-x 1   2989 2010-09-08 13:31 BUILD_template_ZDESKTOP
-r-xr-xr-x 1   1386 2010-09-08 13:31 BUILD_test

Even with -f, it failed to delete these files.  Files that were created by 
this very user.


Now, if I modify the file to be +w, then -w, so it returns to its original 
permissions, I can suddenly delete it:


bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates

$ chmod a+w BUILD_EVO_template

bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates

$ chmod a-w BUILD_EVO_template

bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates

$ rm BUILD_EVO_template

bu...@zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates

$ ls -l
total 96
-r-xr-xr-x 1   1453 2010-09-08 13:31 BUILD_ISYNC_template
-r-xr-xr-x 1    636 2010-09-08 13:31 BUILD_LABEL_template
-r-xr-xr-x 1   1536 2010-09-08 13:31 
BUILD_WIN_UPDATE_template

-r-xr-xr-x 1   1699 2010-09-08 13:31 BUILD_template
-r-xr-xr-x 1   4508 2010-09-08 13:31 BUILD_template_FOSS
-r-xr-xr-x 1   7118 2010-09-08 13:31 
BUILD_template_FOSS_ThirdParty

-r-xr-xr-x 1   1453 2010-09-08 13:31 BUILD_template_ISYNC
-r-xr-xr-x 1   5535 2010-09-08 13:31 BUILD_template_NETWORK
-r-xr-xr-x 1   7975 2010-09-08 13:31 
BUILD_template_NETWORK_ThirdParty

-r-xr-xr-x 1   1463 2010-09-08 13:31 BUILD_template_TOASTER
-r-xr-xr-x 1   2989 2010-09-08 13:31 BUILD_template_ZDESKTOP
-r-xr-xr-x 1   1386 2010-09-08 13:31 BUILD_test


This behavior is quite bizarre.  I should be able to delete the files I 
created with the -f option to rm.


--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Oddities with file deletion on CIFS drive

2010-09-08 Thread Quanah Gibson-Mount
--On Wednesday, September 08, 2010 3:17 PM -0700 Quanah Gibson-Mount  
wrote:





This behavior is quite bizarre.  I should be able to delete the files I
created with the -f option to rm.




Also, if I mount it on a linux box via CIFS, I can delete files on this 
drive no issue.  So it is definitely a Cygwin issue.


--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Oddities with file deletion on CIFS drive

2010-09-08 Thread Quanah Gibson-Mount
--On Wednesday, September 08, 2010 6:37 PM -0400 Larry Hall (Cygwin)  
wrote:



$ ls -l
total 104
-r-xr-xr-x 1   1362 2010-09-08 13:31 BUILD_EVO_template


snip

I think you need to look at why the user that created the files in the
first place isn't known to Cygwin.  If you can solve that problem, you
may find the rest falls into place.


No clue, I assume it is some bug in cygwin, since this happens to any file 
created on this drive via Cygwin.


bu...@zre-win-002 /cygdrive/z/current/WINDOWS
$ whoami
build

bu...@zre-win-002 /cygdrive/z/current/WINDOWS
$ ls -l blah
ls: cannot access blah: No such file or directory

bu...@zre-win-002 /cygdrive/z/current/WINDOWS
$ touch blah
l
bu...@zre-win-002 /cygdrive/z/current/WINDOWS
$ ls -l blah
-rw-r--r-- 1   0 2010-09-08 15:45 blah

bu...@zre-win-002 /cygdrive/z/current/WINDOWS
$ rm blah

bu...@zre-win-002 /cygdrive/z/current/WINDOWS
$


--Quanah



--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Oddities with file deletion on CIFS drive

2010-09-08 Thread Quanah Gibson-Mount
--On Wednesday, September 08, 2010 6:51 PM -0400 Larry Hall (Cygwin)  
wrote:




OK, take a look at http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-ids.
You'll want to use 'mkpasswd' and 'mkgroup' to get the passwd and group
files fixed up.


I've read that page multiple times, and it still looks greek to me. :/ 
What I know is, the CIFS drive is mounted as the user build.  The user I 
log into windows with is build.  The user cygwin runs under is build. 
So all 3 of those match.  I don't see why there's any issue at all 
determining who owns the files.


bu...@zre-win-002 ~
$ id build
uid=503(build) gid=513(None) groups=513(None)

bu...@zre-win-002 ~
$ grep build /etc/passwd
build:unused:503:513:U-ZRE-WIN-002\build,S-1-5-21-1229272821-2049760794-1417001333-1003:/home/build:/bin/bash

bu...@zre-win-002 ~
$ grep 513 /etc/group
None:S-1-5-21-1229272821-2049760794-1417001333-513:513:

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Oddities with file deletion on CIFS drive

2010-09-08 Thread Quanah Gibson-Mount
--On Wednesday, September 08, 2010 9:55 PM -0400 Larry Hall (Cygwin)  
wrote:



bu...@zre-win-002 ~
$ id build
uid=503(build) gid=513(None) groups=513(None)

bu...@zre-win-002 ~
$ grep build /etc/passwd
build:unused:503:513:U-ZRE-WIN-002\build,S-1-5-21-1229272821-2049760794-
1417001333-1003:/home/build:/bin/bash


This shouldn't be significant but is there a reason that you changed
your uid to 503 from 1003?


503 is what we usually use for the build user on our linux boxes, I had 
changed it to see if it would do anything ownership wise, but it didn't.  I 
changed it back to 1003 and rebooted, but no change in behavior.



bu...@zre-win-002 ~
$ grep 513 /etc/group
None:S-1-5-21-1229272821-2049760794-1417001333-513:513:


Hm, what does 'ls -ln' look like?  I can guess but I shouldn't do that.
;-)



-r-xr-xr-x 1 4294967295 4294967295 1453 2010-09-08 13:31 
BUILD_ISYNC_template


(etc)


That covers all the obvious things for me.  I'd recommend taking a look at
the SAMBA server to see if user IDs are mapped correctly.  Also, I know
there were some problems in the past with older Samba servers, bugs and
all.  Make sure you're using a current version there.  It may be
worthwhile to look at the permissions and owners from the Windows
perspective too.  If that doesn't get you anywhere, I'd recommend filing
a full problem report on your follow-up to the list.  See the link below
for full details:


I don't think the CIFS server is using Samba, actually.  It is a Celerra 
storage array from EMC 
(http://www.emc.com/products/family/celerra-family.htm), and in this 
case, it isn't hooked up to an AD server like they usually have them.



Problem reports: http://cygwin.com/problems.html


Ok, thanks.

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Oddities with file deletion on CIFS drive

2010-09-08 Thread Quanah Gibson-Mount
--On Wednesday, September 08, 2010 7:12 PM -0700 Quanah Gibson-Mount 
qua...@zimbra.com wrote:



That covers all the obvious things for me.  I'd recommend taking a look
at the SAMBA server to see if user IDs are mapped correctly.  Also, I
know there were some problems in the past with older Samba servers, bugs
and all.  Make sure you're using a current version there.  It may be
worthwhile to look at the permissions and owners from the Windows
perspective too.  If that doesn't get you anywhere, I'd recommend filing
a full problem report on your follow-up to the list.  See the link below
for full details:


I don't think the CIFS server is using Samba, actually.  It is a Celerra
storage array from EMC
(http://www.emc.com/products/family/celerra-family.htm), and in this
case, it isn't hooked up to an AD server like they usually have them.


Hm, looks like it does use smb, based off google.  But I have no idea what 
version of Samba it ships with.  I'll see if I can find out from out 
networking team.


--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Network drives ssh access

2010-09-04 Thread Quanah Gibson-Mount
--On Saturday, September 04, 2010 11:30 AM +0200 Corinna Vinschen 
corinna-cyg...@cygwin.com wrote:



The login via ssh is another session.  The Windows mounts are only
stored on a per-session base.


I thought the point of using passwd -R is so that when you log in to a new 
session, the drive gets automatically mounted...


In any case, I modified my .bashrc to mount the drive if it detects an SSH 
session.


--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Network drives ssh access

2010-09-03 Thread Quanah Gibson-Mount

--On Tuesday, August 24, 2010 1:35 PM -0700 Quanah Gibson-Mount  wrote:


--On Tuesday, August 24, 2010 1:19 PM -0400 Larry Hall (Cygwin)
 wrote:


A missing password is likely your problem, since that's at the heart of
your original problem really.  But I actually wasn't thinking of this
option
as the solution to your problem when I pointed you at the FAQ.  Running
a service as the user you'll log in as is really just a workaround.
I was thinking more of:

http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3


Using the passwd -R bit did not change the behavior.  I still am unable
to access the network share when logging in via SSH, but it works just
fine when starting cygwin locally.

I will note that the network share (CIFS) uses a different
username/password than my local user/password on the windows box (That,
unfortunately, is not under my control).

However, I set up the share using net use \\IP\share /savecreds, and that
does mount the drive to Windows at least every time without prompting,
and Cygwin locally is able to use it.  It is only an issue with the SSH
connection.


The CIFS mount now uses the same username/password as the windows user.  I 
have used passwd -R to store the user's password in the registry.  The 
drive again shows up when launching cygwin manually, and it still fails to 
show up when I use ssh to connect.


--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Network drives ssh access

2010-09-03 Thread Quanah Gibson-Mount

--On Friday, September 03, 2010 12:28 PM -0700 Quanah Gibson-Mount  wrote:


--On Tuesday, August 24, 2010 1:35 PM -0700 Quanah Gibson-Mount  wrote:
The CIFS mount now uses the same username/password as the windows user.
I have used passwd -R to store the user's password in the registry.  The
drive again shows up when launching cygwin manually, and it still fails
to show up when I use ssh to connect.


$ net use
New connections will be remembered.


Status   Local RemoteNetwork

---
Unavailable  Z:\\10.137.242.250\Zbuild3  Microsoft Windows Network
The command completed successfully.


$ net use Z: '\\10.137.242.250\Zbuild3'
The command completed successfully.


$ net use
New connections will be remembered.


Status   Local RemoteNetwork

---
OK   Z:\\10.137.242.250\Zbuild3  Microsoft Windows Network
The command completed successfully.

So, mounting it works ok if I do it manually via ssh.  But why isn't it 
simply showing up when it's already mounted on the system, and the 
credentials have been stored via passwd -R?


It was also mounted using /savecred

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Network drives ssh access

2010-08-24 Thread Quanah Gibson-Mount
--On Monday, August 23, 2010 9:41 PM -0400 Larry Hall (Cygwin) 
reply-to-list-only...@cygwin.com wrote:



On 8/23/2010 7:47 PM, Quanah Gibson-Mount wrote:

I have a network drive set up to auto-reconnect at startup, which
appears to work fine. If I start cygwin after logging in, I can see the
drive in the /cygwin directory.

However, I cannot see the drive in the /cygwin directory when connecting
via Cygwin's OpenSSH. My guess is that ssh starts before the drive shows
up. Running net use from the SSH connection says it is unavailable:


snip

The FAQ is your friend:

http://cygwin.com/faq/faq-nochunks.html#faq.using.shares


Thanks, I missed that, was reading the fstab etc pages.

So I set up sshd to run as the build user, but it still doesn't work:

I ran:
cygrunsrv.exe -R sshd

confirmed no sshd processes were running
rebooted, confirmed no sshd processes were running

Ran:
ssh-host-config -u build

to set it up to run as the build user (my primary user)

Told it to use privilege separation

Said I want sshd to run as a service
Put ntsec tty as the values for the CYGWIN environment variable


Ran cygrunsrv -S sshd


ps -eaf now shows sshd running as SYSTEM proc 3376 with parent 3340, and a 
subprocess

sshd 3444 running as build user

I log in as the build user via ssh, and ps -eaf shows me to sshd process 
running as SYSTEM - proc 3376 with parent 3340 and a subprocess 1824 with 
3376 as the parent.



So, in reading the further documents, is what I need to do then is change 
the SYSTEM entry in /etc/passwd to use the SID of the build user instead?



--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Network drives ssh access

2010-08-24 Thread Quanah Gibson-Mount
--On Tuesday, August 24, 2010 9:59 AM -0700 Quanah Gibson-Mount 
qua...@zimbra.com wrote:



I log in as the build user via ssh, and ps -eaf shows me to sshd process
running as SYSTEM - proc 3376 with parent 3340 and a subprocess 1824 with
3376 as the parent.


Specifically, when logging in via remote ssh, both processes were owned by 
SYSTEM.  So the bit to run as the build user apparently doesn't actually 
work.


--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Network drives ssh access

2010-08-24 Thread Quanah Gibson-Mount
--On Tuesday, August 24, 2010 1:19 PM -0400 Larry Hall (Cygwin) 
reply-to-list-only...@cygwin.com wrote:



A missing password is likely your problem, since that's at the heart of
your original problem really.  But I actually wasn't thinking of this
option
as the solution to your problem when I pointed you at the FAQ.  Running
a service as the user you'll log in as is really just a workaround.
I was thinking more of:

http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3


Using the passwd -R bit did not change the behavior.  I still am unable to 
access the network share when logging in via SSH, but it works just fine 
when starting cygwin locally.


I will note that the network share (CIFS) uses a different 
username/password than my local user/password on the windows box (That, 
unfortunately, is not under my control).


However, I set up the share using net use \\IP\share /savecreds, and that 
does mount the drive to Windows at least every time without prompting, and 
Cygwin locally is able to use it.  It is only an issue with the SSH 
connection.


--Quanah


--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

--
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: Network drives ssh access

2010-08-24 Thread Quanah Gibson-Mount

--On Tuesday, August 24, 2010 4:49 PM -0400 Larry Hall (Cygwin) wrote:


However, I set up the share using net use \\IP\share /savecreds, and that
does mount the drive to Windows at least every time without prompting,
and Cygwin locally is able to use it. It is only an issue with the SSH
connection.


Well, that's a completely different thing then.  You need Windows to
authenticate that share as the other user then.  I think you're stuck
with net use option of the FAQ.  You can either invoke it each time
you log in via ssh, put it in your favorite rc file, or have a separate
script to do it (which you'd invoke each time).


I've yet to get net use to work for me via cygwin.

net use Z: \\W.X.Y.Z\Share password

tries to prompt me with a question:

Z: has a remembered connection to \\W.X.Y.Z\Share.  Do you want to 
overwrite the remembered connection? (Y/N) [Y]:

No valid response was provided

I.e., it never gives me the opportunity to answer the question.

If I try changing the drive letter, I get error 67, the network name cannot 
be found.


Note that net use by itself continues to show the Unavailable status 
for the Z: drive with that share.


--Quanah


--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

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



Network drives ssh access

2010-08-23 Thread Quanah Gibson-Mount
I have a network drive set up to auto-reconnect at startup, which appears 
to work fine.  If I start cygwin after logging in, I can see the drive in 
the /cygwin directory.


However, I cannot see the drive in the /cygwin directory when connecting 
via Cygwin's OpenSSH.  My guess is that ssh starts before the drive shows 
up.  Running net use from the SSH connection says it is unavailable:


bu...@zre-win-002 /
$ net use
New connections will be remembered.


Status   Local RemoteNetwork

---
Unavailable  Z:\\X.X.X.X\Zbuild3  Microsoft Windows Network
The command completed successfully.





From the system itself:


bu...@zre-win-002 /
$ net use
New connections will be remembered.


Status   Local RemoteNetwork

---
OK   Z:\\X.X.X.X\Zbuild3  Microsoft Windows Network
The command completed successfully.



Trying to run net use Z: doesn't help any.  Any ideas on what I can do to 
make this drive show up so I can access it when accessing the windows box 
remotely?


Thanks,
Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration

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