Re: [ANNOUNCEMENT] Updated: perl-5.22.1-2

2016-03-09 Thread Achim Gratz
Tony Cook writes:
> Does this refer to the CVE-2015-8607 and CVE-2016-2381 fixes?

Yes.

> The second is a bit more complex than losing taint.

I was trying to not overcomplicate things, maybe unsuccessfully.


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

DIY Stuff:
http://Synth.Stromeko.net/DIY.html

--
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: Problems with Qt5's QDesktopServices::openUrl()

2016-03-09 Thread Yaakov Selkowitz

On 2016-03-05 09:02, Dr Rainer Woitok wrote:

currently I have two applications  which I compiled myself under Cygwin:
GPSBabel and QMapShack.   Both use Qt5, both provide online help via the
browser,  and both fail doing so  in my environment.   The version of my
various Qt5 packages is 5.5.1-1.

[snip]

So I assume QDesktopServices::openUrl()  at least under Cygwin is having
a problem with  blanks in  path names  and maybe  also with  the missing
".exe" extension (see the "Launch failed" error message).


Searching for "QDesktopServices::openUrl spaces in PATH" (without the 
quotes) turned up a lot of hits.


--
Yaakov

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



[ANNOUNCEMENT] perl-Font-TTF 1.05-1

2016-03-09 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* perl-Font-TTF-1.05-1

Perl module for TrueType font hacking. In short, you can do almost 
anything with a standard TrueType font with this module.

This package has been added (from Ports) as a build-time dependency of 
dejavu-fonts.

--
Yaakov

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



[ANNOUNCEMENT] unicode-ucd 8.0.0-1

2016-03-09 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* unicode-ucd-8.0.0-1

The Unicode Character Database (UCD) consists of a number of data files 
listing Unicode character properties and related data. It also includes 
data files containing test data for conformance to several important 
Unicode algorithms.

This is an update (from Ports) to the latest upstream release.

--
Yaakov

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



[ANNOUNCEMENT] fontconfig 2.11.94-1

2016-03-09 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* fontconfig-2.11.94-1
* fontconfig-doc-2.11.94-1
* libfontconfig1-2.11.94-1
* libfontconfig-common-2.11.94-1
* libfontconfig-devel-2.11.94-1
* mingw64-i686-fontconfig-2.11.94-1
* mingw64-x86_64-fontconfig-2.11.94-1
* dejavu-fonts-2.35-2

Fontconfig is a library designed to provide system-wide font configuration, 
customization and application access.

This is an update to the latest upstream release with the following 
packaging changes:

* A perpetual postinstall script is now included for managing the fontconfig 
cache; future releases of font packages will not need their own postinstall 
scripts, thereby removing the circular dependency on fontconfig.  As a result,
the 'fontconfig' package itself will only be required for running the 
fc-* commands manually.

* dejavu-fonts is pulled in as a default font so that client applications 
run properly when no specific font is otherwise required.

--
Yaakov

--
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: [ANNOUNCEMENT] Updated: openssl-1.0.2g-3

2016-03-09 Thread Stephen John Smoogen
On 9 March 2016 at 15:53, Erik Soderquist  wrote:
> On Wed, Mar 9, 2016 at 5:18 PM, Corinna Vinschen wrote:
>> On Mar  9 16:54, Erik Soderquist wrote:
> 
>>> If I knew how, I would...
>>
>> https://cygwin.com/setup.html
>>
>> A couple of months ago I made sure that portable LibreSSL from
>> https://github.com/libressl-portable/portable.git at least doesn't
>> forget to support Cygwin, should we ever intend to switch.  I don't
>> expect any (serious) bit-rot so far.
>
> I meant that I'm not a programmer at all; I've only written scripts
> before, and am just barely started studying my first programming
> language.
>
> If actually knowing the language isn't needed, I can certainly try,
> but if knowing the language the package is written in is required, I'm
> currently woefully under qualified to take up the mantle
>

It isn't really usable unless you are a programmer because it isn't a
fall in replacement for openssl. [It may work but mostly needs
recompiles and a lot of programming fixes to get it to work with other
things.] I would say that if you aren't in that camp.. you don't
really need it at the moment.

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



-- 
Stephen J Smoogen.

--
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: [ANNOUNCEMENT] Updated: perl-5.22.1-2

2016-03-09 Thread Tony Cook
On Wed, Mar 09, 2016 at 11:46:39PM +0100, Achim Gratz wrote:
> 
> A new release of Perl version 5.22.1 is available, which fixes two cases
> of losing taint.  Immediate update is recommended if either the
> environment or the input to any Perl program can be controlled by an
> untrusted party.

Does this refer to the CVE-2015-8607 and CVE-2016-2381 fixes?

The second is a bit more complex than losing taint.

Tony

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



[ANNOUNCEMENT] Updated: perl-5.22.1-2

2016-03-09 Thread Achim Gratz

A new release of Perl version 5.22.1 is available, which fixes two cases
of losing taint.  Immediate update is recommended if either the
environment or the input to any Perl program can be controlled by an
untrusted party.

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

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

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

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

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

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

--
Problem reports:   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: [ANNOUNCEMENT] Updated: openssl-1.0.2g-3

2016-03-09 Thread Erik Soderquist
On Wed, Mar 9, 2016 at 5:18 PM, Corinna Vinschen wrote:
> On Mar  9 16:54, Erik Soderquist wrote:

>> If I knew how, I would...
>
> https://cygwin.com/setup.html
>
> A couple of months ago I made sure that portable LibreSSL from
> https://github.com/libressl-portable/portable.git at least doesn't
> forget to support Cygwin, should we ever intend to switch.  I don't
> expect any (serious) bit-rot so far.

I meant that I'm not a programmer at all; I've only written scripts
before, and am just barely started studying my first programming
language.

If actually knowing the language isn't needed, I can certainly try,
but if knowing the language the package is written in is required, I'm
currently woefully under qualified to take up the mantle

-- Erik

--
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: [ANNOUNCEMENT] Updated: openssl-1.0.2g-3

2016-03-09 Thread Corinna Vinschen
On Mar  9 16:54, Erik Soderquist wrote:
> On Wed, Mar 9, 2016 at 4:49 PM, Andrey Repin wrote:
> > Greetings, Erik Soderquist!
> >
> >> Any chance of LibreSSL being added as an available option?
> >
> > If you pick up the maintainer's hat…
> 
> If I knew how, I would...

https://cygwin.com/setup.html

