SSHD /var/empty must be owned by root

2012-04-24 Thread Gyurmo
Hello,
I have:

[code]
$ /usr/sbin/sshd.exe -D
/var/empty must be owned by root and not group or world-writable.
[/code]

I can I have a trivial error. But I cannot google it. Please help me.
This is mine environment:

[code]
$ ls -l /etc/ssh*
-rw-r--r-- 1 SYSTEM Rendszergazdák 1555 ápr.  24 08.17 /etc/ssh_config
-rw-r--r-- 1 SYSTEM Rendszergazdák 1763 febr. 13 13.54 /etc/ssh_config_1.txt
-rw-r--r-- 1 SYSTEM Rendszergazdák  668 2011 máj.  29 /etc/ssh_host_dsa_key
-rw-r--r-- 1 SYSTEM Rendszergazdák  602 2011 máj.  29 /etc/ssh_host_dsa_key.pub
-rw-r--r-- 1 SYSTEM Rendszergazdák  227 2011 máj.  29 /etc/ssh_host_ecdsa_key
-rw-r--r-- 1 SYSTEM Rendszergazdák  174 2011 máj.  29
/etc/ssh_host_ecdsa_key.pub
-rw-r--r-- 1 SYSTEM Rendszergazdák  977 2011 máj.  29 /etc/ssh_host_key
-rw-r--r-- 1 SYSTEM Rendszergazdák  642 2011 máj.  29 /etc/ssh_host_key.pub
-rw-r--r-- 1 SYSTEM Rendszergazdák 1675 2011 máj.  29 /etc/ssh_host_rsa_key
-rw-r--r-- 1 SYSTEM Rendszergazdák  394 2011 máj.  29 /etc/ssh_host_rsa_key.pub
-rw-r--r-- 1 SYSTEM Rendszergazdák 3344 ápr.  24 08.18 /etc/sshd_config
-rw-r--r-- 1 SYSTEM Rendszergazdák 3188 2011 aug.  24 /etc/sshd_config.bac
[/code]

[code]
$ getfacl.exe /var/empty/
# file: /var/empty/
# owner: root
# group: SYSTEM
user::rwx
group::r-x
mask:rwx
other:r-x
default:user::rwx
default:group::r-x
default:other:r-x
[/code]

[code]
$ cat /etc/passwd | grep sshd
sshd:unused:1010:513:sshd,U-KILOVES\sshd,S-1-5-21-1844237615-1801674531-839522115-1010:/var/empty:/bin/false
[/code]

And I have an user sshd name grouped with administrators and folder is
c:\cygwin\var\empty defined in windows.

What other things need I do.
I wait for your help.
Thanks

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

2012-04-24 Thread Fedin Pavel

On 24.04.2012 9:27, Fedin Pavel wrote:


 Also, why does nfs access appear to be so horribly slow? Loading a 
directory with ~150 files takes about two minutes in mc. I understand 
fork() issue, but what are problems with just reading files descriptors?


 I resolved the problem with slowness. This appeared to happen because 
of seteuid() error (discovered in logs). Local system account on Win7 
doesn't have token creation/change rights. I fixed this by creating own 
local user with sufficient privileges and running nfsd under this 
account. BTW, may be you should add remark about this particularity into 
nfs-server.README file? It's not obvious, because the system works, just 
very slowly. The user might think it's okay.
 But RPC problem didn't go away. I tried to run portmapd under the same 
user with no positive result. The first thing client says is:
pmap_getmaps.c: rpc problem: RPC: Unable to receive; errno = Connection 
reset by peer
 I tried to completely turn off Windows firewall, again with no effect. 
So i still have to restart portmap service after i log in into the 
system in order to get NFS working.
 And one more little but annoying thing. All files on Linux site appear 
