Re: Patch for run-1.3.0-1 core dump

2014-02-18 Thread Corinna Vinschen
Hi Jon,
Hi Chuck,

On Feb 17 17:25, Jon TURNEY wrote:
> On 12/08/2013 15:22, Charles Wilson wrote:
> > On 8/10/2013 1:34 PM, foo wrote:
> >> Whenever I execute run.exe, it generates run.exe.stackdump.
> >>
> >> At line 370 in run.c, run2_freeargv() tries to free newargv, and
> >> run2_freeqrgv() expects that newargv is terminated by NULL. However,
> >> in shifting newargv at line 253-256, it fails to shift NULL
> >> terminator. Therefore, run2_freeargv() frees memory illegally.
> >> The following patch is a workaround.
> >>
> >> --- run.c.old
> >> +++ run.c.new
> >> @@ -252,7 +252,7 @@
> >> newargv = run2_dupargv (argv);
> >> /* discard newargv[0] and shift up */
> >> free (newargv[0]);
> >> -  for (newargc = 1; newargc < argc; newargc++)
> >> +  for (newargc = 1; newargv[newargc-1] != NULL; newargc++)
> >>newargv[newargc-1] = newargv[newargc];
> >> newargc = argc - 1;
> > 
> > Thanks for the bug report and the patch. I'll investigate and update the
> > package soon.
> 
> Since I've been running with CYGWIN error_start always set at the moment, I've
> noticed that run is always crashing after launching the process.
> 
> I went to all the trouble of investigating this, discovering that
> run2_freeargv() is double-freeing the last element in newargv because the NULL
> terminator isn't moved when the arguments are shifted down over newargv[0],
> and writing a patch, before I noticed that we already had one :-(
> 
> --- origsrc/run-1.3.0/src/run.c 2013-07-24 16:26:39.0 +0100
> +++ src/run-1.3.0/src/run.c 2014-02-17 17:08:49.12500 +
> @@ -254,6 +254,7 @@ realMain(int argc, char* argv[])
>free (newargv[0]);
>for (newargc = 1; newargc < argc; newargc++)
>   newargv[newargc-1] = newargv[newargc];
> +  newargv[argc-1] = 0;
>newargc = argc - 1;
> 
>/* update execname */

There's still something wrong.  I build run with this patch locally,
and it seems to fix the issue at first sight.  However, after the
child process of run exits, run throws an exception in free(), and
the stack looks broken (on 64 bit).  It seems there is a double free
or a free of an entirely unrelated address.


Corinna

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


pgpLX3p7Tlk1b.pgp
Description: PGP signature


Re: Patch for run-1.3.0-1 core dump

2014-02-18 Thread Corinna Vinschen
On Feb 18 10:05, Corinna Vinschen wrote:
> Hi Jon,
> Hi Chuck,
> 
> On Feb 17 17:25, Jon TURNEY wrote:
> > On 12/08/2013 15:22, Charles Wilson wrote:
> > > On 8/10/2013 1:34 PM, foo wrote:
> > >> Whenever I execute run.exe, it generates run.exe.stackdump.
> > >>
> > >> At line 370 in run.c, run2_freeargv() tries to free newargv, and
> > >> run2_freeqrgv() expects that newargv is terminated by NULL. However,
> > >> in shifting newargv at line 253-256, it fails to shift NULL
> > >> terminator. Therefore, run2_freeargv() frees memory illegally.
> > >> The following patch is a workaround.
> > >>
> > >> --- run.c.old
> > >> +++ run.c.new
> > >> @@ -252,7 +252,7 @@
> > >> newargv = run2_dupargv (argv);
> > >> /* discard newargv[0] and shift up */
> > >> free (newargv[0]);
> > >> -  for (newargc = 1; newargc < argc; newargc++)
> > >> +  for (newargc = 1; newargv[newargc-1] != NULL; newargc++)
> > >>newargv[newargc-1] = newargv[newargc];
> > >> newargc = argc - 1;
> > > 
> > > Thanks for the bug report and the patch. I'll investigate and update the
> > > package soon.
> > 
> > Since I've been running with CYGWIN error_start always set at the moment, 
> > I've
> > noticed that run is always crashing after launching the process.
> > 
> > I went to all the trouble of investigating this, discovering that
> > run2_freeargv() is double-freeing the last element in newargv because the 
> > NULL
> > terminator isn't moved when the arguments are shifted down over newargv[0],
> > and writing a patch, before I noticed that we already had one :-(
> > 
> > --- origsrc/run-1.3.0/src/run.c 2013-07-24 16:26:39.0 +0100
> > +++ src/run-1.3.0/src/run.c 2014-02-17 17:08:49.12500 +
> > @@ -254,6 +254,7 @@ realMain(int argc, char* argv[])
> >free (newargv[0]);
> >for (newargc = 1; newargc < argc; newargc++)
> >   newargv[newargc-1] = newargv[newargc];
> > +  newargv[argc-1] = 0;
> >newargc = argc - 1;
> > 
> >/* update execname */
> 
> There's still something wrong.  I build run with this patch locally,
> and it seems to fix the issue at first sight.  However, after the
> child process of run exits, run throws an exception in free(), and
> the stack looks broken (on 64 bit).  It seems there is a double free
> or a free of an entirely unrelated address.

Scratch that.  I managed to fat-finger a one-line patch.  Sorry.


Corinna

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


pgp5sH24WtNFj.pgp
Description: PGP signature


Re: setup: how to select all src packages too?

2014-02-18 Thread Andrey Repin
Greetings, Luke Kendall!

> It's great that Cygwin has so many packages.  And setup.exe makes it 
> easy to select the packages you want.

> But it seems quite difficult to also select all the corresponding source 
> packages as well, simply because there are so many packages! In the 
> worst case, where you want every package, and all the source packages 
> too, surely you don't have to scroll and click 3,000-odd times in the UI 
> to select them all?  But I haven't found a way to do it through setup.

> Sorry if this is a dumb question.  I have searched, but couldn't find an 
> answer.

This is a known deficiency of a Cygwin setup.
However, how many source packages you ACTUALLY, REALLY need to download?


--
WBR,
Andrey Repin (anrdae...@yandex.ru) 18.02.2014, <13:24>

Sorry for my terrible english...


--
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: $PATH contains dot but unclear where it comes from

2014-02-18 Thread Robert Klemme
On Thu, Feb 6, 2014 at 4:32 PM, Robert Klemme
 wrote:

> Can anybody make sense of that?  I can share the complete log with
> individuals if it helps.

Nobody?

Cheers

robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.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



NFS/SSHD interaction

2014-02-18 Thread Dominik Straßer

Hi all,
I am facing an interaction issue between Microsoft's NFS client and 
cygwin's sshd.


I am trying to set the following environment:
mounting user1's home dir to drive x:
mounting user2's home dir to drive y:

mount x: in cygwin (fstab) to /home/user1
mount y: in cygwin (fstab) to /home/user2

This works fine when I start the cygwin terminal directly.

If I now ssh to user1, I can't see /home/user1 and /home/user2.
/cygdrive/x and cygdrive/y don't exist.

My suspicion is the following:
Cygwin's sshd gets started before Microsoft's NFS client.
As the login shell spawned by sshd is it's child, it only sees what was 
present when sshd started.


Re-starting ssh doesn't help, I only managed to get sshd up and running 
after a reboot.


I can't use SAMBA because I would need 2 different user credentials to 
mount the two home directories which is not supported by MS because they 
lie on the same server.


Any help is greatly appreciated.

Regards

Dominik-- Dominik Strasser | Phone: +49 89 99013-436 OneSpin Solutions 
GmbH | Fax: +49 89 99013-100 Nymphenburgerstr. 20a 80335 Muenchen | 
dominik.stras...@onespin-solutions.com Geschaeftsfuehrung: Dr. Raik 
Brinkmann, Oliver Habeck Vorsitzender des Beirats: Paul Hill Sitz: 
Muenchen; Amtsgericht Muenchen HRB 139464 UstID#: DE 814413215


--
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: NFS/SSHD interaction

2014-02-18 Thread Dominik Straßer

Hi all,
sorry I hate those people not giving the full information:

I am using Windows7 Ultimate 64bit.

Regards

Dominik

Am 18.02.2014 12:58, schrieb Dominik Straßer:

Hi all,
I am facing an interaction issue between Microsoft's NFS client and 
cygwin's sshd.


I am trying to set the following environment:
mounting user1's home dir to drive x:
mounting user2's home dir to drive y:

mount x: in cygwin (fstab) to /home/user1
mount y: in cygwin (fstab) to /home/user2

This works fine when I start the cygwin terminal directly.

If I now ssh to user1, I can't see /home/user1 and /home/user2.
/cygdrive/x and cygdrive/y don't exist.

My suspicion is the following:
Cygwin's sshd gets started before Microsoft's NFS client.
As the login shell spawned by sshd is it's child, it only sees what 
was present when sshd started.


Re-starting ssh doesn't help, I only managed to get sshd up and 
running after a reboot.


I can't use SAMBA because I would need 2 different user credentials to 
mount the two home directories which is not supported by MS because 
they lie on the same server.


Any help is greatly appreciated.

Regards

Dominik-- Dominik Strasser | Phone: +49 89 99013-436 OneSpin Solutions 
GmbH | Fax: +49 89 99013-100 Nymphenburgerstr. 20a 80335 Muenchen | 
dominik.stras...@onespin-solutions.com Geschaeftsfuehrung: Dr. Raik 
Brinkmann, Oliver Habeck Vorsitzender des Beirats: Paul Hill Sitz: 
Muenchen; Amtsgericht Muenchen HRB 139464 UstID#: DE 814413215


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



--
Dominik Strasser   | Phone:  +49 89 99013-436
OneSpin Solutions GmbH | Fax:+49 89 99013-100
Nymphenburgerstr. 20a
80335 Muenchen | dominik.stras...@onespin-solutions.com
Geschaeftsfuehrung: Dr. Raik Brinkmann, Oliver Habeck
Vorsitzender des Beirats: Paul Hill
Sitz: Muenchen; Amtsgericht Muenchen HRB 139464
UstID#: DE 814413215


--
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: NFS/SSHD interaction

2014-02-18 Thread Corinna Vinschen
On Feb 18 12:58, Dominik Straßer wrote:
> Hi all,
> I am facing an interaction issue between Microsoft's NFS client and
> cygwin's sshd.
> 
> I am trying to set the following environment:
> mounting user1's home dir to drive x:
> mounting user2's home dir to drive y:
> 
> mount x: in cygwin (fstab) to /home/user1
> mount y: in cygwin (fstab) to /home/user2
> 
> This works fine when I start the cygwin terminal directly.
> 
> If I now ssh to user1, I can't see /home/user1 and /home/user2.
> /cygdrive/x and cygdrive/y don't exist.
> 
> My suspicion is the following:
> Cygwin's sshd gets started before Microsoft's NFS client.
> As the login shell spawned by sshd is it's child, it only sees what
> was present when sshd started.

The user credentials are wrong, probably.  Via ssh, you have the
problems described in
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview


Corinna

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


pgpiT3BoHmeia.pgp
Description: PGP signature


Re: NFS/SSHD interaction

2014-02-18 Thread Dominik Straßer

Hi Corinna,
thanks for the pointer. I haven't yet fully understood the credentials 
stuff. But can it have this result:

In the cygwin terminal:
ls -l /cygdrive
total 43
d-+  1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c
drwxr-x---  15 nightNone  1024 Jan 23 22:53 k
drwxr-x---  52 nightNone 24576 Feb 18  2014 n
drwxr-x--x  62 nightNone 14336 Feb 17 13:57 s

In the ssh:
ls -l /cygdrive
total 4
d-+ 1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c

Regards

Dominik

Am 18.02.2014 13:20, schrieb Corinna Vinschen:

On Feb 18 12:58, Dominik Straßer wrote:

Hi all,
I am facing an interaction issue between Microsoft's NFS client and
cygwin's sshd.

I am trying to set the following environment:
mounting user1's home dir to drive x:
mounting user2's home dir to drive y:

mount x: in cygwin (fstab) to /home/user1
mount y: in cygwin (fstab) to /home/user2

This works fine when I start the cygwin terminal directly.

If I now ssh to user1, I can't see /home/user1 and /home/user2.
/cygdrive/x and cygdrive/y don't exist.

My suspicion is the following:
Cygwin's sshd gets started before Microsoft's NFS client.
As the login shell spawned by sshd is it's child, it only sees what
was present when sshd started.

The user credentials are wrong, probably.  Via ssh, you have the
problems described in
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview


Corinna



--
Dominik Strasser   | Phone:  +49 89 99013-436
OneSpin Solutions GmbH | Fax:+49 89 99013-100
Nymphenburgerstr. 20a
80335 Muenchen | dominik.stras...@onespin-solutions.com
Geschaeftsfuehrung: Dr. Raik Brinkmann, Oliver Habeck
Vorsitzender des Beirats: Paul Hill
Sitz: Muenchen; Amtsgericht Muenchen HRB 139464
UstID#: DE 814413215


--
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: NFS/SSHD interaction

2014-02-18 Thread Corinna Vinschen
On Feb 18 13:35, Dominik Straßer wrote:
> Hi Corinna,
> thanks for the pointer. I haven't yet fully understood the
> credentials stuff. But can it have this result:
> In the cygwin terminal:
> ls -l /cygdrive
> total 43
> d-+  1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c
> drwxr-x---  15 nightNone  1024 Jan 23 22:53 k
> drwxr-x---  52 nightNone 24576 Feb 18  2014 n
> drwxr-x--x  62 nightNone 14336 Feb 17 13:57 s
> 
> In the ssh:
> ls -l /cygdrive
> total 4
> d-+ 1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c

Keep in mind that the login via ssh is in another session than a desktop
session.  If you want a user to see the automatically mounted drives in
a ssh session, the ssh session needs the user's credentials.  This only
works if the user mounts the required drives manually after login via
ssh, or if the login via ssh already has the credentials.  This is
only the case when using method 3:
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3


Corinna

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


pgp4qKFpzA5sV.pgp
Description: PGP signature


problem

2014-02-18 Thread Brian Holley

Under Win8.1, cygwin64 reports:

  1 [main] scp 4648 find_fast_cwd: WARNING: Couldn't compute 
FAST_CWD pointer.


and asks for this to be reported.

Brian Holley

--
IT Office, Selwyn College, Cambridge CB3 9DQ
Tel. +44 [0]1223 767842. web site: http://www.sel.cam.ac.uk


--
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: NFS/SSHD interaction

2014-02-18 Thread Dominik Straßer

Hi Corinna,
Am 18.02.2014 13:43, schrieb Corinna Vinschen:

On Feb 18 13:35, Dominik Straßer wrote:

Hi Corinna,
thanks for the pointer. I haven't yet fully understood the
credentials stuff. But can it have this result:
In the cygwin terminal:
ls -l /cygdrive
total 43
d-+  1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c
drwxr-x---  15 nightNone  1024 Jan 23 22:53 k
drwxr-x---  52 nightNone 24576 Feb 18  2014 n
drwxr-x--x  62 nightNone 14336 Feb 17 13:57 s

In the ssh:
ls -l /cygdrive
total 4
d-+ 1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c

Keep in mind that the login via ssh is in another session than a desktop
session.  If you want a user to see the automatically mounted drives in
a ssh session, the ssh session needs the user's credentials.  This only
works if the user mounts the required drives manually after login via

So what I am doing now is (in .bashrc)
/cygdrive/c/Windows/system32/mount.exe '' k:
mount k: /home/user1

which seems to work.

ssh, or if the login via ssh already has the credentials.  This is
only the case when using method 3:
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3




tried it, but didn't work:
$ passwd -R
This functionality stores a password in the registry for usage by services
which need to change the user context and require network access. Typical
applications are interactive remote logons using sshd, cron task, etc.
This password will always tried first when any privileged application is
about to switch the user context.

Note that storing even obfuscated passwords in the registry is not overly
secure.  Use this feature only if the machine is adequately locked down.
Don't use this feature if you don't need network access within a remote
session.

You can delete the stored password by specifying an empty password.

Enter your current password:
Re-enter your current password:
Storing password failed: Function not implemented

here my cygwin version:
$ uname -a
CYGWIN_NT-6.1 ossvmw7u1 1.7.28(0.271/5/3) 2014-02-09 21:06 x86_64 Cygwin

Thanks for the hints I now have a working solution. Not nice, but it 
seems to work.


Best regards

Dominik

--
Dominik Strasser   | Phone:  +49 89 99013-436
OneSpin Solutions GmbH | Fax:+49 89 99013-100
Nymphenburgerstr. 20a
80335 Muenchen | dominik.stras...@onespin-solutions.com
Geschaeftsfuehrung: Dr. Raik Brinkmann, Oliver Habeck
Vorsitzender des Beirats: Paul Hill
Sitz: Muenchen; Amtsgericht Muenchen HRB 139464
UstID#: DE 814413215


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

2014-02-18 Thread Corinna Vinschen
On Feb 18 14:07, Brian Holley wrote:
> Under Win8.1, cygwin64 reports:
> 
>   1 [main] scp 4648 find_fast_cwd: WARNING: Couldn't compute
> FAST_CWD pointer.
> 
> and asks for this to be reported.

Are you using an older Cygwin version by any chance?  I'm using Windows
8.1 daily and I haven't seen this message for a long time.  The patch to
avoid the message is from when 8.1 has gone Beta, as far as I remember.


Corinna

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


pgpLk8fBdxJC4.pgp
Description: PGP signature


Re: NFS/SSHD interaction

2014-02-18 Thread Corinna Vinschen
On Feb 18 15:20, Dominik Straßer wrote:
> Hi Corinna,
> Am 18.02.2014 13:43, schrieb Corinna Vinschen:
> >On Feb 18 13:35, Dominik Straßer wrote:
> >>Hi Corinna,
> >>thanks for the pointer. I haven't yet fully understood the
> >>credentials stuff. But can it have this result:
> >>In the cygwin terminal:
> >>ls -l /cygdrive
> >>total 43
> >>d-+  1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c
> >>drwxr-x---  15 nightNone  1024 Jan 23 22:53 k
> >>drwxr-x---  52 nightNone 24576 Feb 18  2014 n
> >>drwxr-x--x  62 nightNone 14336 Feb 17 13:57 s
> >>
> >>In the ssh:
> >>ls -l /cygdrive
> >>total 4
> >>d-+ 1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c
> >Keep in mind that the login via ssh is in another session than a desktop
> >session.  If you want a user to see the automatically mounted drives in
> >a ssh session, the ssh session needs the user's credentials.  This only
> >works if the user mounts the required drives manually after login via
> So what I am doing now is (in .bashrc)
> /cygdrive/c/Windows/system32/mount.exe '' k:
> mount k: /home/user1
> 
> which seems to work.
> >ssh, or if the login via ssh already has the credentials.  This is
> >only the case when using method 3:
> >http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3
> >
> >
> 
> tried it, but didn't work:
> $ passwd -R
> [etc]
> Enter your current password:
> Re-enter your current password:
> Storing password failed: Function not implemented

Did you *read* the aforementioned URL?  It explains that a non-admin
needs cygserver to run passwd -R.  As an admin you can enter the
password for other users, if you know it.  See additionally
http://cygwin.com/cygwin-ug-net/using-utils.html#passwd


Corinna

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


pgpwAlljm6TZ5.pgp
Description: PGP signature


Re: NFS/SSHD interaction

2014-02-18 Thread Dominik Straßer


Am 18.02.2014 15:26, schrieb Corinna Vinschen:

On Feb 18 15:20, Dominik Straßer wrote:

Hi Corinna,
Am 18.02.2014 13:43, schrieb Corinna Vinschen:

On Feb 18 13:35, Dominik Straßer wrote:

Hi Corinna,
thanks for the pointer. I haven't yet fully understood the
credentials stuff. But can it have this result:
In the cygwin terminal:
ls -l /cygdrive
total 43
d-+  1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c
drwxr-x---  15 nightNone  1024 Jan 23 22:53 k
drwxr-x---  52 nightNone 24576 Feb 18  2014 n
drwxr-x--x  62 nightNone 14336 Feb 17 13:57 s

In the ssh:
ls -l /cygdrive
total 4
d-+ 1 TrustedInstaller TrustedInstaller 0 Feb 18 10:27 c

Keep in mind that the login via ssh is in another session than a desktop
session.  If you want a user to see the automatically mounted drives in
a ssh session, the ssh session needs the user's credentials.  This only
works if the user mounts the required drives manually after login via

So what I am doing now is (in .bashrc)
/cygdrive/c/Windows/system32/mount.exe '' k:
mount k: /home/user1

which seems to work.

ssh, or if the login via ssh already has the credentials.  This is
only the case when using method 3:
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3



tried it, but didn't work:
$ passwd -R
[etc]
Enter your current password:
Re-enter your current password:
Storing password failed: Function not implemented

Hi Corinna,

Did you *read* the aforementioned URL?  It explains that a non-admin
needs cygserver to run passwd -R.  As an admin you can enter the
password for other users, if you know it.  See additionally
http://cygwin.com/cygwin-ug-net/using-utils.html#passwd
Of yourse I did :-), and I clicked on "Run as adminstrator" for the 
Cygwin shell (otherwise the error message was different: Storing 
password failed: bad file descriptor)


Regards

Dominik



Corinna



--
Dominik Strasser   | Phone:  +49 89 99013-436
OneSpin Solutions GmbH | Fax:+49 89 99013-100
Nymphenburgerstr. 20a
80335 Muenchen | dominik.stras...@onespin-solutions.com
Geschaeftsfuehrung: Dr. Raik Brinkmann, Oliver Habeck
Vorsitzender des Beirats: Paul Hill
Sitz: Muenchen; Amtsgericht Muenchen HRB 139464
UstID#: DE 814413215


--
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: NFS/SSHD interaction

2014-02-18 Thread Dominik Straßer


Am 18.02.2014 15:56, schrieb Corinna Vinschen:

On Feb 18 15:32, Dominik Straßer wrote:

Am 18.02.2014 15:26, schrieb Corinna Vinschen:

On Feb 18 15:20, Dominik Straßer wrote:

Am 18.02.2014 13:43, schrieb Corinna Vinschen:

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


tried it, but didn't work:
$ passwd -R
[etc]
Enter your current password:
Re-enter your current password:
Storing password failed: Function not implemented

Hi Corinna,

Did you *read* the aforementioned URL?  It explains that a non-admin
needs cygserver to run passwd -R.  As an admin you can enter the
password for other users, if you know it.  See additionally
http://cygwin.com/cygwin-ug-net/using-utils.html#passwd

Of yourse I did :-), and I clicked on "Run as adminstrator" for the
Cygwin shell (otherwise the error message was different: Storing
password failed: bad file descriptor)