A couple of months ago I made sure that portable LibreSSL from
https://github.com/libressl-portable/portable.git at least doesn't
forget to support Cygwin, should we ever intend to switch.  I don't
expect any (serious) bit-rot so far.


Corinna

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


signature.asc
Description: PGP signature


Re: RFC2307 accounts

2016-03-09 Thread Andrey Repin
Greetings, Marc Rechte!

> OK, I noticed that. Now it brings me a problem using rsync on cygwin.

> On cygwin:
> $ cat /etc/rsyncd.conf
> [test]
>  path = /cygdrive/c/tmp
>  comment = zone de test
>  fake super = yes
>  read only = no

> On the Linux box:
> # ls -l /home/tunix/
> ...
> drwxr-xr-x  3 tunix root 4096  9 mars  12:23 resto_win
> -rw-rw-r--+ 1 tunix utilisateurs_du_domaine 82882  9 mars  10:56 tmp.ps

> #  rsync -avz --acls --delete /home rsync://192.168.0.23/test
> ..
> # rsync -avz --acls --delete rsync://192.168.0.23/test/home/tunix resto_win/
> ...
> # ls -l /home/tunix/resto_win/tunix/
> ...
> drwx-- 2 1050005 1049089  4096  9 mars  12:14 resto_win
> -rw--- 1 1050005 1049089 82882  9 mars  10:56 tmp.ps

> You will notice that owner, group and ACLs  are *not* restored properly

> Am I demanding too much to cygwin ?

No, you're demanding too much of rsync, which wasn't built with sane
permission system in mind.
Use SSH or direct (cifs) copying. Then the names will match.
Your problem is that you expect Cygwin to be *NIX, but in fact, it isn't. It
is a Windows application, and it follows Windows permission model. (Which,
IMO, is saner, than POSIX one.)


-- 
With best regards,
Andrey Repin
Thursday, March 10, 2016 00:58:07

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: Question about tar v1.28

2016-03-09 Thread Andrey Repin
Greetings, Douglas Coup!

>> On 03/08/2016 08:43 AM, Douglas Coup wrote:
>>> Hello Cygwin community. 
>>> 
>>> I'm observing some unusual behavior with tar v1.28, running as part of 
>
>>> 32-bit Cygwin on a Windows 10 machine. 
>
>
>> I noticed this in your cygcheck output: > cygdrive prefix /cygdrive system 
>> text,noacl,posix=0,auto
>
>> Why are you text-mounting it?  Is your current working directorysomewhere
>> under that text mount?  It may be a bug in tar's handling of
>> text-mounted files (ideally, tar should be reopening everything binary
>
>> in spite of text mounts, but I may have missed a spot).

> Text mounting is our standard here.  I will try to find out why.

Text mounting is VERY, VERY, VERY bad idea.
Never do that again.

> I changed the /etc/fstab so it specifies "binary" instead of "text", and
> with that change, the problem doesn't occur.  However, the problem doesn't
> occur with "text" specified on two other systems that use tar v1.27, one
> running Windows 8.1 and the other running Windows 7.  In fact I had used the
> "tar" command previously on this Windows 10 system with "text" in place
> without problems.  I've done other Cygwin installs since then, so probably
> either the "tar" command itself got updated or something it depends on got
> updated, such that now this issue occurs.

The problem with text mounts is that you can never know, how a given program
would handle it. It may even not in the program's hands, as certain libraries
behind it may have their own second or even third opinion on the subject.
And when you tell the program to read N bytes, you never know, if it will stop
after reading N, or M, or N+M...


-- 
With best regards,
Andrey Repin
Thursday, March 10, 2016 00:51:33

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: [ANNOUNCEMENT] Updated: openssl-1.0.2g-3

2016-03-09 Thread Erik Soderquist
On Wed, Mar 9, 2016 at 4:49 PM, Andrey Repin wrote:
> Greetings, Erik Soderquist!
>
>> Any chance of LibreSSL being added as an available option?
>
> If you pick up the maintainer's hat…

If I knew how, I would...

-- Erik

--
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: [ANNOUNCEMENT] Updated: openssl-1.0.2g-3

2016-03-09 Thread Andrey Repin
Greetings, Erik Soderquist!

> Any chance of LibreSSL being added as an available option?

If you pick up the maintainer's hat…


-- 
With best regards,
Andrey Repin
Thursday, March 10, 2016 00:48:38

Sorry for my terrible english...

Re: git svn -T svn://svn. ...

2016-03-09 Thread Adam Dinwoodie
On Wed, Mar 09, 2016 at 07:46:06PM +, Adam Dinwoodie wrote:
> On Tue, Mar 08, 2016 at 01:32:30PM -0500, cyg Simple wrote:
> > Using the latest production release 2.4.1(1) the command is removing the
> > / after the svn: leaving svn:/svn which isn't correct.  Using
> > 'svn://svn' doesn't help either.
> > 
> > (2) $ git svn init -T 'svn://svn.code.sf.net/p/squirrelmail/code/trunk'
> > E: 'svn:/svn.code.sf.net/p/squirrelmail/code/trunk' is not a complete
> > URL  and a separate URL is not specified
> 
> I'm seeing the same behaviour on local builds of both v2.7.0 and v2.2.0,
> and when using http:// URIs as well as svn:// ones.  Very sad.
> 
> It's not immediately obvious what's going wrong here, and I don't
> currently have much spare time for digging, but I'll add it to my queue
> to investigate the problem / report it upstream to see if anyone else
> has any cunning ideas.

I've found a work-around.  I'm surprised it works, but it evidently
does, so...

If you do the `git svn init` without the `-T` argument, then set up the
branches to fetch explicitly using `git config`, everything seems to
work fine:

$ git svn init svn://svn.code.sf.net/p/squirrelmail/code
Initialized empty Git repository in /home/add/tmp/.git/

$ git config svn-remote.svn.fetch trunk:refs/remotes/origin/trunk

$ git svn fetch
r1 = 12dc820c417dc5f12723307a3fcfa4629ea972fb (refs/remotes/origin/trunk)
A   squirrelmail/ATHORS
A   squirrelmail/login.php3
A   squirrelmail/signout.php3
...

HTH

--
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: [ANNOUNCEMENT] Updated: texinfo-6.1-2

2016-03-09 Thread Mikhail Usenko
On Fri, 4 Mar 2016 17:58:02 -0500
Ken Brown <...> wrote:

> The following packages have been updated in the Cygwin distribution:
> 
> * texinfo-6.1-2
> * info-6.1-2
> * texinfo-tex-6.1-2
> 

