public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
@ 2015-03-04 11:38 Corinna Vinschen
  2015-03-06 13:25 ` Achim Gratz
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2015-03-04 11:38 UTC (permalink / raw)
  To: cygwin

Hi Cygwin friends and users,


I just released Cygwin 1.7.35-1.

This release comes with a bunch of changes and bugfixes collected
since 1.7.34-6.  The major changes are

- Performance improvements in the new account handling per
  https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping

- New default settings for db_home, db_shell, and db_gecos.  The
  defaults are now:

    db_home: /home/%U
    db_shell: /bin/bash
    db_gecos: <empty>

  This means, if you don't set these values in /etc/nsswitch.conf,
  there's no reason for Cygwin to access the DC via LDAP.

- A change in chmod's handling of group permissions allows to use
  chmod(1) to disable excessive group permissions.


Here's the list of changes for 1.7.35-1:

What's new:
-----------

- New APIs: cabsl, cimagl, creall, finitel, hypotl, sqrtl.

- New API: issetugid.


What changed:
-------------

- Performance improvements of the new account DB handling.

- Since 1.7.34, chmod does not always affect the POSIX permission mask as
  returned by stat(2) or printed by ls(1), due to the improved POSIX ACL
  handling.  However, that's still far from perfect, so, as a temporary
  workaround, chmod now checks if secondary groups and users in the ACL
  have more permissions than the primary group.  If so, the permissions
  of the secondary users and groups will be reduced according to the mask
  given by the new primary group permissions.  I.e, chmod 600 will remove
  all permissions from the primary group as well as all secondary user and
  group entries in the ACL.

- Change handling of group permissions if owner SID == group SID.  Now the
  group permissions don't mirror the user permissions anymore, thus leading
  to less hassle with security-conscious applications.

- Allow group SID to be the same as owner SID for "Microsoft Accounts".
  Those have the group in their user token set to the owner SID by default.
  Drop the workaround to change their primary group to "Users".  It's not
  required anymore due to the aforementioned changes.

- Change getfacl long options from --all to --access and from --dir to
  --default, along the lines of the Linux getfacl tool.

- Don't raise a SIGSYS signal in the XSI IPC functions if cygserver is not
  running.  Just return -1 with errno set to ENOSYS.


Bug Fixes
---------

- Fix /proc/cpuinfo multicore info on Intel CPUs.
  Addresses: https://cygwin.com/ml/cygwin-apps/2015-02/msg00077.html

- Generate unique inode number for /dev/tty under all circumstances.
  Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00211.html

- Fix handling of PATH search in execlp and other calls to honor mount flags.
  Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00119.html

- Remove a debug message accidentally printed to the terminal window
  if an application calls fcntl(F_SETFL) erroneously.

- Two regressions in 1.7.34 acl(SETACL, ...):

  - SETACL overwrote the incoming acltent_t array for bookkeeping purposes
    while iterating over its entries.  This broke reusing the acl in the
    calling application (e.g. setfacl).
    Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00304.html

  - SETACL accidentally missed to grant owner FILE_WRITE_ATTRIBUTES access.
    Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00457.html

- Keep SETACL from duplicating user/group deny/allow ACEs if owner SID is
  the same as group SID.

- When creating directories, keep permissions inherited from parent directory
  inheritable, per POSIX 1003.1e.

- 64 bit: Export forgotten symbol __mempcpy.
  Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00394.html

- 64 bit: Avoid misbehaviour in signal mask computation.
  Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00665.html

- Avoid data loss on non-blocking pipes after switching back to blocking.
  Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00575.html

- Fix a potential heap corruption in mkgroup and mkpasswd when enumerating
  Unix users.

- Regression in 1.7.34:  A patch to the pty handling fixing the problem
  reported in https://cygwin.com/ml/cygwin-developers/2014-11/msg00000.html
  was incomplete and lead to undesired buffering in non-canonical mode.
  This should be fixed now.
  Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00608.html

- Fix signal handling in a few functions.
  Partially addresses: https://cygwin.com/ml/cygwin/2015-02/msg00762.html


To install 32-bit Cygwin use http://cygwin.com/setup-x86.exe
To install 64 bit Cygwin use http://cygwin.com/setup-x86_64.exe

If you're already running a 32 bit version of Cygwin on 64 bit Windows
machines, you can continue to do so.  If you're planning a new install
of Cygwin on a 64 bit Windows machine, consider to use the new 64 bit
Cygwin version, unless you need certain packages not yet available in
the 64 bit release.


Have fun,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
  2015-03-04 11:38 [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1 Corinna Vinschen
@ 2015-03-06 13:25 ` Achim Gratz
  2015-03-07 10:48   ` Thomas Wolff
  2015-03-09  9:12   ` Corinna Vinschen
  0 siblings, 2 replies; 10+ messages in thread