to have owner and group id == 42949672. However access control works 
correctly (i didn't modify any Cygwin mounts and i have ACLs turned on). 
/etc/nfs/server.map is set up correctly (i guess so, because access 
control works, i can read write and execute my files). Looks like it's 
some problem with reverse mapping.


--
 Kind regards
 Pavel Fedin
 Expert engineer, Samsung Moscow research center


--
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: SSHD /var/empty must be owned by root

2012-04-24 Thread Corinna Vinschen
On Apr 24 09:10, Gyurmo wrote:
> Hello,
> I have:
> 
> [code]
> $ /usr/sbin/sshd.exe -D
> /var/empty must be owned by root and not group or world-writable.

Why don't you run sshd as a service?  That's what the ssh-host-config
script is for.  The above call from the command line does not allow to
login with another account than the one sshd has been started under.

Usually sshd tests if /var/empty is owned by uid 0.  On Cygwin, where
there's usually no user with uid 0, the code has been modified to test
if /var/empty is owned by the user running sshd.  So, if you start sshd
on the command line, you have to chown /var/empty to the current user
account.  Same goes for the ssh-related files under /etc.  The error
message is the vanilla upstream error message.  It hasn't been changed
for Cygwin to keep the Cygwin-related upstream patchset small.


Corinna

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

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



Re: Problems with nfs

2012-04-24 Thread Corinna Vinschen
On Apr 24 11:19, Fedin Pavel wrote:
> On 24.04.2012 9:27, Fedin Pavel wrote:
> >
> > Also, why does nfs access appear to be so horribly slow? Loading
> >a directory with ~150 files takes about two minutes in mc. I
> >understand fork() issue, but what are problems with just reading
> >files descriptors?
> >
>  I resolved the problem with slowness. This appeared to happen
> because of seteuid() error (discovered in logs). Local system
> account on Win7 doesn't have token creation/change rights. I fixed
> this by creating own local user with sufficient privileges and
> running nfsd under this account. BTW, may be you should add remark
> about this particularity into nfs-server.README file? It's not
> obvious, because the system works, just very slowly. The user might
> think it's okay.

The problem is that the NFS-server package in Cygwin is orphaned since
the maintainer has moved on.  If somebody is interested to pick up
maintainance of that package, you're welcome.  See
http://cygwin.com/setup.html for more information.  The cygport
packaging method is the preferred packaging method these days.


Corinna

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

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



Re: how to deny delete

2012-04-24 Thread pen

unfortunately, the options u pointed and what andrey pointed arent possible.
In line with the locking file or directory any commands or API are
available? Any tips on implementing it would be helpful.

regards
pen

Corinna Vinschen-2 wrote:
> 
> On Apr 23 02:23, pen wrote:
>> 
>> I've noticed that on windows 7, even if we protect a folder by selecting
>> "delete - Deny" in permissions, cygwin doesn't care and it allows to
>> continue with rm. I think this is not good. I can think of other ways
>> like
>> creating a lock file in my scripts but that wont be a clean way. Isn't
>> there
>> any way that i can set some level of protection in NTFS without too much
>> of
>> fuss. I need to write to files and folder underneath but only want to
>> deny
>> delete permission on that top folder.
> 
> If the user is neither the owner of the dir, nor an admin, and if the
> permissions are set to 0700, the user won't be able to delete the
> folder.
> 
> 
> Corinna
> 
> -- 
> Corinna Vinschen  Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader  cygwin AT cygwin DOT com
> Red Hat
> 
> --
> Problem reports:   http://cygwin.com/problems.html
> FAQ:   http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/how-to-deny-delete-tp33732027p33738191.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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



Re: SSHD /var/empty must be owned by root

2012-04-24 Thread Gyurmo
Thanks,
This is solved me.
I only created /var/empty with login in sshd. Only this needed.
And I wrote inside win service sshd username and passwd.

Thanks.

2012/4/24 Corinna Vinschen :
> On Apr 24 09:10, Gyurmo wrote:
>> Hello,
>> I have:
>>
>> [code]
>> $ /usr/sbin/sshd.exe -D
>> /var/empty must be owned by root and not group or world-writable.
>
> Why don't you run sshd as a service?  That's what the ssh-host-config
> script is for.  The above call from the command line does not allow to
> login with another account than the one sshd has been started under.
>
> Usually sshd tests if /var/empty is owned by uid 0.  On Cygwin, where
> there's usually no user with uid 0, the code has been modified to test
> if /var/empty is owned by the user running sshd.  So, if you start sshd
> on the command line, you have to chown /var/empty to the current user
> account.  Same goes for the ssh-related files under /etc.  The error
> message is the vanilla upstream error message.  It hasn't been changed
> for Cygwin to keep the Cygwin-related upstream patchset small.
>
>
> Corinna

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



[ANNOUNCEMENT] Updated: libopenssl098-0.9.8w-1

2012-04-24 Thread Corinna Vinschen
I've updated the version of the OpenSSL 0.9.8 libs to 0.9.8w-1.

This is an upstream security release.  The Cygwin release is build from
the vanilla sources.

Here's the official security advisory:


OpenSSL Security Advisory [24 Apr 2012]
===

ASN1 BIO incomplete fix (CVE-2012-2131)
===

It was discovered that the fix for CVE-2012-2110 released on 19 Apr
2012 was not sufficient to correct the issue for OpenSSL 0.9.8.

Please see http://www.openssl.org/news/secadv_20120419.txt for details
of that vulnerability.

This issue only affects OpenSSL 0.9.8v.  OpenSSL 1.0.1a and 1.0.0i
already contain a patch sufficient to correct CVE-2012-2110.

Thanks to Red Hat for discovering and fixing this issue.

Affected users should upgrade to 0.9.8w.

References
==

URL for this Security Advisory:
http://www.openssl.org/news/secadv_20120424.txt



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


*** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

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


cygwin-announce-unsubscribe-you=yourdomain@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 the above URL.

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

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



Read from socket failed: Connection reset by peer

2012-04-24 Thread Gyurmo
Hello

I have a problem again.

[code]
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/Kilo/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
Read from socket failed: Connection reset by peer
[/code]

And the /var/log/sshd.log is empty
Why? Pl. help me with this also.
Thanks

--
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: Read from socket failed: Connection reset by peer

2012-04-24 Thread Fedin Pavel

On 24.04.2012 13:43, Gyurmo wrote:

Hello

I have a problem again.

Read from socket failed: Connection reset by peer

 Try restarting sshd service. If this works, you have the same problem 
as i do with portmap.
 And, you know, i have one guess. How early are services started? If 
they somehow manage to start up before network interface goes up, they 
won't be able to bind to correct addresses. However, i don't know how to 
fix it.

 BTW you can prove it. Take telnet client and try to connect:
1. From remote machine to your port 22.
2. From the same machine, using network interface's IP
3. From the same machine, using localhost IP.
 If (1) doesn't work and (3) works, my guess is correct.

--
 Kind regards
 Pavel Fedin
 Expert engineer, Samsung Moscow research center


--
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: python-gdata-2.0.17-1

2012-04-24 Thread Chris Sutcliffe
Version 2.0.17-1 of python-gdata has been uploaded.

python-gdata is the Google Data Python Client Library.  The Google
Data Python Client Library provides a library and source code that
make it easy to access data through Google Data APIs.

Changes are listed below.

 *** 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.comcygwin.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.

=== 2.0.17 ===
1143   3a0447b78b27   2012-04-20 13:25 -0400   jeffy
  The gdata.youtube.service class now explicitly sets the GData-Version: 1
  header, and is updated to use the correct ClientLogin URL.

1142   1e302ccfd1db   2012-04-19 14:09 -0700   dhermes
  Adding support for OAuth2 revoke endpoint.

1141   7dbf78073e2c   2012-04-18 09:51 -0700   alainv
  Make Resource and ResourceFeed "Batch" compatible.

1140   cde9a812ff75   2012-04-02 22:25 -0700   dhermes
  Forgot to add camelcase alias for batch in issue 5970062.

1139   f3db7c388325   2012-04-02 20:37 -0700   dhermes
  Adding support for performance data in Content API for Shopping (fixes Issue
  5976061).

1138   f5d8bd1a5d58   2012-04-02 20:30 -0700   dhermes
  Added support for custom attributes in Content API for Shopping (fixes Issue
  5970070).

1137   df2263245009   2012-04-02 08:18 -0700   dhermes
  Changed dest attrs in Content API to iterable, added validate_dest and fixed
  qname on app:control (fixes Issue 5976046).

1136   6fa84c09df8e   2012-04-02 07:46 -0700   dhermes
  Added camel case names to content API client public methods (fixes Issue
  5970062).

1135   f5d03167e6de   2012-04-02 07:38 -0700   dhermes
  Added support for Content for API errors on single and batch requests (fixes
  Issue 5971061).

1134   906bb1d9c899   2012-04-02 07:31 -0700   dhermes
  Added support for start-token in Content API for Shopping (closes Issue
  5980044).

1133   f98fff494fb8   2012-03-30 11:36 -0700   alainv
  Change gdata.docs.client.DocsClient.DeleteResource to use the entry instead
  of the link.

1132   e3594e4ea683   2012-03-30 10:56 -0700   alainv
  Allow for random kwargs in atom.client.AtomClient.request method.

1131   57db9d630ee7   2012-03-29 15:44 -0700   dhermes
  Changing Shipping to list element in Content API for Shopping.

1130   ab61823f2562   2012-03-29 15:34 -0700   dhermes
  Fixing behavior in atom.http_core.Uri._get_query_string for query parameters
  with no parameter value (closes Issue 5938047).

1129   583a2f25c123   2012-03-27 15:21 -0700   dhermes
  Fixed batch function issues in content api for shopping client.

1128   900e9a0c3b3a   2012-03-03 18:08 -0800   ccherubino
  Updated GetFeed methods in the Email Settings API to return typed feeds

1127   c21438385488   2012-02-29 09:18 -0800   dhermes
  Namespace for channel element (in contentforshopping) was promoted from scp
  to sc.

1126   5e7914da3fc5   2012-02-13 10:29 -0500   afshar
  Fixed release date year.

1125   78f1044f8338   2012-02-09 16:48 -0800   ccherubino
  Fixing bug in recent change to the Email Settings API client library (rev.
  194d0fd21fdd) + some typos

1123   194d0fd21fdd   2012-02-09 11:29 -0800   ccherubino
  Updating the Email Settings API to return instances of the correct classes
  when retrieving settings

1122:1120   5d90af058646   2012-02-09 17:14 +0530   shraddhag
  Added a sample to create a group and update its settings using the Groups
  Provisioning and Groups Settings APIs.

1121   632df99f18bb   2012-02-09 14:30 -0500   afshar
  Added docs:description element to docs resources.

1120   b916755be737   2012-02-02 09:49 -0500   afshar
  Fixed error in docs sample.

1119   19b1a2901d7e   2012-02-01 12:20 +0530   gunjansharma
  Added scopes for all Admin APIs in apps tag

1118   0e47dfadd4f6   2012-02-01 12:18 +0530   gunjansharma
  Added a sample for Email Audit API demonstrating CRUD operations on email
  monitors

1117   ce66eae4ca6f   2012-01-31 17:02 -0800   dhermes
  Fixed small doc errors, made tax a list element

1116   9676d3b1059b   2012-01-30 08:57 -0800   alainv
  Fix issues 590/591: Contact's gender XML element was wrong.

1115   32d0f6e650f5   2012-01-30 15:54 +0530   gunjansharma
  Added a sample marketplace application

1114   3a91fa3c66d1   2012-01-30 14:50 +0530   shraddhag
  Sample to delete obsolete suspended users

1113   1b7323bc42e7   2012-01-30 14:49 +0530   shraddhag
  Sample to retrieve user's profile and contacts using 2LO

1112   3265462309de   2012-01-25 22:42 -0500   vicfryzel
  Fixing issue 587.  Wrong URL used for batch ACL changes.

   15e17565f0ed   2012-01-24 12:04 +0530   shraddhag
  Added a sample to li

Re: cygwin 1.7.13-1: can't execute shell scripts on samba share

2012-04-24 Thread Andrey Repin
Greetings, Michel Bardiaux!

> I have also tried the same as you did (len.sh on a samba share) and saw
> the same problem. Then I saw that the len.sh got a (cygwin *and* linux)
> mode of -rwxrw-r-- *without* doing any chmod. Then I saw that *every*
> file I create on the samba share, gets the same mode!

testparm -s
please.


--
WBR,
Andrey Repin (anrdae...@freemail.ru) 24.04.2012, <14:45>

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: groff-1.21.1-1

2012-04-24 Thread Achim Gratz
Christopher Faylor  cygwin.com> writes:
> I've made a new version of groff available for installation.  This is a
> refresh from ftp.gnu.org.

This version produces the same errors with pfbtops that I reported some time ago
against the previous version.  I've compiled from the source package again and
all is well:

#> foreach f ( /usr/share/ghostscript/fonts/*.pfb )
#>   ./src/utils/pfbtops/pfbtops.exe $f > /dev/null
#> end

Whereas the binary delivered with the package fails:

#> foreach f ( /usr/share/ghostscript/fonts/*.pfb )
#>   pfbtops $f > /dev/null
#> end
#pfbtops: first byte of packet not 0x80
#pfbtops: first byte of packet not 0x80
#...

I've configured the build with

#> ./configure --with-x --with-gnu-ld --with-libiconv-prefix --prefix=/usr

I'm not really sure what is different between the two builds, but it may have
something to do with wide char support.


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: cygwin 1.7.13-1: can't execute shell scripts on samba share

2012-04-24 Thread Michel Bardiaux
> Greetings, Michel Bardiaux!
>
>> I have also tried the same as you did (len.sh on a samba share) and 
>> saw the same problem. Then I saw that the len.sh got a (cygwin *and* 
>> linux) mode of -rwxrw-r-- *without* doing any chmod. Then I saw that 
>> *every* file I create on the samba share, gets the same mode!
>
> testparm -s
> please.

Yes, this explains a lot - but not completely. The relevant lines being
the create masks:

0744 for global, 0755 for homes (the relevant share in my case), 0022 as
cygwin umask.

I would expect files created on the cygwin side to have 0755 on the
linux side (or possibly masked by global and/or umask). I do not see how
I end up with 0764.

Greetings,
(s) M. Bardiaux
Load smb config files from /etc/samba/smb.conf
Processing section "[home]"
Processing section "[homes]"
Processing section "[www]"
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER
[global]
dos charset = CP850
unix charset = UTF-8
display charset = LOCALE
workgroup = MDB
realm = 
netbios name = BESDEV01
netbios aliases = 
netbios scope = 
server string = Samba 3.0.24
interfaces = 
bind interfaces only = No
security = DOMAIN
auth methods = 
encrypt passwords = Yes
update encrypted = No
client schannel = Auto
server schannel = Auto
allow trusted domains = Yes
map to guest = Never
null passwords = No
obey pam restrictions = No
password server = besprd01
smb passwd file = /etc/samba/smbpasswd
private dir = /etc/samba
passdb backend = smbpasswd
algorithmic rid base = 1000
root directory = 
guest account = pkdev
enable privileges = Yes
pam password change = No
passwd program = 
passwd chat = *new*password* %n\n *new*password* %n\n *changed*
passwd chat debug = No
passwd chat timeout = 2
check password script = 
username map = 
password level = 0
username level = 0
unix password sync = No
restrict anonymous = 0
lanman auth = Yes
ntlm auth = Yes
client NTLMv2 auth = No
client lanman auth = Yes
client plaintext auth = Yes
preload modules = 
use kerberos keytab = No
log level = 0
syslog = 0
syslog only = No
log file = /var/log/samba/log.%m
max log size = 1000
debug timestamp = Yes
debug hires timestamp = No
debug pid = No
debug uid = No
enable core files = Yes
smb ports = 445 139
large readwrite = Yes
max protocol = NT1
min protocol = CORE
read bmpx = No
read raw = Yes
write raw = Yes
disable netbios = No
reset on zero vc = No
acl compatibility = auto
defer sharing violations = Yes
nt pipe support = Yes
nt status support = Yes
announce version = 4.9
announce as = NT
max mux = 50
max xmit = 16644
name resolve order = lmhosts host wins bcast
max ttl = 259200
max wins ttl = 518400
min wins ttl = 21600
time server = No
unix extensions = Yes
use spnego = Yes
client signing = auto
server signing = No
client use spnego = Yes
enable asu support = No
svcctl list = 
deadtime = 0
getwd cache = Yes
keepalive = 300
kernel change notify = Yes
fam change notify = Yes
lpq cache time = 30
max smbd processes = 0
paranoid server security = Yes
max disk size = 0
max open files = 1
open files database hash size = 10007
socket options = TCP_NODELAY
use mmap = Yes
hostname lookups = No
name cache timeout = 660
load printers = Yes
printcap cache time = 750
printcap name = 
cups server = 
iprint server = 
disable spoolss = No
addport command = 
enumports command = 
addprinter command = 
deleteprinter command = 
show add printer wizard = Yes
os2 driver map = 
mangling method = hash2
mangle prefix = 1
max stat cache size = 0
stat cache = Yes
machine password timeout = 604800
add user script = 
rename user script = 
delete user script = 
add group script = 
delete group script = 
add user to group script = 
delete user from group script = 
set primary group script = 
add machine script = 
shutdown script = 
abort shutdown script = 
username map script = 
logon script = 
logon path = \\%N\%U\profile
logon drive = 
logon home = \\%N\%U
domain logons = No
os level = 20
   

Re: 1.7.10->1.7.13 : output from .NET programs does not get through pipeline to a visual c++ program

2012-04-24 Thread cygwin
Thank you very much James for the helpful comments and pointer to your
sample program.

I have some more information and I tried to minimise .NET and so wrote
the program in C++, compiled with "cl /EHs consoleout.cxx /link"

>>> begin consoleout.cxx
#include 

int
main(int argc, char* argv[])
{
DWORD written;

// Get standard output file handle
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);

// Do a null write.  This is what .net does.
WriteFile(h, "", 0, &written, NULL);

for (int i = 1; i < argc; ++i) {
DWORD toWrite = strlen(argv[i]);
WriteFile(h, argv[i], toWrite, &written, NULL);
WriteFile(h, "\n", 1, &written, NULL);
}

return EXIT_SUCCESS;
}
<<< end consoleout.cxx