Thanks a lot, Ken.

-- 
Mike

--
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: git svn -T svn://svn. ...

2016-03-09 Thread Adam Dinwoodie
On Tue, Mar 08, 2016 at 01:32:30PM -0500, cyg Simple wrote:
> Using the latest production release 2.4.1(1) the command is removing the
> / after the svn: leaving svn:/svn which isn't correct.  Using
> 'svn://svn' doesn't help either.
> 
> (2) $ git svn init -T 'svn://svn.code.sf.net/p/squirrelmail/code/trunk'
> E: 'svn:/svn.code.sf.net/p/squirrelmail/code/trunk' is not a complete
> URL  and a separate URL is not specified

I'm seeing the same behaviour on local builds of both v2.7.0 and v2.2.0,
and when using http:// URIs as well as svn:// ones.  Very sad.

It's not immediately obvious what's going wrong here, and I don't
currently have much spare time for digging, but I'll add it to my queue
to investigate the problem / report it upstream to see if anyone else
has any cunning ideas.

Adam

--
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: [ANNOUNCEMENT] Updated: openssl-1.0.2g-3

2016-03-09 Thread Erik Soderquist
On Tue, Mar 8, 2016 at 12:46 PM, Corinna Vinschen wrote:

>> > I've updated the version of OpenSSL to 1.0.2g-3.


Any chance of LibreSSL being added as an available option?

-- Erik

--
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: RFC2307 accounts

2016-03-09 Thread Marc Rechte



Le 09/03/2016 16:58, Corinna Vinschen a écrit :

On Mar  9 12:50, Marc Rechte wrote:

Le 09/03/2016 12:27, Corinna Vinschen a écrit :

Keep in mind that we have two mappings.  The main mapping is the mapping
between Windows SID and a computed uid/gid value used in Cygwin which
allows fast mapping in both directions.  A computed value drops the
requirement to access an LDAP server for the mapping, which is
especially bad when not using AD as mapping server.

Please read https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nfs
and https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-samba
again.  The RFC 2307 mapping only comes into play when reading meta
information from an NFS or Samba share.  The unix uid/gid values have to
be mapped to a Windows user (better: SID) in the first place, not to the
Cygwin uid/gid values.  The actual uid/gid values are irrelevant.  Worse,
using the RFC 2307 values might collide with other, computed uid/gid
values.


Corinna


OK, I noticed that. Now it brings me a problem using rsync on cygwin.

On cygwin:
$ cat /etc/rsyncd.conf
[test]
 path = /cygdrive/c/tmp
 comment = zone de test
 fake super = yes
 read only = no

On the Linux box:
# ls -l /home/tunix/
...
drwxr-xr-x  3 tunix root 4096  9 mars  12:23 resto_win
-rw-rw-r--+ 1 tunix utilisateurs_du_domaine 82882  9 mars  10:56 tmp.ps

#  rsync -avz --acls --delete /home rsync://192.168.0.23/test
..
# rsync -avz --acls --delete rsync://192.168.0.23/test/home/tunix resto_win/
...
# ls -l /home/tunix/resto_win/tunix/
...
drwx-- 2 1050005 1049089  4096  9 mars  12:14 resto_win
-rw--- 1 1050005 1049089 82882  9 mars  10:56 tmp.ps

That's an ls -ln, right?  The AD user and group names should have been
resolved.
No "ls -l", this is on the Linux box after restoration. uid/gid are the 
ones assigned in cygwin and become irrelevant here.



You will notice that owner, group and ACLs  are *not* restored properly

Am I demanding too much to cygwin ?

Off the top of my head, yes.  The rfc2307 uid/gid mapping only works
when accessing the filesystem directly from Cygwin.  By using rsync, the
info is transmitted over the net.


Corinna






smime.p7s
Description: Signature cryptographique S/MIME


Re: [ANNOUNCEMENT] Updated: coreutils-8.25-1

2016-03-09 Thread Eric Blake
On 03/08/2016 05:02 PM, Eric Blake (cygwin) wrote:
> A new release of coreutils, 8.25-1, has been uploaded, and will be
> available soon from your favorite mirror.  This leaves 8.24-3 as the
> previous version.

> 
> I'm also planning to build an experimental coreutils-8.25-2 against the
> experimental cygwin 2.5 with its new ACL handling, for those that would
> like to test that it won't introduce regressions.

Now available.  Please give it a spin, and report any problems you
encounter, so that we can fix coreutils and/or cygwin prior to promoting
this experimental work to current.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: RFC2307 accounts

2016-03-09 Thread Corinna Vinschen
On Mar  9 12:50, Marc Rechte wrote:
> Le 09/03/2016 12:27, Corinna Vinschen a écrit :
> >Keep in mind that we have two mappings.  The main mapping is the mapping
> >between Windows SID and a computed uid/gid value used in Cygwin which
> >allows fast mapping in both directions.  A computed value drops the
> >requirement to access an LDAP server for the mapping, which is
> >especially bad when not using AD as mapping server.
> >
> >Please read https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nfs
> >and https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-samba
> >again.  The RFC 2307 mapping only comes into play when reading meta
> >information from an NFS or Samba share.  The unix uid/gid values have to
> >be mapped to a Windows user (better: SID) in the first place, not to the
> >Cygwin uid/gid values.  The actual uid/gid values are irrelevant.  Worse,
> >using the RFC 2307 values might collide with other, computed uid/gid
> >values.
> >
> >
> >Corinna
> >
> 
> OK, I noticed that. Now it brings me a problem using rsync on cygwin.
> 
> On cygwin:
> $ cat /etc/rsyncd.conf
> [test]
> path = /cygdrive/c/tmp
> comment = zone de test
> fake super = yes
> read only = no
> 
> On the Linux box:
> # ls -l /home/tunix/
> ...
> drwxr-xr-x  3 tunix root 4096  9 mars  12:23 resto_win
> -rw-rw-r--+ 1 tunix utilisateurs_du_domaine 82882  9 mars  10:56 tmp.ps
> 
> #  rsync -avz --acls --delete /home rsync://192.168.0.23/test
> ..
> # rsync -avz --acls --delete rsync://192.168.0.23/test/home/tunix resto_win/
> ...
> # ls -l /home/tunix/resto_win/tunix/
> ...
> drwx-- 2 1050005 1049089  4096  9 mars  12:14 resto_win
> -rw--- 1 1050005 1049089 82882  9 mars  10:56 tmp.ps