Aaa!

This is my fault.  I broke this functionality in Cygwin 1.7.28-2,
because I changed a conditional expression the wrong way.



Hi Corinna,
no problem at all.

Sorry about that.  I applied a fix to CVS.  For the time being, you
need to use either Cygwin 1.7.27, or wait for the snapshot I'm going
to upload in the next half hour or so: http://cygwin.com/snapshots/
As I have a workaround now, I'll wait until this fix is available in a 
release.


Best regards

Dominik



Corinna



--
Dominik Strasser   | Phone:  +49 89 99013-436
OneSpin Solutions GmbH | Fax:+49 89 99013-100
Nymphenburgerstr. 20a
80335 Muenchen | dominik.stras...@onespin-solutions.com
Geschaeftsfuehrung: Dr. Raik Brinkmann, Oliver Habeck
Vorsitzender des Beirats: Paul Hill
Sitz: Muenchen; Amtsgericht Muenchen HRB 139464
UstID#: DE 814413215


--
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: NFS/SSHD interaction

2014-02-18 Thread Corinna Vinschen
On Feb 18 15:32, Dominik Straßer wrote:
> Am 18.02.2014 15:26, schrieb Corinna Vinschen:
> >On Feb 18 15:20, Dominik Straßer wrote:
> >>Am 18.02.2014 13:43, schrieb Corinna Vinschen:
> >>>http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3
> >>>
> >>tried it, but didn't work:
> >>$ passwd -R
> >>[etc]
> >>Enter your current password:
> >>Re-enter your current password:
> >>Storing password failed: Function not implemented
> Hi Corinna,
> >Did you *read* the aforementioned URL?  It explains that a non-admin
> >needs cygserver to run passwd -R.  As an admin you can enter the
> >password for other users, if you know it.  See additionally
> >http://cygwin.com/cygwin-ug-net/using-utils.html#passwd
> Of yourse I did :-), and I clicked on "Run as adminstrator" for the
> Cygwin shell (otherwise the error message was different: Storing
> password failed: bad file descriptor)

