diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-09-05 11:47:33 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-09-05 11:47:33 +0000 |
commit | bea3ef947a51f735d0cebb3099a5a34f44c1dd30 (patch) | |
tree | 7aab1dd8bf9df464da2e57e095895c7de6df6543 /winsup/cygwin/sec_auth.cc | |
parent | acc511d184cd702e171729771c80e62545f8e0b3 (diff) | |
download | cygnal-bea3ef947a51f735d0cebb3099a5a34f44c1dd30.tar.gz cygnal-bea3ef947a51f735d0cebb3099a5a34f44c1dd30.tar.bz2 cygnal-bea3ef947a51f735d0cebb3099a5a34f44c1dd30.zip |
* exception.h (class exception): Remove unnecessary #ifdef.
* uinfo.cc (client_request_pwdgrp::client_request_pwdgrp): Fix length
counter to include trailing NUL.
* sec_auth.cc (get_user_groups): Add experimental exception handler.
(get_user_local_groups): Ditto.
Diffstat (limited to 'winsup/cygwin/sec_auth.cc')
-rw-r--r-- | winsup/cygwin/sec_auth.cc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc index 3615588ef..eda0f826d 100644 --- a/winsup/cygwin/sec_auth.cc +++ b/winsup/cygwin/sec_auth.cc @@ -20,6 +20,7 @@ details. */ #include "fhandler.h" #include "dtable.h" #include "cygheap.h" +#include "exception.h" #include "ntdll.h" #include "tls_pbuf.h" #include <lm.h> @@ -255,9 +256,13 @@ get_user_groups (WCHAR *logonserver, cygsidlist &grp_list, DWORD cnt, tot, len; NET_API_STATUS ret; - /* Look only on logonserver */ - ret = NetUserGetGroups (logonserver, user, 0, (LPBYTE *) &buf, - MAX_PREFERRED_LENGTH, &cnt, &tot); + { + /* Experimental SEH */ + exception protect; + /* Look only on logonserver */ + ret = NetUserGetGroups (logonserver, user, 0, (LPBYTE *) &buf, + MAX_PREFERRED_LENGTH, &cnt, &tot); + } if (ret) { __seterrno_from_win_error (ret); @@ -306,9 +311,14 @@ get_user_local_groups (PWCHAR logonserver, PWCHAR domain, DWORD cnt, tot; NET_API_STATUS ret; - ret = NetUserGetLocalGroups (logonserver, user, 0, LG_INCLUDE_INDIRECT, - (LPBYTE *) &buf, MAX_PREFERRED_LENGTH, - &cnt, &tot); + { + /* Experimental SEH */ + exception protect; + + ret = NetUserGetLocalGroups (logonserver, user, 0, LG_INCLUDE_INDIRECT, + (LPBYTE *) &buf, MAX_PREFERRED_LENGTH, + &cnt, &tot); + } if (ret) { __seterrno_from_win_error (ret); |