summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/security.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-07-26 04:53:59 +0000
committerChristopher Faylor <me@cgf.cx>2003-07-26 04:53:59 +0000
commitdf04ae29b258b89bbd4991bd862a03ac56430e4e (patch)
treef853669603e469c7c37bc4c829a247b16958464f /winsup/cygwin/security.cc
parentddb67621550071ee1472cb114704af155d46365b (diff)
downloadcygnal-df04ae29b258b89bbd4991bd862a03ac56430e4e.tar.gz
cygnal-df04ae29b258b89bbd4991bd862a03ac56430e4e.tar.bz2
cygnal-df04ae29b258b89bbd4991bd862a03ac56430e4e.zip
* exceptions.cc (ctrl_c_handler): Send SIGHUP when events occur only if there
is a tty associated with the process. Send SIGHUP on CTRL_LOGOFF_EVENT. * fhandler_tty.cc (fhandler_tty_slave::open): Adjust console open handle counter regardless of whether this is a pty or tty. (fhandler_tty_slave::open): Ditto. (fhandler_tty_slave::dup): Ditto. (fhandler_tty_common::set_close_on_exec): Ditto. (fhandler_tty_master::init_console): Decrement console open handle counter after init since it will now be handled by all tty open. * syscalls.cc (setsid): Rework debugging output slightly.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r--winsup/cygwin/security.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
index 0310f5c8b..d76964f91 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/security.cc
@@ -757,7 +757,7 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, BOOL *pintern)
debug_printf ("GetTokenInformation(my_token, TokenGroups): %E");
else if (!groups.issetgroups ()) /* setgroups was never called */
ret = sid_in_token_groups (my_grps, groups.pgsid)
- || groups.pgsid == usersid;
+ || groups.pgsid == usersid;
else /* setgroups was called */
{
struct __group32 *gr;
@@ -1430,15 +1430,15 @@ get_nt_object_attribute (HANDLE handle, SE_OBJECT_TYPE object_type,
psd = (PSECURITY_DESCRIPTOR) & sd_buf[0];
DWORD len = sizeof (sd_buf);
if (ERROR_SUCCESS != RegGetKeySecurity ((HKEY) handle,
- DACL_SECURITY_INFORMATION |
- GROUP_SECURITY_INFORMATION |
- OWNER_SECURITY_INFORMATION,
- psd, &len))
- {
- __seterrno ();
- debug_printf ("RegGetKeySecurity %E");
- psd = NULL;
- }
+ DACL_SECURITY_INFORMATION |
+ GROUP_SECURITY_INFORMATION |
+ OWNER_SECURITY_INFORMATION,
+ psd, &len))
+ {
+ __seterrno ();
+ debug_printf ("RegGetKeySecurity %E");
+ psd = NULL;
+ }
}
else
{
@@ -1447,7 +1447,7 @@ get_nt_object_attribute (HANDLE handle, SE_OBJECT_TYPE object_type,
GROUP_SECURITY_INFORMATION |
OWNER_SECURITY_INFORMATION,
NULL, NULL, NULL, NULL, &psd))
- {
+ {
__seterrno ();
debug_printf ("GetSecurityInfo %E");
psd = NULL;