Aaa!

This is my fault.  I broke this functionality in Cygwin 1.7.28-2,
because I changed a conditional expression the wrong way.



Sorry about that.  I applied a fix to CVS.  For the time being, you
need to use either Cygwin 1.7.27, or wait for the snapshot I'm going
to upload in the next half hour or so: http://cygwin.com/snapshots/


Corinna

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


pgpN2PAq58hmk.pgp
Description: PGP signature


Re: Error encountered using GStreamer on Visual Studio

2014-02-18 Thread Larry Hall (Cygwin)

On 2/18/2014 1:13 AM, Mirza wrote:

While running GStreamer1.0 basic tutorial on Visual Studio 2008 Express
Edition, in debugging mode following error is encountered:
Error: Link 1104:'libmoldname.a' missing

I have updated libraries to rectify it but it is not working.
Please suggest some approach to correct this error.


If you're confused by or otherwise having problems with the information
you've found in a tutorial, you should contact the authors about this.
We can't really help you with this content since it is not supported by
this list.  I can say, however, that if you're working with VS 2008,
you're using libraries provided by the MinGW project (mingw.org).  You
may find some helpful information at this project's site as well.

--
Larry

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
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: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread J.H. vd Water
>> this week I applied the first incarnation of the new passwd/group
>> handling code to the Cygwin repository and after fixing a crash which
>> manifested in Denis Excoffier's network, I think we're at a point
>> which allows to push this forward.
>> [...]
>
>Ok guys, I just applied a patch implementing getpwent and getgrent,
>and the way to configure the output is probably more detailed than
>you ever wanted ...