From: Achim Gratz @ 2015-03-06 13:25 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
> - Change handling of group permissions if owner SID == group SID.  Now the
>   group permissions don't mirror the user permissions anymore, thus leading
>   to less hassle with security-conscious applications.

There's another tricky situation that is not yet handled:

If the file is owned by myself and I'm in a group that allows full access
(but not ACL modifications), Cygwin will show that file as having mode
"---rwx---+".  Applications that follow POSIX semantics will interpret that
file as unreadable by the owner (==current user) and skip checking the group
permissions, while NTFS will still happily grant that access.  So in that
situation the group permissions need to be promoted to the owner permissions.


Regards,
Achim.fare


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
  2015-03-06 13:25 ` Achim Gratz
@ 2015-03-07 10:48   ` Thomas Wolff
  2015-03-07 10:59     ` Achim Gratz
  2015-03-09  9:12   ` Corinna Vinschen
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas Wolff @ 2015-03-07 10:48 UTC (permalink / raw)
  To: cygwin

Am 06.03.2015 um 13:51 schrieb Achim Gratz:
> Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
>> - Change handling of group permissions if owner SID == group SID.  Now the
>>    group permissions don't mirror the user permissions anymore, thus leading
>>    to less hassle with security-conscious applications.
> There's another tricky situation that is not yet handled:
>
> If the file is owned by myself and I'm in a group that allows full access
> (but not ACL modifications), Cygwin will show that file as having mode
> "---rwx---+".  Applications that follow POSIX semantics will interpret that
> file as unreadable by the owner (==current user) and skip checking the group
> permissions, while NTFS will still happily grant that access.
This may happen on Linux as well. Just tested on a NAS runnig Debian, in 
a "share" partition:
echo bla > x
chmod -rw x
ls -l x
---------- 1 towo share 4 Mar  7 09:59 x
cat x
bla

The same file mounted on Windows and handled by cygwin is also readable.

> So in that situation the group permissions need to be promoted to the owner permissions.
I see no need to be more posixly here than other POSIX systems.
------
Thomas

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
  2015-03-07 10:48   ` Thomas Wolff
@ 2015-03-07 10:59     ` Achim Gratz
  0 siblings, 0 replies; 10+ messages in thread
From: Achim Gratz @ 2015-03-07 10:59 UTC (permalink / raw)
  To: cygwin

Thomas Wolff writes:
> This may happen on Linux as well. Just tested on a NAS runnig Debian,
> in a "share" partition:

In that case you've explicitly cleared the filemodes for the owner of
the file.  I'm talking about a case where the file access is purely
based on ACL, there are no ACL for the owner SID and Cygwin basically
creates those owner filemodes out of thin air.

>> So in that situation the group permissions need to be promoted to the owner permissions.
> I see no need to be more posixly here than other POSIX systems.

The owner modes are always explicitly set for POSIX systems and become
the u::+++, g::+++ and o::+++ base entries in the ACL.  The ACL check
algorithm gives these base entries absolute precedence over everything
else for compatibility with systems that don't have ACL, so if
euid==owner or egid==group no further entries in the ACL are ever
checked.