The strange thing here is that I get the issue on the first time (but
not the second or third):
$ ./consoleout hello world | ./readin
$ ./consoleout hello world | ./readin
hello
world
$ ./consoleout hello world | ./readin
hello
world
$

Now one must recompile the consoleout program to get it to fail again.
This bit seems to work intermittently, if it doesn't fail, recompile
the consoleout exe again and then try again.

As a test, I decided to change the readin program to use just windows
API (instead of std::cin and std::cout), compiled with "cl /EHs
readin.cxx /link":

>>> begin readin.cxx
#include 

int
main(int argc, char* argv[])
{
static_cast(argc);
static_cast(argv);

HANDLE hi = GetStdHandle(STD_INPUT_HANDLE);
HANDLE ho = GetStdHandle(STD_OUTPUT_HANDLE);

char buf[1024];
DWORD read, written;
ReadFile(hi, buf, 1024, &read, NULL);
WriteFile(ho, buf, read, &written, NULL);

return EXIT_SUCCESS;
}
>>> end readin.cxx

The issue remains:
$ ./consoleout hello world | ./readin
$ ./consoleout hello world | ./readin
hello
world
$ ./consoleout hello world | ./readin
hello
world
$

Hopefully, we have narrowed it down a little further,


Alan

On 20 April 2012 16:23, James Johnston  wrote:
> I ran into similar issues, which seemed to be fixed in 1.7.12 - but if you
> are still having issues even on the current Cygwin version of 1.7.13, I'd be
> interested to know if they can be resolved.  If it's anything like the issue
> I found, it has to do with erroneous pipe handling in Cygwin and nothing
> directly to do with .NET.
>
> Have you read this thread yet that I started last month?
> http://sourceware.org/ml/cygwin/2012-03/msg00298.html
>
> The technique I found useful was to use Reflector to decompile the .NET
> Framework's Console class.  You could also refer to the framework's source
> code, which Microsoft has made publicly available (believe it or not!).
> (But for me, decompiled results from Reflector are often faster than trying
> to obtain and then find the exact set of C# source files used to compile the
> class in question.  Also, Reflector provides convenient hyperlinks to jump
> from one related function to another.)
>
> After decompiling, I traced the code so I knew exactly what Win32 API calls
> were being made to read/write the console.  I was then able to isolate and
> reproduce the issue in a straight Win32 app, taking .NET out of the equation
> - which I then posted to the mailing list:
>
> 1.  I simplified C# code to smallest / simplest size possible that still
> reproduces the issue.
> 2.  I decompiled each function call I made to the framework, and followed
> the framework's code to see what API calls it made.  I took notes and made a
> list of API calls that it made in chronological order.
> 3.  Using my notes, wrote a simple C++ program that reproduced the issue.
> 4.  Simplified the C++ program as much as possible while reproducing the
> issue.

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