Hi Corinna,

As I saw no response to your latest call for testers,  I decided to test it
myself ... (x86-XP, SP3).

 - setup "Cygwin" (base) in a different directory
 - applied tar ball (17/2 snapshot) as instructed at

   http://cygwin.com/faq-nochunks.html#faq.setup.snapshots

After I had set up /etc/nsswitch.conf as follows

db_enum: files

the output of getpwent and getgrent looked "familiar" to me. (though the
output of 'id' is not).

However, after I had modified /etc/nsswitch.conf as follows

db_enum: local

getpwent crashed (segment violation) ...

Henri


--
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: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread Corinna Vinschen
On Feb 18 18:16, J.H. vd Water wrote:
> >> this week I applied the first incarnation of the new passwd/group
> >> handling code to the Cygwin repository and after fixing a crash which
> >> manifested in Denis Excoffier's network, I think we're at a point
> >> which allows to push this forward.
> >> [...]
> >
> >Ok guys, I just applied a patch implementing getpwent and getgrent,
> >and the way to configure the output is probably more detailed than
> >you ever wanted ...
> 
> Hi Corinna,
> 
> As I saw no response to your latest call for testers,  I decided to test it
> myself ... (x86-XP, SP3).
> 
>  - setup "Cygwin" (base) in a different directory
>  - applied tar ball (17/2 snapshot) as instructed at
> 
>http://cygwin.com/faq-nochunks.html#faq.setup.snapshots
> 
> After I had set up /etc/nsswitch.conf as follows
> 
> db_enum: files
> 
> the output of getpwent and getgrent looked "familiar" to me. (though the
> output of 'id' is not).