On Windows, the ACL are processed differently, which means that to do a
correct translation of Windows ACL into POSIX ACL Cygwin must compute
the base entries (and the filemodes) from the underlying full ACL,
otherwise the apparent (via POSIX applications) and the effective (via
Windows) access rights become different.  And yes, that means that in
some situations the POSIX file modes can change when the Windows ACL are
changing, while this is not possible on POSIX systems.


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

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
  2015-03-06 13:25 ` Achim Gratz
  2015-03-07 10:48   ` Thomas Wolff
@ 2015-03-09  9:12   ` Corinna Vinschen
  2015-03-09 15:02     ` David A. Wheeler
  2015-03-09 19:27     ` Achim Gratz
  1 sibling, 2 replies; 10+ messages in thread
From: Corinna Vinschen @ 2015-03-09  9:12 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On Mar  6 12:51, Achim Gratz wrote:
> Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
> > - Change handling of group permissions if owner SID == group SID.  Now the
> >   group permissions don't mirror the user permissions anymore, thus leading
> >   to less hassle with security-conscious applications.
> 
> There's another tricky situation that is not yet handled:
> 
> If the file is owned by myself and I'm in a group that allows full access
> (but not ACL modifications), Cygwin will show that file as having mode
> "---rwx---+".  Applications that follow POSIX semantics will interpret that
> file as unreadable by the owner (==current user) and skip checking the group
> permissions, while NTFS will still happily grant that access.  So in that
> situation the group permissions need to be promoted to the owner permissions.

The problem is this.  How long do you want `ls -l' take?  Checking
permissions is awkward and lengthy on Windows, unless you have the
user's token.  The access check can be improved and the permissions
more correctly shown for the current user, but for any file and any
user account, it'd be a lot of time-consuming effort.


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
  2015-03-09  9:12   ` Corinna Vinschen
@ 2015-03-09 15:02     ` David A. Wheeler
  2015-03-09 15:20       ` Corinna Vinschen
  2015-03-09 19:27     ` Achim Gratz
  1 sibling, 1 reply; 10+ messages in thread
From: David A. Wheeler @ 2015-03-09 15:02 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen:
> The problem is this.  How long do you want `ls -l' take?  Checking
> permissions is awkward and lengthy on Windows, unless you have the
> user's token.  The access check can be improved and the permissions
> more correctly shown for the current user, but for any file and any
> user account, it'd be a lot of time-consuming effort.

I expect that improving the emulation for just the "current user" would be useful.
That is an *extremely* common situation.

--- David A. Wheeler

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
  2015-03-09 15:02     ` David A. Wheeler
@ 2015-03-09 15:20       ` Corinna Vinschen
  0 siblings, 0 replies; 10+ messages in thread
From: Corinna Vinschen @ 2015-03-09 15:20 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 863 bytes --]

On Mar  9 10:46, David A. Wheeler wrote:
> Corinna Vinschen:
> > The problem is this.  How long do you want `ls -l' take?  Checking
> > permissions is awkward and lengthy on Windows, unless you have the
> > user's token.  The access check can be improved and the permissions
> > more correctly shown for the current user, but for any file and any
> > user account, it'd be a lot of time-consuming effort.
> 
> I expect that improving the emulation for just the "current user" would be useful.
> That is an *extremely* common situation.

I agree.  Right now, there's only a check against the owning group of
the file.  When I rewrite the ACL handling, I'll add tests along these
lines. 


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
  2015-03-09  9:12   ` Corinna Vinschen
  2015-03-09 15:02     ` David A. Wheeler
@ 2015-03-09 19:27     ` Achim Gratz
  2015-03-09 19:29       ` Corinna Vinschen
  1 sibling, 1 reply; 10+ messages in thread