That's an ls -ln, right?  The AD user and group names should have been
resolved.

> You will notice that owner, group and ACLs  are *not* restored properly
> 
> Am I demanding too much to cygwin ?

Off the top of my head, yes.  The rfc2307 uid/gid mapping only works
when accessing the filesystem directly from Cygwin.  By using rsync, the
info is transmitted over the net.


Corinna

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


signature.asc
Description: PGP signature


Re: /bin/bash: Operation not permitted

2016-03-09 Thread Marco Atzeri

On 09/03/2016 16:25, Achim Gratz wrote:

Francis Korning  yahoo.ca> writes:

Specifically, ssh-host-config needs these following lines:


The cyg_server account is actually set up in
/usr/share/csih/cygwin-service-installation-helper.sh and guess what, it
already does this.  It also warns if a pre-existing account does not have
these privileges enabled.


Regards,
Achim.



It is correct Achim,
however I have seen in corporate environment that some of those
setting were removed by security scripts...at every boot.
Very annoying


Regards
Marco






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



Re: /bin/bash: Operation not permitted

2016-03-09 Thread Achim Gratz
Francis Korning  yahoo.ca> writes:
> Specifically, ssh-host-config needs these following lines:

The cyg_server account is actually set up in
/usr/share/csih/cygwin-service-installation-helper.sh and guess what, it
already does this.  It also warns if a pre-existing account does not have
these privileges enabled.


Regards,
Achim.


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



[ANNOUNCEMENT] Updated: mksh-52c-1

2016-03-09 Thread Chris Sutcliffe
Version 52c-1 of "mksh" has been uploaded.

MirBSD Korn Shell, an actively developed free implementation of the
Korn Shell programming language and a successor to the Public Domain
Korn Shell.