In how far?  Did you read my text in terms of how user and group names
are created?  The leading separator char for builtin groups is an SFU
thingy.  If it's too disturbing we can discuss changing that, but right
now I'm still looking for some kind of similarity.

> However, after I had modified /etc/nsswitch.conf as follows
> 
> db_enum: local
> 
> getpwent crashed (segment violation) ...

Thanks for testing, but I can't reproduce this.  I tried on 32 bit
Windows 7 and 64 bit Windows 8.1.

How did you build getpwent?  Did you stop your Cygwin shell and restart
it?  Can you please send the getpwent.exe.stackdump file?


Thanks,
Corinna

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


pgpsASTZvqLPi.pgp
Description: PGP signature


Re: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread Corinna Vinschen
On Feb 18 18:48, Corinna Vinschen wrote:
> On Feb 18 18:16, J.H. vd Water wrote:
> > >> this week I applied the first incarnation of the new passwd/group
> > >> handling code to the Cygwin repository and after fixing a crash which
> > >> manifested in Denis Excoffier's network, I think we're at a point
> > >> which allows to push this forward.
> > >> [...]
> > >
> > >Ok guys, I just applied a patch implementing getpwent and getgrent,
> > >and the way to configure the output is probably more detailed than
> > >you ever wanted ...
> > 
> > Hi Corinna,
> > 
> > As I saw no response to your latest call for testers,  I decided to test it
> > myself ... (x86-XP, SP3).
> > 
> >  - setup "Cygwin" (base) in a different directory
> >  - applied tar ball (17/2 snapshot) as instructed at
> > 
> >http://cygwin.com/faq-nochunks.html#faq.setup.snapshots
> > 
> > After I had set up /etc/nsswitch.conf as follows
> > 
> > db_enum: files
> > 
> > the output of getpwent and getgrent looked "familiar" to me. (though the
> > output of 'id' is not).
> 
> In how far?  Did you read my text in terms of how user and group names
> are created?  The leading separator char for builtin groups is an SFU
> thingy.  If it's too disturbing we can discuss changing that, but right
> now I'm still looking for some kind of similarity.
> 
> > However, after I had modified /etc/nsswitch.conf as follows
> > 
> > db_enum: local
> > 
> > getpwent crashed (segment violation) ...
> 
> Thanks for testing, but I can't reproduce this.  I tried on 32 bit
> Windows 7 and 64 bit Windows 8.1.
> 
> How did you build getpwent?  Did you stop your Cygwin shell and restart
> it?  Can you please send the getpwent.exe.stackdump file?