From: Achim Gratz @ 2015-03-09 19:27 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> The problem is this.  How long do you want `ls -l' take?  Checking
> permissions is awkward and lengthy on Windows, unless you have the
> user's token.

The only token that's relevant for the ACL mapping w.r.t. POSIX
semantics is that of the current user and Cygwin should already have
that I think.  Plus the extra work only needs to be done when the file
is owned by that user and/or the egid is identical to the group of said
file.  In all other cases the normal ACL processing should actually
yield the same result as mandated by POSIX.

> The access check can be improved and the permissions more correctly
> shown for the current user, but for any file and any user account,
> it'd be a lot of time-consuming effort.

I'd say that Cygwin already does all of that, except for this special
handling of the file owner and group.  It already has to check who the
owner and group is, so that information is also there.  I'm not sure how
much more work it is to graft the permissions.


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

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
  2015-03-09 19:27     ` Achim Gratz
@ 2015-03-09 19:29       ` Corinna Vinschen
  2015-03-09 19:54         ` Achim Gratz
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2015-03-09 19:29 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]

On Mar  9 18:59, Achim Gratz wrote:
> Corinna Vinschen writes:
> > The problem is this.  How long do you want `ls -l' take?  Checking
> > permissions is awkward and lengthy on Windows, unless you have the
> > user's token.
> 
> The only token that's relevant for the ACL mapping w.r.t. POSIX
> semantics is that of the current user and Cygwin should already have
> that I think.  Plus the extra work only needs to be done when the file
> is owned by that user and/or the egid is identical to the group of said
> file.  In all other cases the normal ACL processing should actually
> yield the same result as mandated by POSIX.
> 
> > The access check can be improved and the permissions more correctly
> > shown for the current user, but for any file and any user account,
> > it'd be a lot of time-consuming effort.
> 
> I'd say that Cygwin already does all of that,

No, it doesn't.  Not for any arbitrary user, only for the current user.

>   It already has to check who the
> owner and group is, so that information is also there.  I'm not sure how
> much more work it is to graft the permissions.

A lot.  Cygwin has the owner and the primary group of the file, but
that doesn't mean it can check if the user is a member of the group or,
fwiw, any group in the ACL "just so".  Of course it *can* check that,
but that either requires to generate a user token for that user from
scratch, or it requires to fetch the group memberships of the user from
the Windows account DB.  In the second case there's no Windows function
to perform the check.  And for ACLs with multiple users the access
check would have to be performed for each user.

Btw., if you generate the permissions under Cygwin, a file with
---rwx--- permissions will have the matching deny ACE to make the
permissions the real thing.


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1
  2015-03-09 19:29       ` Corinna Vinschen
@ 2015-03-09 19:54         ` Achim Gratz
  0 siblings, 0 replies; 10+ messages in thread
From: Achim Gratz @ 2015-03-09 19:54 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> Btw., if you generate the permissions under Cygwin, a file with
> ---rwx--- permissions will have the matching deny ACE to make the
> permissions the real thing.

My problem (as stated before) is specifically with a file system that's
been set up so it leaves me the owner and also the correct group I've
worked with (Domain Users, mostly), but without the right to modify the
ACL and modes in any way.  All access rights (R/O and R/W) are conferred
by LDAP groups.  I guess if it would be possible to mount that dang
thing so it replaces the owner and group with something I would never
work with that would be a solution (besides mounting it noacl, of
course).


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-03-09 19:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 11:38 [ANNOUNCEMENT] Updated: Cygwin 1.7.35-1 Corinna Vinschen
2015-03-06 13:25 ` Achim Gratz
2015-03-07 10:48   ` Thomas Wolff
2015-03-07 10:59     ` Achim Gratz
2015-03-09  9:12   ` Corinna Vinschen
2015-03-09 15:02     ` David A. Wheeler
2015-03-09 15:20       ` Corinna Vinschen
2015-03-09 19:27     ` Achim Gratz
2015-03-09 19:29       ` Corinna Vinschen
2015-03-09 19:54         ` Achim Gratz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).