2012-04-24 Thread Andrew DeFaria

On 04/24/2012 12:33 AM, Corinna Vinschen wrote:

The problem is that the NFS-server package in Cygwin is orphaned since
the maintainer has moved on.  If somebody is interested to pick up
maintainance of that package, you're welcome.  See
http://cygwin.com/setup.html for more information.  The cygport
packaging method is the preferred packaging method these days.
Why don't we have an nfs-client package? Same reason - no maintainer? I 
would think an nfs-client would be much more useful than an nfs-server 
package.

--
Andrew DeFaria 
Just because you're paranoid doesn't mean they're not out to get you.


--
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: 1.7.10->1.7.13 : output from .NET programs does not get through pipeline to a visual c++ program

2012-04-24 Thread Corinna Vinschen


Please don't http://cygwin.com/acronyms/#TOFU
Thank you.


On Apr 24 13:37, cyg...@alanhowells.e4ward.com wrote:
> Thank you very much James for the helpful comments and pointer to your
> sample program.
> 
> I have some more information and I tried to minimise .NET and so wrote
> the program in C++, compiled with "cl /EHs consoleout.cxx /link"
> 
> >>> begin consoleout.cxx
> #include 
> 
> int
> main(int argc, char* argv[])
> {
> DWORD written;
> 
> // Get standard output file handle
> HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
> 
> // Do a null write.  This is what .net does.
> WriteFile(h, "", 0, &written, NULL);
> 
> for (int i = 1; i < argc; ++i) {
> DWORD toWrite = strlen(argv[i]);
>   WriteFile(h, argv[i], toWrite, &written, NULL);
>   WriteFile(h, "\n", 1, &written, NULL);
> }
> 
> return EXIT_SUCCESS;
> }
> <<< end consoleout.cxx
> 
> The strange thing here is that I get the issue on the first time (but
> not the second or third):
> $ ./consoleout hello world | ./readin
> $ ./consoleout hello world | ./readin
> hello
> world
> $ ./consoleout hello world | ./readin
> hello
> world
> $

This problem has nothing to do with Cygwin, as far as I can see.  What
happens is that the shell creates the pipe for you and then starts two
native Child processes, consoleout and readin, which use the existing
pipe without any interference from Cygwin.

So you have to look into the testcases itself to find the cause for the
problem.  And here we go:

> >>> begin readin.cxx
> #include 
> 
> int
> main(int argc, char* argv[])
> {
> static_cast(argc);
> static_cast(argv);
> 
> HANDLE hi = GetStdHandle(STD_INPUT_HANDLE);
> HANDLE ho = GetStdHandle(STD_OUTPUT_HANDLE);
> 
> char buf[1024];
> DWORD read, written;
> ReadFile(hi, buf, 1024, &read, NULL);
> WriteFile(ho, buf, read, &written, NULL);
> 
> return EXIT_SUCCESS;
> }
> >>> end readin.cxx

So, while your writer *writes* a 0 bytes block, your reader doesn't
*expect* a 0 bytes block, even though that's exactly what this case is
about.  Even worse, your readin testcase doesn't expect short reads at
all.  Consider the processes are scheduled interlaced:

  WriteFile ("");
ReadFile();
  WriteFile ("hello");
ReadFile();
  WriteFile ("\n");
ReadFile();
  WriteFile ("world");
ReadFile();
  WriteFile ("\n");
ReadFile();

If you change your application accordingly, it will work as expected:

  #include 
  
  int
  main(int argc, char* argv[])
  {
  static_cast(argc);
  static_cast(argv);
  
  HANDLE hi = GetStdHandle(STD_INPUT_HANDLE);
  HANDLE ho = GetStdHandle(STD_OUTPUT_HANDLE);
  
  char buf[1024];
  DWORD read, written;
  BOOL ret;

  do
{
  ret = ReadFile(hi, buf, 1024, &read, NULL);
  if (ret && read > 0)
WriteFile(ho, buf, read, &written, NULL);
}
  while (ret);
  
  return EXIT_SUCCESS;
  }


Corinna

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

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



Re: Problems with nfs

2012-04-24 Thread Corinna Vinschen
On Apr 24 07:06, Andrew DeFaria wrote:
> On 04/24/2012 12:33 AM, Corinna Vinschen wrote:
> >The problem is that the NFS-server package in Cygwin is orphaned since
> >the maintainer has moved on.  If somebody is interested to pick up
> >maintainance of that package, you're welcome.  See
> >http://cygwin.com/setup.html for more information.  The cygport
> >packaging method is the preferred packaging method these days.
> Why don't we have an nfs-client package? Same reason - no
> maintainer? I would think an nfs-client would be much more useful
> than an nfs-server package.

An NFS client is a filesystem driver.  There are companies providing
such NFS clients, one of them Microsoft with SFU on pre-Vista and the
NFS client in Vista/W7 Ultimate/Enterprise.


Corinna

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

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



Re: Problems with nfs

2012-04-24 Thread Christopher Faylor
On Tue, Apr 24, 2012 at 07:06:18AM -0700, Andrew DeFaria wrote:
>On 04/24/2012 12:33 AM, Corinna Vinschen wrote:
>> The problem is that the NFS-server package in Cygwin is orphaned since
>> the maintainer has moved on.  If somebody is interested to pick up
>> maintainance of that package, you're welcome.  See
>> http://cygwin.com/setup.html for more information.  The cygport
>> packaging method is the preferred packaging method these days.
>Why don't we have an nfs-client package? Same reason - no maintainer? I 
>would think an nfs-client would be much more useful than an nfs-server 
>package.