And, is the machine a domain member machine or not?


Thanks,
Corinna

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


pgp_Mru7fDoR8.pgp
Description: PGP signature


Re: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread J.H. vd Water
Hi Corinna,

To answer some of your questions ...

>> How did you build getpwent?  Did you stop your Cygwin shell and restart
>> it?  Can you please send the getpwent.exe.stackdump file?

I used my "regular" setup of Cygwin to compile the sourcefile. Perhaps it is
there where I went wrong.

gcc -o getpwent -Wall -std=c99 -fno-builtin -pedantic getpwent.c

And, yes, I restarted my Cygwin shell.

>And, is the machine a domain member machine or not?

No, not a member of any domain ...

Henri

getpwent.exe.stackdump
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: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread J.H. vd Water
Hi Corinna,

>> After I had set up /etc/nsswitch.conf as follows
>>
>> db_enum: files
>>
>> the output of getpwent and getgrent looked "familiar" to me. (though the
>> output of 'id' is not).
>
>In how far?  Did you read my text in terms of how user and group names
>are created?  The leading separator char for builtin groups is an SFU

Read and understand your text completely? No.

>thingy.  If it's too disturbing we can discuss changing that, but right
>now I'm still looking for some kind of similarity.

What I meant was:

The output of 'id' in my "regular setup" shows:

