]> sourceware.org Git - newlib-cygwin.git/commitdiff
* uinfo.cc (pwdgrp::fetch_account_from_windows): Disallow user accounts
authorCorinna Vinschen <corinna@vinschen.de>
Sun, 31 Aug 2014 19:33:19 +0000 (19:33 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Sun, 31 Aug 2014 19:33:19 +0000 (19:33 +0000)
as groups.  Add comment.

winsup/cygwin/ChangeLog
winsup/cygwin/uinfo.cc

index 3abdc0c822601671c39ec2551ea581ef1146a092..8650c1a8bc21616d4d3f4804db33228d2e126087 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-31  Corinna Vinschen  <corinna@vinschen.de>
+
+       * uinfo.cc (pwdgrp::fetch_account_from_windows): Disallow user accounts
+       as groups.  Add comment.
+
 2014-08-31  Corinna Vinschen  <corinna@vinschen.de>
 
        * uinfo.cc (cygheap_pwdgrp::init): Fix comment.  Rearrange code for
index 4dff53ade7e2de15e4c0b19fd47be7ec8241472f..6d1b5b7a838deead6082ebe989ee39efb6b03d67 100644 (file)
@@ -1504,6 +1504,13 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
       switch (acc_type)
        {
        case SidTypeUser:
+         /* Don't allow users as group.  While this is technically possible,
+            it doesn't make sense in a POSIX scenario.  It *is* used for
+            Microsoft Accounts, but those are converted to well-known groups
+            above. */
+         if (is_group ())
+           return NULL;
+         /*FALLTHRU*/
        case SidTypeGroup:
        case SidTypeAlias:
          /* Predefined alias? */
This page took 0.034617 seconds and 5 git commands to generate.