No maintainer + implementing it would require modifying Cygwin.  NFS
clients are part of the OS.

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: Problems with nfs

2012-04-24 Thread Andrew DeFaria

On 04/24/2012 07:11 AM, Corinna Vinschen wrote:

On Apr 24 07:06, Andrew DeFaria wrote:

On 04/24/2012 12:33 AM, Corinna Vinschen wrote:

The problem is that the NFS-server package in Cygwin is orphaned since
the maintainer has moved on.  If somebody is interested to pick up
maintainance of that package, you're welcome.  See
http://cygwin.com/setup.html for more information.  The cygport
packaging method is the preferred packaging method these days.

Why don't we have an nfs-client package? Same reason - no
maintainer? I would think an nfs-client would be much more useful
than an nfs-server package.

An NFS client is a filesystem driver.  There are companies providing
such NFS clients, one of them Microsoft with SFU on pre-Vista and the
NFS client in Vista/W7 Ultimate/Enterprise.
There are companies that provide X servers, putty's a replacement for 
Cygwin's ssh, there are various FTP server products, etc. The point is 
that having other options (often paid) available has never been a reason 
for not having a package.


As for other clients like SFU, I've tried that. It doesn't work. The 
problem is the filer at work is configured such that to Windows clients 
(SMB) it shares it's shares (home dirs) as FAT (and thus screws up ssh). 
The same file system is shared via NFS for Unix clients. But for some 
reason SFU will not mount the file system using NFS because (my theory) 
it sees that there's an SMB way to mount it so it will not offer the NFS 
mount. That's one of the problems I'm trying to solve. My hope was that 
with an NFS client in Cygwin it would do the NFS mount.

--
Andrew DeFaria 
The obituaries in the newspaper prove beyond a shadow of a doubt that 
people die in alphabetical order.



--
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: 1.7.10->1.7.13 : output from .NET programs does not get through pipeline to a visual c++ program

2012-04-24 Thread James Johnston
> -Original Message-
> Sent: Tuesday, April 24, 2012 12:38
> Subject: Re: 1.7.10->1.7.13 : output from .NET programs does not get
through
> pipeline to a visual c++ program
> 
> >>> begin readin.cxx
> #include 
> 
> int
> main(int argc, char* argv[])
> {
> static_cast(argc);
> static_cast(argv);
> 
> HANDLE hi = GetStdHandle(STD_INPUT_HANDLE);
> HANDLE ho = GetStdHandle(STD_OUTPUT_HANDLE);
> 
> char buf[1024];
> DWORD read, written;
> ReadFile(hi, buf, 1024, &read, NULL);
> WriteFile(ho, buf, read, &written, NULL);
> 
> return EXIT_SUCCESS;
> }
> >>> end readin.cxx

What Corinna said... your problem is that you don't have a loop.  The reason
your program sometimes works and sometimes not is that sometimes the
execution of readin is delayed long enough such that you get all the data
buffered in the STD_INPUT_HANDLE pipe, and your program seems to work.
Other times, all you might get is only the null write, or only the "hello"
but not the "world".  That's because your consoleout program hasn't actually
written all its data yet - so ReadFile is only going to send you what it
knows and has buffered - it figures a partial response is better than
waiting (important for a network protocol or other device where the next
bytes could be a long time before they arrive, if ever!).  It's just random
luck, subject to the whims of the operating system scheduler.

In general, one must remember that when reading from a stream or file, the
read may be incomplete - not all data may yet be received, so the function
just returns what is buffered.  It is necessary to loop until either
end-of-file is reached, or a special terminating character or sequence is
reached, depending on the file format, network protocol, etc. (e.g. a
newline).  In your case, you'd loop until end-of-file is reached, which is
just what the built-in utilities like cat, grep, etc. do.

Sometimes, depending on the stream class / file API being used, you have to
write in a loop too - for example, WriteFile returns a parameter indicating
how many bytes were actually written; you would need to loop until all bytes
have actually been written.  It's possible that the underlying device just
isn't ready to handle all the data you are providing, so it will only bite
off an appropriately-sized chunk from what you provided.  (Other APIs, such
as .NET's Stream class, will block until all bytes have been written.)

I mention these things because I see too much code where programmers assume
just a single read or write covers what they need and it happens to work on
their computer - never mind that it would break on 5% of customer
computers/networks!  (Cleaning up things like that is not an enjoyable use
of time...)

James


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

2012-04-24 Thread Corinna Vinschen
On Apr 24 07:27, Andrew DeFaria wrote:
> On 04/24/2012 07:11 AM, Corinna Vinschen wrote:
> >On Apr 24 07:06, Andrew DeFaria wrote:
> >>On 04/24/2012 12:33 AM, Corinna Vinschen wrote:
> >>>The problem is that the NFS-server package in Cygwin is orphaned since
> >>>the maintainer has moved on.  If somebody is interested to pick up
> >>>maintainance of that package, you're welcome.  See
> >>>http://cygwin.com/setup.html for more information.  The cygport
> >>>packaging method is the preferred packaging method these days.
> >>Why don't we have an nfs-client package? Same reason - no
> >>maintainer? I would think an nfs-client would be much more useful
> >>than an nfs-server package.
> >An NFS client is a filesystem driver.  There are companies providing
> >such NFS clients, one of them Microsoft with SFU on pre-Vista and the
> >NFS client in Vista/W7 Ultimate/Enterprise.
> There are companies that provide X servers, putty's a replacement
> for Cygwin's ssh, there are various FTP server products, etc. The
> point is that having other options (often paid) available has never
> been a reason for not having a package.
> 
> As for other clients like SFU, I've tried that. It doesn't work. The
> problem is the filer at work is configured such that to Windows
> clients (SMB) it shares it's shares (home dirs) as FAT (and thus
> screws up ssh). The same file system is shared via NFS for Unix
> clients. But for some reason SFU will not mount the file system
> using NFS because (my theory) it sees that there's an SMB way to
> mount it so it will not offer the NFS mount.

http://cygwin.com/acronyms/#WJFFM.  I'm using SFU/Vista/W7 NFS all the
time to build packages and keeping the share on my Linux box.  The
availability of MSFT NFS in Vista and W7 (albeit only in the expensive
versions) was a reason to add MSFT NFS support explicitely to Cygwin.
If you want NFS shares preferred over SMB shares, you have to change
the provider order (Network and Sharing Center -> Change adapter
settings -> Advanced -> Advanced Settings... -> Provider Order).
NFS Network must be higher inb the list than Microsoft WIndows Network.

And make sure the uid/gid mapping is set up correctly (Windows 2008
AD mapping works fine, see the "UNIX Attributes" tab in the user/group
properties dialog in the "Active Directory Users and Computers" MMC
Snap-in).

And make sure the security settings in the NFS client (starting with W7)
are correct.  If the NFS server doesn't support krb5 authentication,
you should explicitly switch them off in the "Services for Network
File System" MMC Snap-in.  Also, make sure that "reserved ports" is
enabled for best interoperability.

> That's one of the
> problems I'm trying to solve. My hope was that with an NFS client in
> Cygwin it would do the NFS mount.

Still, an NFS client isn't just some arbitrary piece of software, it's a
filesystem driver, like ntfs.sys.  There's no OSS code available which
provides this kind of FS driver for Windows.


Corinna

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

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