@@# id
uid=1003(Henri) gid=513(None) 
groups=513(None),0(root),544(Administrators),545(Users)

The output of 'id' in the "test setup" shows:

$ id
uid=1003(Henri) gid=513(None) 
groups=513(None),0(root),545(Users),4(+INTERACTIVE),\
11(+AuthenticatedUsers),4095CurrentSession),66048(+LOCAL)

To me the second output is different - but perhaps it is not.

Henri




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



Need general snapshot testers

2014-02-18 Thread Christopher Faylor
We are contemplating releasing an interim 1.7.29 which does
not incorporate Corinna's revamping of Cygwin's uid/gid handling.

So, please check out snapshots, paying particular attention to the
non-passwd/group parts of this file:

http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/release/1.7.29?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=src

We'd like to release a 1.7.29 in the next couple of days so testing
feedback is appreciated.

cgf

--
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: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread Corinna Vinschen
On Feb 18 19:14, J.H. vd Water wrote:
> Hi Corinna,
> 
> To answer some of your questions ...
> 
> >> How did you build getpwent?  Did you stop your Cygwin shell and restart
> >> it?  Can you please send the getpwent.exe.stackdump file?
> 
> I used my "regular" setup of Cygwin to compile the sourcefile. Perhaps it is
> there where I went wrong.
> 
> gcc -o getpwent -Wall -std=c99 -fno-builtin -pedantic getpwent.c

No, that's unnecessarily detailed, but certainly not wrong.

> And, yes, I restarted my Cygwin shell.
> 
> >And, is the machine a domain member machine or not?
> 
> No, not a member of any domain ...

The crash looks weird.  It looks like your machine doesn't return
the machine sid when it's requested.  Can you please run the following
test application as non-admin and as admin and paster the output for
both cases into your reply?  Hmm, maybe that's a windows XP thingy?
I didn't test this stuff on anything prior to Vista.

 SNIP 
#include 
#include 
#include 
#include 

int
main ()
{
  static LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
  HANDLE lsa;
  NTSTATUS status;

  status = LsaOpenPolicy (NULL, &oa, POLICY_VIEW_LOCAL_INFORMATION, &lsa);
  if (status == STATUS_SUCCESS)
{
  PPOLICY_DNS_DOMAIN_INFO pdom;
  PPOLICY_ACCOUNT_DOMAIN_INFO adom;

  status = LsaQueryInformationPolicy (lsa, PolicyDnsDomainInformation,
  (PVOID *) &pdom);
  if (status == STATUS_SUCCESS)
{
  printf ("pdom name: <%ls> dnsname: <%ls>, sid: %p\n",
  pdom->Name.Buffer, pdom->DnsDomainName.Buffer, pdom->Sid);
  LsaFreeMemory (pdom);
}
  else
fprintf (stderr, "LsaQueryInformationPolicy(Primary) 0x%x", status);
  status = LsaQueryInformationPolicy (lsa, PolicyAccountDomainInformation,
(PVOID *) &adom);
  if (status == STATUS_SUCCESS)
{
  printf ("adom name: <%ls> sid: %p\n",
  adom->DomainName.Buffer, adom->DomainSid);
  LsaFreeMemory (adom);
}
  LsaClose (lsa);
}
  return 0;
}
 SNAP 


