diff options
author | Robert Collins <rbtcollins@hotmail.com> | 2002-02-28 15:42:19 +0300 |
---|---|---|
committer | Robert Collins <rbtcollins@hotmail.com> | 2002-02-28 15:42:19 +0300 |
commit | bfba0ce445f9d2415e41a4067464ac6b65814245 (patch) | |
tree | f4b3678cd66b4965ce71932a3fc945b329c7ecdc /winsup/cygwin | |
parent | adbf54b0e04a2e6eb3833af122cdfd31952c86c4 (diff) |
2002-02-28 Robert Collins <rbtcollins@hotmail.com>
* fhandler_tty.cc (fhandler_tty_slave::open): More debugging.
(fhandler_tty_slave::read): Fix printf type for the handle.
* tty.cc (tty::common_init): Add a FIXME for security.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 12 | ||||
-rw-r--r-- | winsup/cygwin/include/fnmatch.h | 38 | ||||
-rw-r--r-- | winsup/cygwin/tty.cc | 3 |
4 files changed, 36 insertions, 23 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 95ee51d94..236125075 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2002-02-28 Robert Collins <rbtcollins@hotmail.com> + + * fhandler_tty.cc (fhandler_tty_slave::open): More debugging. + (fhandler_tty_slave::read): Fix printf type for the handle. + * tty.cc (tty::common_init): Add a FIXME for security. + 2002-01-29 Robert Collins <rbtcollins@hotmail.com> * Makefile.in (OBJS): Remove duplicate localtime.o. diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 05649125f..c3c1ba607 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -522,6 +522,7 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t) HANDLE tty_owner = OpenProcess (PROCESS_DUP_HANDLE, FALSE, get_ttyp ()->master_pid); + termios_printf ("tty own handle %p",tty_owner); if (tty_owner == NULL) { termios_printf ("can't open tty (%d) handle process %d", @@ -538,8 +539,6 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t) __seterrno (); return 0; } - termios_printf ("duplicated from_master %p->%p from tty_owner %p", - get_ttyp ()->from_master, from_master_local, tty_owner); if (!DuplicateHandle (tty_owner, get_ttyp ()->to_master, hMainProc, &to_master_local, 0, TRUE, @@ -549,11 +548,14 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t) __seterrno (); return 0; } - termios_printf ("duplicated to_master %p->%p from tty_owner %p", - get_ttyp ()->to_master, to_master_local, tty_owner); CloseHandle (tty_owner); } + termios_printf ("duplicated from_master %p->%p from tty_owner", + get_ttyp ()->from_master, from_master_local); + termios_printf ("duplicated to_master %p->%p from tty_owner", + get_ttyp ()->to_master, to_master_local); + set_io_handle (from_master_local); ProtectHandle1 (from_master_local, from_pty); set_output_handle (to_master_local); @@ -683,7 +685,7 @@ fhandler_tty_slave::read (void *ptr, size_t len) DWORD rc; HANDLE w4[2]; - termios_printf ("read(%x, %d) handle %d", ptr, len, get_handle ()); + termios_printf ("read(%x, %d) handle %p", ptr, len, get_handle ()); if (!(get_ttyp ()->ti.c_lflag & ICANON)) { diff --git a/winsup/cygwin/include/fnmatch.h b/winsup/cygwin/include/fnmatch.h index 70a5fec6d..e4500abe2 100644 --- a/winsup/cygwin/include/fnmatch.h +++ b/winsup/cygwin/include/fnmatch.h @@ -1,9 +1,9 @@ -/* $OpenBSD: fnmatch.h,v 1.5 2000/03/24 17:13:23 millert Exp $ */ -/* $NetBSD: fnmatch.h,v 1.5 1994/10/26 00:55:53 cgd Exp $ */ +/* $OpenBSD: fnmatch.h,v 1.5 2000/03/24 17:13:23 millert Exp $ */ +/* $NetBSD: fnmatch.h,v 1.5 1994/10/26 00:55:53 cgd Exp $ */ /*- * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -15,8 +15,8 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -33,29 +33,31 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93 + * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93 */ -#ifndef _FNMATCH_H_ -#define _FNMATCH_H_ +#ifndef _FNMATCH_H_ +#define _FNMATCH_H_ -#define FNM_NOMATCH 1 /* Match failed. */ -#define FNM_NOSYS 2 /* Function not supported (unused). */ +#define FNM_NOMATCH 1 /* Match failed. */ +#define FNM_NOSYS 2 /* Function not supported (unused). */ -#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ -#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ -#define FNM_PERIOD 0x04 /* Period must be matched by period. */ +#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ +#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ +#define FNM_PERIOD 0x04 /* Period must be matched by period. */ #ifndef _POSIX_SOURCE -#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */ -#define FNM_CASEFOLD 0x10 /* Case insensitive search. */ -#define FNM_IGNORECASE FNM_CASEFOLD -#define FNM_FILE_NAME FNM_PATHNAME +#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */ +#define FNM_CASEFOLD 0x10 /* Case insensitive search. */ +#define FNM_IGNORECASE FNM_CASEFOLD +#define FNM_FILE_NAME FNM_PATHNAME #endif #include <sys/cdefs.h> __BEGIN_DECLS -int fnmatch __P((const char *, const char *, int)); +int fnmatch __P((const char *, const char *, int)); __END_DECLS #endif /* !_FNMATCH_H_ */ + + diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 3e3a3c3b1..60e1857a6 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -395,6 +395,9 @@ tty::common_init (fhandler_pty_master *ptym) /* Allow the others to open us (for handle duplication) */ + /* FIXME: we shold NOT set the security wide open when the + daemon is running + */ if (wincap.has_security () && cygserver_running==CYGSERVER_OK && (SetKernelObjectSecurity (hMainProc, DACL_SECURITY_INFORMATION, get_null_sd ()) == FALSE)) |