ChangeLog:
[tg] Shave 200 bytes off .text by revisiting string pooling
[tg, Jorg] Fix manpage for ditroff on Schillix
[tg, wbx] Use sed 1q instead of unportable head(1)
[tg] Implement underrun debugging tool for area-based memory allocator
[tg] Fix history underrun when first interactive command is entered
[tg, bef0rd] Do not misinterpret “${0/}” as “${0//”, fixes segfault
[tg, Stéphane Chazelas] Fix display problems with special parameters
[tg, Stéphane Chazelas] Catch attempt to trim $* and $@ with ?, fixes
segfault (Todd Miller did this in 2004 for ${x[*]} already, so just
sync)
[Martijn Dekker] Fix “command -p” with -Vv to behave as POSIX requires
[tg, jilles, Oleg Bulatov] Fix recusive parser with active heredocs
[tg] Flush even syntax-failing or interrupted commands to history
[tg, fmunozs] Fix invalid memory access for “'\0'” in arithmetics
[tg] Explicitly reserve SIGEXIT and SIGERR for ksh
[tg, izabera] Catch missing here documents at EOF even under “set -n”
[kre, tg] Document Austin#1015 handling (not considered a violation)
[tg, fmunozs] Fix buffer overread for empty nameref targets
[tg] Fix warnings pointed out by latest Debian gcc-snapshot
[tg, Martijn Dekker] Document upcoming set +o changes
[Martijn Dekker] Expand testsuite for command/whence

  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

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

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

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

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

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

-- 
Chris Sutcliffe

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



/bin/bash: Operation not permitted

2016-03-09 Thread Francis Korning
Apologies for spamming but I think this fix needs to be automated in
ssh-host-config and updated in the cygwin FAQ.
Like many users I've been struggling with this obscure bug that allows one 
to log on with ssh only as the priviledged user (cyg_server in my case).
Attempts under another user succeed in all modes of authentication (password, 
RSA, DSA, whatever), but then get disconnected with the esoteric line:

/bin/bash: Operation not permitted

It turns out this has nothing to with bash, but rather with the usser 
cyg_server needing specific NTSEC rights to allow logons as other users.

The fix was found here:

http://www.tux.org/~mayer/cygwin/cygwin_sshd.pdf


Specifically, ssh-host-config needs these following lines:
editrights -a SeAssignPrimaryTokenPrivilege -u cyg_server
editrights -a SeCreateTokenPrivilege -u cyg_server
editrights -a SeTcbPrivilege -u cyg_server
editrights -a SeServiceLogonRight -u cyg_server


#editrights -l -u cyg_server



Francis Korning de Grandpre
enterprise software architect
fkorning at yahoo dot ca

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



[ANNOUNCEMENT] biber 2.4-1

2016-03-09 Thread Ken Brown

The following package has been uploaded to the Cygwin distribution:

* biber-2.4-1

Biber is a BibTeX replacement for users of BibLaTeX.  Biber supports 
full UTF-8, can (re-)encode input and output, supports highly 
configurable sorting, dynamic bibliography sets, and many other features.


This is an update to the latest upstream release.  See 
/usr/share/doc/biber/CHANGES for a list of changes.


Ken Brown
Cygwin's Biber maintainer

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



[ANNOUNCEMENT] texlive-collection-bibtexextra 20160309-1

2016-03-09 Thread Ken Brown

The following packages have been uploaded to the Cygwin distribution:

* texlive-collection-bibtexextra-20160309-1
* texlive-collection-bibtexextra-doc-20160309-1

This is an update to the latest upstream release.  It includes
biblatex-3.3, which is needed for biber-2.4.

Ken Brown
Cygwin's TeX Live maintainer

--
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: RFC2307 accounts

2016-03-09 Thread Marc Rechte

Le 09/03/2016 12:27, Corinna Vinschen a écrit :

On Mar  9 11:42, Marc Rechte wrote:

Le 09/03/2016 10:14, Mark Geisert a écrit :

Marc Rechte wrote:

Hello,

   Trying to set RFC2307 accounts, using unix schema in
/etc/nsswitch.conf.

[...]

Your original post of this material was answered about 30 minutes after
your post.  Kindly follow up there...

https://cygwin.com/ml/cygwin/2016-03/msg00076.html

Sorry, I did not get that answer emailed to me (some confusion during the
subscription).

I am not clear with answer given by Corinna.

The idea behind RFC2307, imho is to have a consistent UID/GID between
systems which have joined a domain. This is what we achieved in our domain,
where a user login into whatever Linux box, gets the same uid/gid. One would
expect the same behaviour in cygwin (on a joined machine), wouldn't he ?

That's not the idea behind the uid/gid mapping.  You might have noticed
that "unix" is not used as a keyword in the passwd and group settings
in /etc/nsswitch.conf, only in the db_home, db_shell, and db_gecos settings.

Keep in mind that we have two mappings.  The main mapping is the mapping
between Windows SID and a computed uid/gid value used in Cygwin which
allows fast mapping in both directions.  A computed value drops the
requirement to access an LDAP server for the mapping, which is
especially bad when not using AD as mapping server.

Please read https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nfs
and https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-samba
again.  The RFC 2307 mapping only comes into play when reading meta
information from an NFS or Samba share.  The unix uid/gid values have to
be mapped to a Windows user (better: SID) in the first place, not to the
Cygwin uid/gid values.  The actual uid/gid values are irrelevant.  Worse,
using the RFC 2307 values might collide with other, computed uid/gid
values.


Corinna



OK, I noticed that. Now it brings me a problem using rsync on cygwin.

On cygwin:
$ cat /etc/rsyncd.conf
[test]
path = /cygdrive/c/tmp
comment = zone de test
fake super = yes
read only = no

On the Linux box:
# ls -l /home/tunix/
...
drwxr-xr-x  3 tunix root 4096  9 mars  12:23 resto_win
-rw-rw-r--+ 1 tunix utilisateurs_du_domaine 82882  9 mars  10:56 tmp.ps

#  rsync -avz --acls --delete /home rsync://192.168.0.23/test
..
# rsync -avz --acls --delete rsync://192.168.0.23/test/home/tunix resto_win/
...
# ls -l /home/tunix/resto_win/tunix/
...
drwx-- 2 1050005 1049089  4096  9 mars  12:14 resto_win
-rw--- 1 1050005 1049089 82882  9 mars  10:56 tmp.ps

You will notice that owner, group and ACLs  are *not* restored properly

Am I demanding too much to cygwin ?

Thanks for your time.

Marc



smime.p7s
Description: Signature cryptographique S/MIME


Re: Semaphore Lock Failed Error

2016-03-09 Thread Meenakshi Pant
Hi,

I created cygserver.conf file by executing the script
'cygserver-config'. The cygserver is running.
>From the installation folder (c:\cygwin)  the cygcheck output is
showing the status 'ok' for all the packages.
For my application i have to copy the cygwin folders (bin, etc...) to
another directory along with my programs.
>From my work area folder the cygcheck output is shown as incomplete
for many packages.
Attached here are the cgycheck outputs from my installation and work areas.

Thanks,
Meenakshi

On Wed, Mar 9, 2016 at 2:08 PM, Meenakshi Pant
 wrote:
> Our program is failing in creating and acquiring lock on the
> semaphore. Created a test program 'semtest.c'. It is creating the
> semaphore using the program semaphore.c. Compiled and executed using
> the latest CYGWIN- 2.4.1. It is failing at line
>
> if  ((semval = semctl(*id, 1, GETVAL, semctl_arg)) < 0 )
>
> with error no 22.
>
> Code for semtest.c and semaphore.c are as given below
>
> *
> /* semtest.c */
>
> #define PROG_NAME "SEMTEST"
> #define TITLE "SEMTEST Semaphore Test Stub - Version 0.1 (10-Dec-1992)"
> #define USAGE "Usage: semtest c|o"
>
> #ifndef lint
> static char *sccs_id="$Id: semtest.c,v 7.0 2000/08/24 15:59:12 growe Exp $";
> #endif
>
> #include 
> #include 
> #include 
>
> #ifndef LOCAL_INC
> #include 
> #include 
> #include 
>
> #else
> #include 
> #include 
> #include 
> #endif
>
> static int sem = SEM_NULL;
> static key_t key = 0x123d4a;
>
> int main(int argc, char *argv[])
> {
> printf("\n%s\n", TITLE);
> printf("\n%s\n", USAGE);
> if (argc != 2)
> {
> printf("\n%s\n", USAGE);
> exit(EXIT_FAILURE);
> }
>
>
> switch (argv[1][0])
> {
> case 'c':
> if (SemCreate(&sem, key, SEM_BINARY) EQ FAIL)
> goto ErrExit;
> printf("Semaphore Created key: 0x%xsem: %d\n", key, sem);
> break;
>
> case 'o':
> if (SemOpen(&sem, key) EQ FAIL)
> goto ErrExit;
> printf("Semaphore Opened key: 0x%xsem: %d\n", key, sem);
> break;
>
> default:
> printf("\n%s\n", USAGE);
> exit(EXIT_FAILURE);
>
> }
>
>
> printf("About to Wait/lock on semaphore\n");
> if (SemWait(sem) EQ FAIL)
> goto ErrExit;
>
> printf("semaphore locked\n");
>
> printf("Press [RETURN] to continue and unlock semaphore\n");
> (void) getchar();
>
> printf("About to Signal/unlock on semaphore\n");
> if (SemSignal(sem) EQ FAIL)
> goto ErrExit;
> printf("semaphore unlocked\n");
>
>
> printf("About to Close on semaphore\n");
> if (SemClose(sem) EQ FAIL)
> goto ErrExit;
> sem = SEM_NULL;
>
> printf("semaphore closed\n");
>
> (void)MsgClose(mhDefault);
> printf("Program Terminated Successfully\n");
> exit(EXIT_SUCCESS);
> return(SUCCESS);
>
> ErrExit:
> (void) EsTraceBack();
> (void)MsgClose(mhDefault);
> printf("Program Terminated with error\n");
> exit(EXIT_FAILURE);
> return(FAIL);
> }
>
>
>
>
> **
> Semaphore.c
>
>  /* semaphore.c
>  * Description:Provides a simpler and safer interface to the UNIX
>  *  System V Release 4 semaphores. Seven functions are
>  *  provided.
>  *
>  *  1.  id = SemCreate(key, value);
>  *  2.  id = SemOpen(key);
>  *  3.  SemWait(id);
>  *  4.  SemSignal(id);
>  *  5.  SemOp(id, amount);
>  *  6.  SemClose(id);
>  *  7.  SemRm(id);
>
>  *
>  * Portability Issues: This implementation requires System V semaphore
>  *  facility.
>  *
>  * Edit History:
>  *
>  *
>  */
>
> #ifndef lint
> static char *sccs_id="$Id: semaphore.c,v 7.2 2001/03/26 10:54:28 asealy Exp 
> $";
> #endif
>
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> extern int errno;
>
> #define SEM_
> #include 
> #include 
> #include 
> #include 
> #include 
> #include  /* General UNIX messages */
> #include  /* General UNIX messages */
>
> #define BIGCOUNT 1 /* Initial value of process counter */
>
> #if !SEMUN_DEFINED
> union semun {
>   int val;
>   struct semid_ds *buf;
>   ushort *array;
> } semctl_arg;
> #else
> union semun semctl_arg;
> #endif
>
> typedef struct sembuf SEMBUF;
>
> /* Prototypes for local functions */
>
> /*
>  * Define the semaphore operation arrays for the semop() calls.
>  */
>
> static SEMBUF op_lock[2] = {
> 2, 0, 0, /* wait for [2] (lock) to equal 0 */
> 2, 1, SEM_UNDO /* then incrrement [2] to 1 - this locks it */
> /* UNDO to release the lock it process exits
>   before explicitly unblocking */
> };
>
> static SEMBUF op_endcreate[2] = {
> 1, -1, SEM_UNDO,
> 2, -1, SEM_UNDO
> };
>
> static SEMBUF op_open[1] = {
> 1, -1, SEM_UNDO
> };
>
> static SEMBUF op_close[3] = {
> 2, 0, 0,
> 2, 1, SEM_UNDO,
> 1, 1, SEM_UNDO
> };
>
> static SEMBUF op_unlock[1] = {
> 2, -1, SEM_UNDO
> };
>
> static SEMBUF op_op[1] = {
> 0, 99, SEM_UNDO
> };
>
>
> /*

Re: RFC2307 accounts

2016-03-09 Thread Corinna Vinschen
On Mar  9 11:42, Marc Rechte wrote:
> Le 09/03/2016 10:14, Mark Geisert a écrit :
> >Marc Rechte wrote:
> >>Hello,
> >>
> >>   Trying to set RFC2307 accounts, using unix schema in
> >>/etc/nsswitch.conf.
> >[...]
> >
> >Your original post of this material was answered about 30 minutes after
> >your post.  Kindly follow up there...
> >
> >https://cygwin.com/ml/cygwin/2016-03/msg00076.html
> Sorry, I did not get that answer emailed to me (some confusion during the
> subscription).
> 
> I am not clear with answer given by Corinna.
> 
> The idea behind RFC2307, imho is to have a consistent UID/GID between
> systems which have joined a domain. This is what we achieved in our domain,
> where a user login into whatever Linux box, gets the same uid/gid. One would
> expect the same behaviour in cygwin (on a joined machine), wouldn't he ?

That's not the idea behind the uid/gid mapping.  You might have noticed
that "unix" is not used as a keyword in the passwd and group settings
in /etc/nsswitch.conf, only in the db_home, db_shell, and db_gecos settings.

Keep in mind that we have two mappings.  The main mapping is the mapping
between Windows SID and a computed uid/gid value used in Cygwin which
allows fast mapping in both directions.  A computed value drops the
requirement to access an LDAP server for the mapping, which is
especially bad when not using AD as mapping server.

Please read https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nfs
and https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-samba
again.  The RFC 2307 mapping only comes into play when reading meta
information from an NFS or Samba share.  The unix uid/gid values have to
be mapped to a Windows user (better: SID) in the first place, not to the
Cygwin uid/gid values.  The actual uid/gid values are irrelevant.  Worse,
using the RFC 2307 values might collide with other, computed uid/gid
values.


Corinna

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


signature.asc
Description: PGP signature


Re: RFC2307 accounts

2016-03-09 Thread Marc Rechte

Le 09/03/2016 10:14, Mark Geisert a écrit :

Marc Rechte wrote:

Hello,

   Trying to set RFC2307 accounts, using unix schema in 
/etc/nsswitch.conf.

[...]

Your original post of this material was answered about 30 minutes 
after your post.  Kindly follow up there...


https://cygwin.com/ml/cygwin/2016-03/msg00076.html
Sorry, I did not get that answer emailed to me (some confusion during 
the subscription).


I am not clear with answer given by Corinna.

The idea behind RFC2307, imho is to have a consistent UID/GID between 
systems which have joined a domain. This is what we achieved in our 
domain, where a user login into whatever Linux box, gets the same 
uid/gid. One would expect the same behaviour in cygwin (on a joined 
machine), wouldn't he ?


Thanks





smime.p7s
Description: Signature cryptographique S/MIME


Re: Semaphore Lock Failed Error

2016-03-09 Thread Achim Gratz
Meenakshi Pant writes:
> Our program is failing in creating and acquiring lock on the
> semaphore. Created a test program 'semtest.c'. It is creating the
> semaphore using the program semaphore.c. Compiled and executed using
> the latest CYGWIN- 2.4.1. It is failing at line
> 
> if  ((semval = semctl(*id, 1, GETVAL, semctl_arg)) < 0 )
> 
> with error no 22.
> 
> Code for semtest.c and semaphore.c are attached here.

That code doesn't even come close to being compilable, so it's useless as a
test case.

Since you didn't provide cygcheck output: Is cygserver running?


Regards,
Achim.


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



Re: RFC2307 accounts

2016-03-09 Thread Mark Geisert

Marc Rechte wrote:

Hello,

   Trying to set RFC2307 accounts, using unix schema in /etc/nsswitch.conf.

[...]

Your original post of this material was answered about 30 minutes after your 
post.  Kindly follow up there...


https://cygwin.com/ml/cygwin/2016-03/msg00076.html

--
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: Semaphore Lock Failed Error

2016-03-09 Thread Meenakshi Pant
Our program is failing in creating and acquiring lock on the
semaphore. Created a test program 'semtest.c'. It is creating the
semaphore using the program semaphore.c. Compiled and executed using
the latest CYGWIN- 2.4.1. It is failing at line

if  ((semval = semctl(*id, 1, GETVAL, semctl_arg)) < 0 )

with error no 22.

Code for semtest.c and semaphore.c are as given below

*
/* semtest.c */

#define PROG_NAME "SEMTEST"
#define TITLE "SEMTEST Semaphore Test Stub - Version 0.1 (10-Dec-1992)"
#define USAGE "Usage: semtest c|o"

#ifndef lint
static char *sccs_id="$Id: semtest.c,v 7.0 2000/08/24 15:59:12 growe Exp $";
#endif

#include 
#include 
#include 

#ifndef LOCAL_INC
#include 
#include 
#include 

#else
#include 
#include 
#include 
#endif

static int sem = SEM_NULL;
static key_t key = 0x123d4a;

int main(int argc, char *argv[])
{
printf("\n%s\n", TITLE);
printf("\n%s\n", USAGE);
if (argc != 2)
{
printf("\n%s\n", USAGE);
exit(EXIT_FAILURE);
}


switch (argv[1][0])
{
case 'c':
if (SemCreate(&sem, key, SEM_BINARY) EQ FAIL)
goto ErrExit;
printf("Semaphore Created key: 0x%xsem: %d\n", key, sem);
break;

case 'o':
if (SemOpen(&sem, key) EQ FAIL)
goto ErrExit;
printf("Semaphore Opened key: 0x%xsem: %d\n", key, sem);
break;

default:
printf("\n%s\n", USAGE);
exit(EXIT_FAILURE);

}


printf("About to Wait/lock on semaphore\n");
if (SemWait(sem) EQ FAIL)
goto ErrExit;

printf("semaphore locked\n");

printf("Press [RETURN] to continue and unlock semaphore\n");
(void) getchar();

printf("About to Signal/unlock on semaphore\n");
if (SemSignal(sem) EQ FAIL)
goto ErrExit;
printf("semaphore unlocked\n");


printf("About to Close on semaphore\n");
if (SemClose(sem) EQ FAIL)
goto ErrExit;
sem = SEM_NULL;

printf("semaphore closed\n");

(void)MsgClose(mhDefault);
printf("Program Terminated Successfully\n");
exit(EXIT_SUCCESS);
return(SUCCESS);

ErrExit:
(void) EsTraceBack();
(void)MsgClose(mhDefault);
printf("Program Terminated with error\n");
exit(EXIT_FAILURE);
return(FAIL);
}




**
Semaphore.c

 /* semaphore.c
 * Description:Provides a simpler and safer interface to the UNIX
 *  System V Release 4 semaphores. Seven functions are
 *  provided.
 *
 *  1.  id = SemCreate(key, value);
 *  2.  id = SemOpen(key);
 *  3.  SemWait(id);
 *  4.  SemSignal(id);
 *  5.  SemOp(id, amount);
 *  6.  SemClose(id);
 *  7.  SemRm(id);

 *
 * Portability Issues: This implementation requires System V semaphore
 *  facility.
 *
 * Edit History:
 *
 *
 */

#ifndef lint
static char *sccs_id="$Id: semaphore.c,v 7.2 2001/03/26 10:54:28 asealy Exp $";
#endif

#include 
#include 
#include 
#include 
#include 
#include 
#include 
extern int errno;

#define SEM_
#include 
#include 
#include 
#include 
#include 
#include  /* General UNIX messages */
#include  /* General UNIX messages */

#define BIGCOUNT 1 /* Initial value of process counter */

#if !SEMUN_DEFINED
union semun {
  int val;
  struct semid_ds *buf;
  ushort *array;
} semctl_arg;
#else
union semun semctl_arg;
#endif

typedef struct sembuf SEMBUF;

/* Prototypes for local functions */

/*
 * Define the semaphore operation arrays for the semop() calls.
 */

static SEMBUF op_lock[2] = {
2, 0, 0, /* wait for [2] (lock) to equal 0 */
2, 1, SEM_UNDO /* then incrrement [2] to 1 - this locks it */
/* UNDO to release the lock it process exits
  before explicitly unblocking */
};

static SEMBUF op_endcreate[2] = {
1, -1, SEM_UNDO,
2, -1, SEM_UNDO
};

static SEMBUF op_open[1] = {
1, -1, SEM_UNDO
};

static SEMBUF op_close[3] = {
2, 0, 0,
2, 1, SEM_UNDO,
1, 1, SEM_UNDO
};

static SEMBUF op_unlock[1] = {
2, -1, SEM_UNDO
};

static SEMBUF op_op[1] = {
0, 99, SEM_UNDO
};


/
 * Name:SemCreate
 *
 * Function:
 *
 * Input:   key - the IPC key that identifies the semaphore.
 *  initval - initial value of the semaphore.
 *
 * Output   *id - the identifier of this semaphore.
 *
 * Return:  SUCCESS or FAIL
 *
 * Side Effects:none
 *
 * Procedure:   1.
 *  2.
 *  3.
 /

STATUS
SemCreate(int *id, key_t key, int initval)
{

printf(" \n in semcretae");

printf("\n SEMUN_DEFINED = %i  " , SEMUN_DEFINED);

register int semval;

printf(" \n After Register = %i  ", semval);

if (key EQ IPC_PRIVATE)
{
printf(" \n SEM, Not intended for private semaphores");
goto ErrExit;
}

else if (key EQ (key_t) -1)
{
printf("\nSEM, probably an ftok() error by caller");
goto ErrExit;
}

again:
if ( (*id = semget(key, 3, 

Re: Semaphore Lock Failed Error

2016-03-09 Thread Meenakshi Pant
Our program is failing in creating and acquiring lock on the
semaphore. Created a test program 'semtest.c'. It is creating the
semaphore using the program semaphore.c. Compiled and executed using
the latest CYGWIN- 2.4.1. It is failing at line

if  ((semval = semctl(*id, 1, GETVAL, semctl_arg)) < 0 )

with error no 22.

Code for semtest.c and semaphore.c are attached here.
/* semmain.c - test */
#define PROG_NAME "SEMTEST"
#define TITLE "SEMTEST Semaphore Test Stub - Version 0.1 (10-Dec-1992)"
#define USAGE "Usage: semtest c|o"

#ifndef lint
static char *sccs_id="$Id: semtest.c,v 7.0 2000/08/24 15:59:12 growe Exp $";
#endif

#include 
#include 
#include 

#ifndef LOCAL_INC
#include 
#include 
#include 

#else
#include 
#include 
#include 
#endif

static int sem = SEM_NULL;
static key_t key = 0x123d4a;

int main(int argc, char *argv[])
{
	printf("\n%s\n", TITLE);
	printf("\n%s\n", USAGE);
	if (argc != 2)
	{
		printf("\n%s\n", USAGE);
		exit(EXIT_FAILURE);
	}


	switch (argv[1][0])
	{
	case 'c':
		if (SemCreate(&sem, key, SEM_BINARY) EQ FAIL)
			goto ErrExit;
		printf("Semaphore Created key: 0x%xsem: %d\n", key, sem);
		break;

	case 'o':
		if (SemOpen(&sem, key) EQ FAIL)
			goto ErrExit;
		printf("Semaphore Opened key: 0x%xsem: %d\n", key, sem);
		break;

	default:
		printf("\n%s\n", USAGE);
		exit(EXIT_FAILURE);

	}


	printf("About to Wait/lock on semaphore\n");
	if (SemWait(sem) EQ FAIL)
		goto ErrExit;

	printf("semaphore locked\n");

	printf("Press [RETURN] to continue and unlock semaphore\n");
	(void) getchar();

	printf("About to Signal/unlock on semaphore\n");
	if (SemSignal(sem) EQ FAIL)
		goto ErrExit;
	printf("semaphore unlocked\n");


	printf("About to Close on semaphore\n");
	if (SemClose(sem) EQ FAIL)
		goto ErrExit;
	sem = SEM_NULL;

	printf("semaphore closed\n");

	(void)MsgClose(mhDefault);
	printf("Program Terminated Successfully\n");
	exit(EXIT_SUCCESS);
	return(SUCCESS);

ErrExit:
	(void) EsTraceBack();
	(void)MsgClose(mhDefault);
	printf("Program Terminated with error\n");
	exit(EXIT_FAILURE);
	return(FAIL);
}

 /*
 *	Description:Provides a simpler and safer interface to the UNIX
 *  System V Release 4 semaphores. Seven functions are
 *  provided.
 *
 *  1.  id = SemCreate(key, value);
 *  2.  id = SemOpen(key);
 *  3.  SemWait(id);
 *  4.  SemSignal(id);
 *  5.  SemOp(id, amount);
 *  6.  SemClose(id);
 *  7.  SemRm(id);

 *
 *	Portability Issues:	This implementation requires System V semaphore
 *  facility.
 *
 *	Edit History:
 *
 *
 */

#ifndef lint
static char *sccs_id="$Id: semaphore.c,v 7.2 2001/03/26 10:54:28 asealy Exp $";
#endif

#include 
#include 
#include 
#include 
#include 
#include 
#include 
extern int errno;

#define SEM_
#include 
#include 
#include 
#include 
#include 
#include 	/* General UNIX messages */
#include 	/* General UNIX messages */

#define BIGCOUNT 1 /* Initial value of process counter */

#if !SEMUN_DEFINED
union semun {
  int val;
  struct semid_ds *buf;
  ushort *array;
} semctl_arg;
#else
union semun semctl_arg;
#endif

typedef struct sembuf SEMBUF;

/* Prototypes for local functions */

/*
 * Define the semaphore operation arrays for the semop() calls.
 */

static SEMBUF	op_lock[2] = {
	2, 0, 0,		/* wait for [2] (lock) to equal 0 */
	2, 1, SEM_UNDO	/* then incrrement [2] to 1 - this locks it */
	/* UNDO to release the lock it process exits
	   before explicitly unblocking */
	};

static SEMBUF op_endcreate[2] = {
	1, -1, SEM_UNDO,
	2, -1, SEM_UNDO
};

static SEMBUF op_open[1] = {
	1, -1, SEM_UNDO
};

static SEMBUF op_close[3] = {
	2, 0, 0,
	2, 1, SEM_UNDO,
	1, 1, SEM_UNDO
};

static SEMBUF op_unlock[1] = {
	2, -1, SEM_UNDO
};

static SEMBUF op_op[1] = {
	0, 99, SEM_UNDO
};


/
 * Name:SemCreate
 *
 * Function:
 *
 * Input:   key - the IPC key that identifies the semaphore.
 *  initval - initial value of the semaphore.
 *
 * Output   *id - the identifier of this semaphore.
 *
 * Return:  SUCCESS or FAIL
 *
 * Side Effects:none
 *
 * Procedure:   1.
 *  2.
 *  3.
 /

STATUS
SemCreate(int *id, key_t key, int initval)
{

printf(" \n in semcretae");

printf("\n SEMUN_DEFINED = %i  " , SEMUN_DEFINED);

	register int semval;

printf(" \n After Register = %i  ", semval);

	if (key EQ IPC_PRIVATE)
	{
		printf(" \n SEM, Not intended for private semaphores");
		goto ErrExit;
	}

	else if (key EQ (key_t) -1)
	{
		printf("\nSEM, probably an ftok() error by caller");
		goto ErrExit;
	}

again:
	if ( (*id = semget(key, 3, 0666 | IPC_CREAT)) < 0)
	{
		printf("\nSEM, SemCreate, semget access/

Re: Cygwin 1.7-58 with windows 2008

2016-03-09 Thread Marco Atzeri

On 09/03/2016 09:00, Rashi Singhal wrote:

Hi ,

We need to download Cygwin version  1.7.0-58 (with source)

Please help us from we can download old versions



http://www.fruitbat.org/Cygwin/#cygwintimemachine


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



Re: Cygwin 1.7-58 with windows 2008

2016-03-09 Thread Rashi Singhal
Hi ,

We need to download Cygwin version  1.7.0-58 (with source)

Please help us from we can download old versions


On Fri, Mar 4, 2016 at 10:10 PM, Rashi Singhal  wrote:
> Hi,
>
> Further to this we could now see that "NO MORE PROCESS" error is
> displayed due to some of the process not get de-queued from memory
>
> Our application use fork process to create child and then pass SIGUSR1
> for SIGCHLD to terminate child process.
>
> Sighandler is installed on the start of process.But this process is
> not getting invoked many a times due to which child process does not
> get killed.
>
> We are working on how to recreate this using simple test case . As
> this problem occurs mostly is heavy load and at random.
>
> We are also working to take latest cygwin and check on that .
>
> But we are getting error on SEMOPEN function as "semget , prot or table full"
>
> Please help us .
>
>
>
> On Tue, Feb 23, 2016 at 9:04 AM, Rashi Singhal  
> wrote:
>> Hi ,
>>
>> We have call to "msgsnd" function that fails after processing 3 to 4 
>> messages.
>>
>> We tried both Block and NO Block mechanism (IPC_NOWAIT)
>>
>> Also we changes configuration of cygserver.conf .This increases
>> message processing to 8-10 messages.But fails after that.
>>
>> Attached is cygserver.conf file for reference:
>>
>>
>>
>> On Mon, Feb 22, 2016 at 3:20 PM, Rashi Singhal  
>> wrote:
>>> Hi ,
>>>
>>> Last version working with out application is 1.7.32. We tried with
>>> this version but problem remain same.
>>>
>>> With the latest version of cygwin (2.4.1 release) our program gives
>>> compilation error for Yacc and LEX modules.( We are checking on this)
>>>
>>> Please can you suggest something on EAGAIN issue
>>>
>>>
>>> On Wed, Feb 17, 2016 at 2:14 PM, Rashi Singhal  
>>> wrote:
 We tried with latest version also . But problem remain same

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