Thanks,
Corinna

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


pgpSpVM99Y239.pgp
Description: PGP signature


Re: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread Corinna Vinschen
On Feb 18 19:44, J.H. vd Water wrote:
> Hi Corinna,
> 
> >> After I had set up /etc/nsswitch.conf as follows
> >>
> >> db_enum: files
> >>
> >> the output of getpwent and getgrent looked "familiar" to me. (though the
> >> output of 'id' is not).
> >
> >In how far?  Did you read my text in terms of how user and group names
> >are created?  The leading separator char for builtin groups is an SFU
> 
> Read and understand your text completely? No.

Uh, well, I graciously allow to ask questions ;)

> >thingy.  If it's too disturbing we can discuss changing that, but right
> >now I'm still looking for some kind of similarity.
> 
> What I meant was:
> 
> The output of 'id' in my "regular setup" shows:
> 
> @@# id
> uid=1003(Henri) gid=513(None) 
> groups=513(None),0(root),544(Administrators),545(Users)
> 
> The output of 'id' in the "test setup" shows:
> 
> $ id
> uid=1003(Henri) gid=513(None) 
> groups=513(None),0(root),545(Users),4(+INTERACTIVE),\
> 11(+AuthenticatedUsers),4095CurrentSession),66048(+LOCAL)
> 
> To me the second output is different - but perhaps it is not.

It shows groups which are present in your user token, but which are
not in your /etc/group file.


Corinna

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


pgp_fudhppUIB.pgp
Description: PGP signature


Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
This will not work (verified!) for code run from under an unmanaged
Windows service account (NT_Service\...), once the machine changes its
password per security policy (the access then becomes anonymous and will
result in only first 100 entries returned):

winsup\cygwin\passwd.cc:
  else if (group)
ret = NetGroupEnum (NULL, 2, (PBYTE *) &buf, MAX_PREFERRED_LENGTH,
&max, &total, &resume);
  else
ret = NetUserEnum (NULL, 20, FILTER_NORMAL_ACCOUNT, (PBYTE *) &buf,
   MAX_PREFERRED_LENGTH, &max, &total,
   (PDWORD) &resume);

This is what I was trying to point out, in my earlier message...

Anton Lavrentiev
Contractor NIH/NLM/NCBI

P.S.  This behavior is obscurely documented in here:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa370610(v=vs.85).aspx
(by the virtue of that page is pointed to from NetUserEnum and NetGroupEnum:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa370652(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa370428(v=vs.85).aspx)


The number of entries returned by this function depends on the security 
descriptor located on the root domain object. The API will return either the 
first 100 entries or the entire set of entries in the domain, depending on the 
access privileges of the user. The ACE used to control this behavior is 
"SAM-Enumerate-Entire-Domain", and is granted to Authenticated Users by 
default. Administrators can modify this setting to allow users to enumerate the 
entire domain.


The bad thing is that there is error indication at reaching the 100,
so it just looks like your environment has suddenly reduced to exactly 100
users...


--
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: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread Corinna Vinschen
On Feb 18 19:18, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> This will not work (verified!) for code run from under an unmanaged
> Windows service account (NT_Service\...), once the machine changes its
> password per security policy (the access then becomes anonymous and will
> result in only first 100 entries returned):
> 
> winsup\cygwin\passwd.cc:
> else if (group)
>   ret = NetGroupEnum (NULL, 2, (PBYTE *) &buf, MAX_PREFERRED_LENGTH,
>   &max, &total, &resume);
> else
>   ret = NetUserEnum (NULL, 20, FILTER_NORMAL_ACCOUNT, (PBYTE *) &buf,
>  MAX_PREFERRED_LENGTH, &max, &total,
>  (PDWORD) &resume);
> 
> This is what I was trying to point out, in my earlier message...

These functions are not called for domain accounts, only for local
accounts.


Corinna

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


pgp65ncuVeiHk.pgp
Description: PGP signature


RE: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> These functions are not called for domain accounts, only for local
> accounts.

Okay then..

Anton Lavrentiev
Contractor NIH/NLM/NCBI


Re: Testers needed: New passwd/group handling in Cygwin

2014-02-18 Thread J.H. vd Water
Hi Corinna,

>The crash looks weird.  It looks like your machine doesn't return
>the machine sid when it's requested.  Can you please run the following
>test application as non-admin and as admin and paster the output for
>both cases into your reply?  Hmm, maybe that's a windows XP thingy?
>I didn't test this stuff on anything prior to Vista.

Both cases show the same output:

$ ./lsa
pdom name:  dnsname: <(null)>, sid: 0x0
adom name:  sid: 0x246058

Perhaps, it is best to stop here for the moment ... There must be more pressing
things on your list.

Moreover, I already decided to use 'db_enum: files' in /etc/nssswitch.conf (and
XP is a thing of the past, is it not?).

Anyhow, thank you for listening and for your effort.

Henri


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