Re: cygwin 1.7.13-1: can't execute shell scripts on samba share

2012-04-24 Thread Andrey Repin
Greetings, Michel Bardiaux!

>>> I have also tried the same as you did (len.sh on a samba share) and
>>> saw the same problem. Then I saw that the len.sh got a (cygwin *and* 
>>> linux) mode of -rwxrw-r-- *without* doing any chmod. Then I saw that 
>>> *every* file I create on the samba share, gets the same mode!
>>
>> testparm -s
>> please.

> Yes, this explains a lot - but not completely. The relevant lines being
> the create masks:

> 0744 for global, 0755 for homes (the relevant share in my case), 0022 as
> cygwin umask.

> I would expect files created on the cygwin side to have 0755 on the
> linux side (or possibly masked by global and/or umask). I do not see how
> I end up with 0764.

I can't tell much either, but take this as a note:
create mask = what bits can be set by client at creation time.
security mask = what bits can be edited afterward.
create mode = default bits to be set.
force mode = bits that will be enforced on resulting mask.

I'll leave a live example from one of my live servers:

[D]
comment = Projects
path = /home/.shares/d
force group = DomainUsers
read only = No
create mask = 0775
force create mode = 0664
security mask = 0775
force security mode = 0664
directory mask = 0775
force directory mode = 0775
directory security mask = 0775
force directory security mode = 0775

What this does is the following:
It makes sure that directories and files inside are owned by DomainUsers group.
It makes sure that group have at least read and write access to the files.
It makes sure that group and guests have listing and traverse rights on 
directories.

Another point of note: from my memory, samba fakes ACLs to represent
permissions. This may include many strange things.
For example, most of that ^^ directory content has 0777 perms, but when I
look from Cygwin, it coming out more granular.


--
WBR,
Andrey Repin (anrdae...@freemail.ru) 24.04.2012, <18:18>

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: cygwin 1.7.13-1: can't execute shell scripts on samba share

2012-04-24 Thread Michel Bardiaux
> From Andrey Repin

[snip]

>> 0744 for global, 0755 for homes (the relevant share in my case), 0022

>> as cygwin umask.

Sorry, correction: create mask 0744, create mode 0755. Which does help
my confusion:

>> I would expect files created on the cygwin side to have 0755 on the 
>> linux side (or possibly masked by global and/or umask). I do not see 
>> how I end up with 0764.

[snip]

> Another point of note: from my memory, samba fakes ACLs to represent
permissions. This may include > many strange things.
> For example, most of that ^^ directory content has 0777 perms, but
when I look from Cygwin, it
> coming out more granular.

Which is why in this discussion I have always checked the mode on the
nix side, using ssh.

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

2012-04-24 Thread Andrew DeFaria

On 04/24/2012 08:00 AM, Corinna Vinschen wrote:

http://cygwin.com/acronyms/#WJFFM.  I'm using SFU/Vista/W7 NFS all the
time to build packages and keeping the share on my Linux box.  The
availability of MSFT NFS in Vista and W7 (albeit only in the expensive
versions) was a reason to add MSFT NFS support explicitely to Cygwin.
If you want NFS shares preferred over SMB shares, you have to change
the provider order (Network and Sharing Center ->  Change adapter
settings ->  Advanced ->  Advanced Settings... ->  Provider Order).
NFS Network must be higher inb the list than Microsoft WIndows Network.
Corina, I'm a consultant. This means my work environment often changes. 
It also means that I do not have as much clout to tell a fortune 500 
company to change their configurations just to make little ole' me 
happy. So I have to make do with what I have on hand. Having nfs-client 
in Cygwin might be one additional tool that I can control directly. Then 
again, the nfs-client may not have solved this problem anyway. I'm not 
sure.


Thanks for some of these pointers. I'll pass them around. But it's my 
understanding that the remote file server is a Netapp, not a Windows 
box. Also, I don't have Win 7. I have plain old XP. It's common.

And make sure the uid/gid mapping is set up correctly (Windows 2008
AD mapping works fine, see the "UNIX Attributes" tab in the user/group
properties dialog in the "Active Directory Users and Computers" MMC
Snap-in).

I don't think there's an MMC snap-in on a Netapp...

And make sure the security settings in the NFS client (starting with W7)
are correct.  If the NFS server doesn't support krb5 authentication,
you should explicitly switch them off in the "Services for Network
File System" MMC Snap-in.  Also, make sure that "reserved ports" is
enabled for best interoperability.
As I said, I don't have Win 7 - just XP. I had uninstalled SFU because I 
saw no way to solve this problem. Perhaps some of your settings above 
are transferable to the Netapp and they will set them and then I can try 
again.

That's one of the
problems I'm trying to solve. My hope was that with an NFS client in
Cygwin it would do the NFS mount.

Still, an NFS client isn't just some arbitrary piece of software, it's a
filesystem driver, like ntfs.sys.  There's no OSS code available which
provides this kind of FS driver for Windows.
I admit that NFS client is involved, a driver, in the kernel, etc. But 
isn't there SFU already coded? I guess the source isn't readily 
available if at all. I think that having an NFS client would be 
beneficial to all as NFS protocol seems to be way faster than SMB and 
more conducive to the "Linux/Cygwin" environment.

--
Andrew DeFaria 
Accept that some days you're the pigeon, and some days you're the statue.


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

2012-04-24 Thread Corinna Vinschen
On Apr 24 08:30, Andrew DeFaria wrote:
> On 04/24/2012 08:00 AM, Corinna Vinschen wrote:
> >And make sure the uid/gid mapping is set up correctly (Windows 2008
> >AD mapping works fine, see the "UNIX Attributes" tab in the user/group
> >properties dialog in the "Active Directory Users and Computers" MMC
> >Snap-in).
> I don't think there's an MMC snap-in on a Netapp...

No, but on the AD DC.

> >And make sure the security settings in the NFS client (starting with W7)
> >are correct.  If the NFS server doesn't support krb5 authentication,
> >you should explicitly switch them off in the "Services for Network
> >File System" MMC Snap-in.  Also, make sure that "reserved ports" is
> >enabled for best interoperability.
> As I said, I don't have Win 7 - just XP. I had uninstalled SFU
> because I saw no way to solve this problem. Perhaps some of your
> settings above are transferable to the Netapp and they will set them
> and then I can try again.

I was talking about the *client* options.  For XP all I said can be
ignored, except the provider order.  On XP you can simply use a passwd
and group file (NOT the Cygwin passwd and group files!) for identity
mapping on the client machine.

> >Still, an NFS client isn't just some arbitrary piece of software, it's a
> >filesystem driver, like ntfs.sys.  There's no OSS code available which
> >provides this kind of FS driver for Windows.
> I admit that NFS client is involved, a driver, in the kernel, etc.
> But isn't there SFU already coded? I guess the source isn't readily
> available if at all. I think that having an NFS client would be
> beneficial to all as NFS protocol seems to be way faster than SMB
> and more conducive to the "Linux/Cygwin" environment.

SFU *is* the NFS client.  You seem to expect that there's some user
space executable which constitutes the NFS client, but that's not the
case.  The OS driver *is* the NFS client.  Full stop.


Corinna

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

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



[ANNOUNCEMENT] Updated: Cygwin 1.7.14

2012-04-24 Thread Corinna Vinschen
Hi Cygwin friends and users,


I just released 1.7.14.  This is a bugfix release.  Only one new feature
has been added.


What's new:
===

- Add mouse reporting mode 1006 and 1015 to console.

Bug fixes:
==

- Allow access of /dev/conin, /dev/conout, and /dev/console if a console
  device is detected.

- Always allow nonexistent on-disk devices to be referenced even if they
  can't be open.

- Allow inheritance of special types like /dev/clipboard or /dev/urandom
  which do not have actual handles associated with them.

- Fix inode numbers of non-device files in virtual filesystems.

- Fix reporting large mouse coordinates in console window mouse reporting mode.


Have fun,
Corinna


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

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

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



Re: Problems with nfs

2012-04-24 Thread Thomas Dineen

Gents:

 Make sure both sides of the connection are running the same 
version of NFS.
Some of the issues describes here can be seen in connections where two 
versions

NFS try to inter-operate

Thomas Dineen


On 4/24/2012 12:19 AM, Fedin Pavel wrote:

On 24.04.2012 9:27, Fedin Pavel wrote:


 Also, why does nfs access appear to be so horribly slow? Loading a 
directory with ~150 files takes about two minutes in mc. I understand 
fork() issue, but what are problems with just reading files descriptors?


 I resolved the problem with slowness. This appeared to happen because 
of seteuid() error (discovered in logs). Local system account on Win7 
doesn't have token creation/change rights. I fixed this by creating 
own local user with sufficient privileges and running nfsd under this 
account. BTW, may be you should add remark about this particularity 
into nfs-server.README file? It's not obvious, because the system 
works, just very slowly. The user might think it's okay.
 But RPC problem didn't go away. I tried to run portmapd under the 
same user with no positive result. The first thing client says is:
pmap_getmaps.c: rpc problem: RPC: Unable to receive; errno = 
Connection reset by peer
 I tried to completely turn off Windows firewall, again with no 
effect. So i still have to restart portmap service after i log in into 
the system in order to get NFS working.
 And one more little but annoying thing. All files on Linux site 
appear to have owner and group id == 42949672. However access control 
works correctly (i didn't modify any Cygwin mounts and i have ACLs 
turned on). /etc/nfs/server.map is set up correctly (i guess so, 
because access control works, i can read write and execute my files). 
Looks like it's some problem with reverse mapping.





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

2012-04-24 Thread Thomas Dineen


What is the NFS version number???






On 4/24/2012 12:33 AM, Corinna Vinschen wrote:

On Apr 24 11:19, Fedin Pavel wrote:

On 24.04.2012 9:27, Fedin Pavel wrote:

Also, why does nfs access appear to be so horribly slow? Loading
a directory with ~150 files takes about two minutes in mc. I
understand fork() issue, but what are problems with just reading
files descriptors?


  I resolved the problem with slowness. This appeared to happen
because of seteuid() error (discovered in logs). Local system
account on Win7 doesn't have token creation/change rights. I fixed
this by creating own local user with sufficient privileges and
running nfsd under this account. BTW, may be you should add remark
about this particularity into nfs-server.README file? It's not
obvious, because the system works, just very slowly. The user might
think it's okay.

The problem is that the NFS-server package in Cygwin is orphaned since
the maintainer has moved on.  If somebody is interested to pick up
maintainance of that package, you're welcome.  See
http://cygwin.com/setup.html for more information.  The cygport
packaging method is the preferred packaging method these days.


Corinna




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



lzma instead of bzip2 for packages compression ?

2012-04-24 Thread Jérôme Bouat

Hello,


The cygwin 'tar.bz2' packages are created once and broadcasted to many hosts.

The lzma compression is fast for decompression.  Could we possibly get the 
packages with lzma compression ?

We could set the right parameters in order to fit a maximum memory limit that 
would be required for decompression.


Regards.

--
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: lzma instead of bzip2 for packages compression ?

2012-04-24 Thread Eric Blake
On 04/24/2012 10:21 AM, Jérôme Bouat wrote:
> Hello,
> 
> 
> The cygwin 'tar.bz2' packages are created once and broadcasted to many
> hosts.
> 
> The lzma compression is fast for decompression.  Could we possibly get
> the packages with lzma compression ?

lzma is obsolete.  If anything, we want xz.

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



signature.asc
Description: OpenPGP digital signature


Re: Why /usr/bin/*.dll must be executable?

2012-04-24 Thread Larry Hall (Cygwin)

On 4/23/2012 8:19 PM, Warren Young wrote:

On 4/23/2012 6:12 PM, Richard Troy wrote:


what on earth would --login have to do with where
the dlls are found?


Without that, you don't run the profile files[*], so you get the Windows
PATH[**] which is clearly insufficient in your situation.

Somewhere in one of these files is a line of code that adds the directory
containing the problem DLL to your PATH.


And the path needed to find DLLs that are provided by the distribution
is added in '/etc/profile'.  The template for this file can be found in
'/etc/defaults/etc'.  This file is sourced by default for a login shell.

I can't explain why you might see a difference on W7 with this though,
unless your non-W7 machines added Cygwin paths in the Windows environment
(via cygwin.bat, the control panel that Warren pointed out, or other
scripting files that are part of the your process Richard).

--
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: how to deny delete

2012-04-24 Thread Larry Hall (Cygwin)

On 4/24/2012 4:24 AM, pen wrote:


unfortunately, the options u pointed and what andrey pointed arent possible.
In line with the locking file or directory any commands or API are
available? Any tips on implementing it would be helpful.


Windows will allow you to manage just the delete permission.  If you need
that level of control, check out 'icacls'.  Something like the following
may work for you:

  icacls  /deny :D

--
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: how to deny delete

2012-04-24 Thread Corinna Vinschen
On Apr 24 12:57, Larry Hall (Cygwin) wrote:
> On 4/24/2012 4:24 AM, pen wrote:
> >
> >unfortunately, the options u pointed and what andrey pointed arent possible.
> >In line with the locking file or directory any commands or API are
> >available? Any tips on implementing it would be helpful.
> 
> Windows will allow you to manage just the delete permission.  If you need
> that level of control, check out 'icacls'.  Something like the following
> may work for you:
> 
>   icacls  /deny :D

Doesn't help in Cygwin if the user is admin.  Think SE_BACKUP_PRIVILEGE.


Corinna

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

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



Re: lzma instead of bzip2 for packages compression ?

2012-04-24 Thread Jérôme Bouat

In case you want to use xz, the '--extreme' option prevides a higher 
compression ratio than lzma with the same memory requirement for decompression.

Le 24/04/2012 18:27, Eric Blake a écrit :

On 04/24/2012 10:21 AM, Jérôme Bouat wrote:

Hello,


The cygwin 'tar.bz2' packages are created once and broadcasted to many
hosts.

The lzma compression is fast for decompression.  Could we possibly get
the packages with lzma compression ?


lzma is obsolete.  If anything, we want xz.




--
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.13-1: can't execute shell scripts on samba share

2012-04-24 Thread Andrey Repin
Greetings, Michel Bardiaux!

>> Another point of note: from my memory, samba fakes ACLs to represent
>> permissions. This may include many strange things.
>> For example, most of that ^^ directory content has 0777 perms, but
>> when I look from Cygwin, it
>> coming out more granular.

> Which is why in this discussion I have always checked the mode on the
> nix side, using ssh.

Mode on the *nix side seems unimportant, as Samba fakes ACL, if client do not
understand native modes.


--
WBR,
Andrey Repin (anrdae...@freemail.ru) 24.04.2012, <21:06>

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: how to deny delete

2012-04-24 Thread Larry Hall (Cygwin)

On 4/24/2012 1:01 PM, Corinna Vinschen wrote:

On Apr 24 12:57, Larry Hall (Cygwin) wrote:

On 4/24/2012 4:24 AM, pen wrote:


unfortunately, the options u pointed and what andrey pointed arent possible.
In line with the locking file or directory any commands or API are
available? Any tips on implementing it would be helpful.


Windows will allow you to manage just the delete permission.  If you need
that level of control, check out 'icacls'.  Something like the following
may work for you:

   icacls  /deny:D


Doesn't help in Cygwin if the user is admin.  Think SE_BACKUP_PRIVILEGE.


Ah yes.  And the OP said dropping this privilege for the user was a
non-starter for some reason.  OK, I'm out of ideas.

--
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: Problems with nfs

2012-04-24 Thread Andrew DeFaria

On 4/24/2012 8:39 AM, Corinna Vinschen wrote:

On Apr 24 08:30, Andrew DeFaria wrote:

On 04/24/2012 08:00 AM, Corinna Vinschen wrote:

And make sure the uid/gid mapping is set up correctly (Windows 2008
AD mapping works fine, see the "UNIX Attributes" tab in the user/group
properties dialog in the "Active Directory Users and Computers" MMC
Snap-in).

I don't think there's an MMC snap-in on a Netapp...

No, but on the AD DC.

I don't have access to the AD DC.



And make sure the security settings in the NFS client (starting with W7)
are correct.  If the NFS server doesn't support krb5 authentication,
you should explicitly switch them off in the "Services for Network
File System" MMC Snap-in.  Also, make sure that "reserved ports" is
enabled for best interoperability.

As I said, I don't have Win 7 - just XP. I had uninstalled SFU
because I saw no way to solve this problem. Perhaps some of your
settings above are transferable to the Netapp and they will set them
and then I can try again.

I was talking about the *client* options.  For XP all I said can be
ignored, except the provider order.
I just reinstalled SFU on my XP laptop. I'm not seeing provider order 
options at all. I see a snapin for SFU which has Client for NFS which 
only has a File Permissions tab and a Performance tab. There is also 
Telnet Server and User name mapping selections.

  On XP you can simply use a passwd
and group file (NOT the Cygwin passwd and group files!) for identity
mapping on the client machine.

There appears to be a username mapping for NIS.



Still, an NFS client isn't just some arbitrary piece of software, it's a
filesystem driver, like ntfs.sys.  There's no OSS code available which
provides this kind of FS driver for Windows.

I admit that NFS client is involved, a driver, in the kernel, etc.
But isn't there SFU already coded? I guess the source isn't readily
available if at all. I think that having an NFS client would be
beneficial to all as NFS protocol seems to be way faster than SMB
and more conducive to the "Linux/Cygwin" environment.

SFU *is* the NFS client.  You seem to expect that there's some user
space executable which constitutes the NFS client, but that's not the
case.  The OS driver *is* the NFS client.  Full stop.
I thought it might be able to contain this within the cygwin1.dll but 
apparently not.

--
Andrew DeFaria 
One of the penalties for refusing to participate in politics is that you 
end up being governed by your inferiors.



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

2012-04-24 Thread Corinna Vinschen
On Apr 24 11:07, Andrew DeFaria wrote:
> On 4/24/2012 8:39 AM, Corinna Vinschen wrote:
> >On Apr 24 08:30, Andrew DeFaria wrote:
> >>On 04/24/2012 08:00 AM, Corinna Vinschen wrote:
> >I was talking about the *client* options.  For XP all I said can be
> >ignored, except the provider order.
> I just reinstalled SFU on my XP laptop. I'm not seeing provider
> order options at all. I see a snapin for SFU which has Client for
> NFS which only has a File Permissions tab and a Performance tab.

The Provider Order has nothing to do with the NFS client settings.
You dropped the important part from my reply:

> If you want NFS shares preferred over SMB shares, you have to change
> the provider order (Network and Sharing Center -> Change adapter
> settings -> Advanced -> Advanced Settings... -> Provider Order).
> NFS Network must be higher inb the list than Microsoft WIndows Network.

In XP the "Network and Sharing Center" is not available, just go directly
to Network Connections -> Advanced -> Advanced Settings...  -> Provider Order.


Corinna

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

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



[ANNOUNCEMENT] Updated: diffutils-3.2-1

2012-04-24 Thread Christopher Faylor
I've made a new version of 'diffutils' (http://www.gnu.org/software/diffutils/)
available for installation.  This is the most recent version of
diffutils from ftp.gnu.org .  I've included a snippet from the diffutils
NEWS file showing changes since the last Cygwin release below.

  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, please
use the automated form at:

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

If this does not work, then 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.
 * * *

* Noteworthy changes in release 3.2 (2011-09-02) [stable]

** Changes in behavior

  --ignore-file-name-case now applies at the top level too.
  For example, "diff dir inIt" might compare "dir/Init" to "inIt".

** New features

  diff and sdiff have a new option --ignore-trailing-space (-Z).

** Packaging

  The texinfo documentation no longer specifies "front-cover" or "back-cover"
  texts, so that it may now be included in Debian's "main" section.


* Noteworthy changes in release 3.1 (2011-08-10) [stable]

** Bug fixes

  diff no longer reports spurious differences merely because two entries
  in the same directory have names that compare equal in the current
  locale, or compare equal because --ignore-file-name-case was given.

* Noteworthy changes in release 3.0 (2010-05-03) [stable]

** Bug fixes

  diff once again prints the required "\ No newline at end of file" line
  when at least one input lacks a newline-at-EOF and the final hunk plus
  context-length aligns exactly with the end of the newline-lacking file.
  [bug introduced between 2.8.7 and 2.9]

** Changes in behavior

  In context-style diffs, diff prints a portion of a preceding "function"
  line for each hunk, with --show-function-line=RE (-F) or
  --show-c-function (-p).  Now, it trims leading blanks from such lines
  before extracting a prefix.  This is useful especially when a function
  line is so far indented that the name itself would be truncated or not
  included in the limited-width substring that diff appends.

  diff once again reports a difference with the diagnostic
  "Binary files A and B differ" when at least one of the files
  appears to be binary.  From 2.8.4 through diffutils-2.9, it printed
  "Files A and B differ".

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

2012-04-24 Thread Fedin Pavel

On 24.04.2012 20:14, Thomas Dineen wrote:

Gents:

 Make sure both sides of the connection are running the same 
version of NFS.


 Client v3, server v2.3.5 (Cygwin package version)

--
 Kind regards
 Pavel Fedin
 Expert engineer, Samsung Moscow research center


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

2012-04-24 Thread Fedin Pavel

On 24.04.2012 18:11, Corinna Vinschen wrote:

An NFS client is a filesystem driver. There are companies providing 
such NFS clients, one of them Microsoft with SFU on pre-Vista and the 
NFS client in Vista/W7 Ultimate/Enterprise. Corinna 


 BTW, IIRC in Cygwin we can mount SMB/CIFS shares using 'smbfs' in the 
fstab. Why can't we do the same for NFS?
 And second point. Of course we can use SFU client, but there'll be one 
problem. It won't expose symlinks etc correctly, because it's Windows 
native thing. I think would be nice to have a complete VFS layer in the 
Cygwin for such things.
 In fact this is why i use Cygwin at all - i want to cross-build Linux 
stuff and sometimes i need to run ARM board with root over NFS. I would 
love to use MinGW (much faster) but it won't allow me to have all the 
stuff (symlinkis, /dev nodes, etc) on my HDD. And i don't want to cope 
with virtual machine because it's not so comfortable. Additionally with 
MinGW i won't be able to cross-build Linux kernel because some freak 
thought that having filenames with only case difference (ip_conntrack.h 
and ip_CONNTRACK.h) is a funny idea...


--
 Kind regards
 Pavel Fedin
 Expert engineer, Samsung Moscow research center


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