diff options
Diffstat (limited to 'winsup/cygwin')
51 files changed, 75 insertions, 33 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5c555adcd..3058b3e6a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,13 @@ +Thu Jul 26 15:19:50 2001 Christopher Faylor <cgf@cygnus.com> + + Throughout, reorganize header file inclusion to put security.h prior to + fhandler.h. + * fhandler.h (fhandler_base::get_inheritance): New method. + * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper + close-on-exec inheritance when creating. + (fhandler_socket::check_peer_secret_event): Create handle as + non-inheritable. + 2001-07-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp> * syscalls.cc (setsid): Detach process from its console if the current diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 3ca185ad9..b974f7ace 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -11,9 +11,9 @@ #include "winsup.h" #include <string.h> #include <errno.h> -#include <fhandler.h> #include <assert.h> #include <stdlib.h> +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" @@ -22,7 +22,6 @@ #include "cygerrno.h" #include "sync.h" #include "shared_info.h" -#include "security.h" init_cygheap NO_COPY *cygheap; void NO_COPY *cygheap_max = NULL; diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 17bb90136..5c4a1a25d 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -24,6 +24,7 @@ details. */ #include "cygerrno.h" #define NEED_VFORK #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "path.h" @@ -34,7 +35,6 @@ details. */ #include "cygwin_version.h" #include "dll_init.h" #include "host_dependent.h" -#include "security.h" #define MAX_AT_FILE_LEVEL 10 diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index db11c8fdd..ae6c35288 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -21,10 +21,10 @@ details. */ #include "sigproc.h" #include "pinfo.h" #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "perprocess.h" #include "path.h" -#include "security.h" #include "dtable.h" #include "cygheap.h" diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc index 39add1dbc..69716cc8a 100644 --- a/winsup/cygwin/dlfcn.cc +++ b/winsup/cygwin/dlfcn.cc @@ -13,6 +13,7 @@ details. */ #include <stdlib.h> #include <unistd.h> #include <ctype.h> +#include "security.h" #include "fhandler.h" #include "perprocess.h" #include "path.h" diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index cc16fdada..fccdefb00 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -26,6 +26,7 @@ details. */ #include "pinfo.h" #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "dtable.h" diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 1135bfbba..9f98f7098 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -19,6 +19,7 @@ details. */ #include "sigproc.h" #include "pinfo.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "cygerrno.h" diff --git a/winsup/cygwin/exec.cc b/winsup/cygwin/exec.cc index e7131ccde..eeec1ab1c 100644 --- a/winsup/cygwin/exec.cc +++ b/winsup/cygwin/exec.cc @@ -14,6 +14,7 @@ details. */ #include <errno.h> #include <process.h> #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "sync.h" diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index cd624d179..4eed55fb6 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -11,6 +11,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ #include "winsup.h" +#include "security.h" #include "fhandler.h" #include "sync.h" #include "sigproc.h" diff --git a/winsup/cygwin/fcntl.cc b/winsup/cygwin/fcntl.cc index 02e673692..c61ec3bd6 100644 --- a/winsup/cygwin/fcntl.cc +++ b/winsup/cygwin/fcntl.cc @@ -13,6 +13,7 @@ details. */ #include <stdarg.h> #include <errno.h> #include <unistd.h> +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index e30348ac8..01e8e1da3 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -17,13 +17,13 @@ details. */ #include <signal.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" #include "path.h" #include "shared_info.h" #include "host_dependent.h" -#include "security.h" static NO_COPY const int CHUNK_SIZE = 1024; /* Used for crlf conversions */ diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index ca95bc03f..57a55e524 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -221,6 +221,14 @@ public: int get_close_on_exec () { return FHISSETF (CLOEXEC); } int set_close_on_exec_flag (int b) { return FHCONDSETF (b, CLOEXEC); } + LPSECURITY_ATTRIBUTES get_inheritance (bool all = 0) + { + if (all) + return get_close_on_exec () ? &sec_all_nih : &sec_all; + else + return get_close_on_exec () ? &sec_none_nih : &sec_none; + } + void set_check_win95_lseek_bug (int b = 1) { FHCONDSETF (b, W95LSBUG); } int get_check_win95_lseek_bug () { return FHISSETF (W95LSBUG); } diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc index 381f25066..ad7ec8733 100644 --- a/winsup/cygwin/fhandler_clipboard.cc +++ b/winsup/cygwin/fhandler_clipboard.cc @@ -15,11 +15,12 @@ details. */ #include <stdlib.h> #include <errno.h> #include <unistd.h> -#include "cygerrno.h" -#include "fhandler.h" #include <windows.h> #include <wingdi.h> #include <winuser.h> +#include "cygerrno.h" +#include "security.h" +#include "fhandler.h" /* * Robert Collins: diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index f90f37069..f4b0a0c92 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -22,6 +22,7 @@ details. */ #include <ctype.h> #include <sys/cygwin.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" @@ -29,7 +30,6 @@ details. */ #include "sigproc.h" #include "pinfo.h" #include "shared_info.h" -#include "security.h" #define CONVERT_LIMIT 4096 diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc index 5c9b2f918..914caeec8 100644 --- a/winsup/cygwin/fhandler_dsp.cc +++ b/winsup/cygwin/fhandler_dsp.cc @@ -13,12 +13,13 @@ details. */ #include "winsup.h" #include <stdio.h> #include <errno.h> -#include "cygerrno.h" -#include "fhandler.h" #include <windows.h> #include <sys/soundcard.h> #include <sys/fcntl.h> #include <mmsystem.h> +#include "cygerrno.h" +#include "security.h" +#include "fhandler.h" //------------------------------------------------------------------------ // Simple encapsulation of the win32 audio device. diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc index 5a2c67cdc..01fecd24f 100644 --- a/winsup/cygwin/fhandler_floppy.cc +++ b/winsup/cygwin/fhandler_floppy.cc @@ -14,9 +14,10 @@ details. */ #include <fcntl.h> #include <errno.h> #include <unistd.h> +#include <winioctl.h> +#include "security.h" #include "fhandler.h" #include "cygerrno.h" -#include <winioctl.h> /**********************************************************************/ /* fhandler_dev_floppy */ diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc index 78faf4e0b..08ea95de6 100644 --- a/winsup/cygwin/fhandler_mem.cc +++ b/winsup/cygwin/fhandler_mem.cc @@ -16,6 +16,7 @@ #include <ntdef.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "ntdll.h" diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_random.cc index b6b8a3ade..59034ed02 100644 --- a/winsup/cygwin/fhandler_random.cc +++ b/winsup/cygwin/fhandler_random.cc @@ -14,6 +14,7 @@ details. */ #include <errno.h> #include <limits.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #define RANDOM 8 diff --git a/winsup/cygwin/fhandler_raw.cc b/winsup/cygwin/fhandler_raw.cc index 9fc6dffbf..a5befb6b5 100644 --- a/winsup/cygwin/fhandler_raw.cc +++ b/winsup/cygwin/fhandler_raw.cc @@ -18,6 +18,7 @@ #include <sys/mtio.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index dc8b9dc1d..20ad4d8e1 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -14,11 +14,11 @@ details. */ #include <unistd.h> #include <stdlib.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "sync.h" #include "sigproc.h" #include "pinfo.h" -#include "security.h" #include <sys/termios.h> /**********************************************************************/ diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 974f2de68..13cbe9f49 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -23,6 +23,7 @@ #define USE_SYS_TYPES_FD_SET #include <winsock2.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" @@ -98,7 +99,7 @@ fhandler_socket::create_secret_event (int* secret) __small_sprintf (buf, SECRET_EVENT_NAME, sin.sin_port, secret_ptr [0], secret_ptr [1], secret_ptr [2], secret_ptr [3]); - secret_event = CreateEvent ( NULL, FALSE, FALSE, buf); + secret_event = CreateEvent (get_inheritance (), FALSE, FALSE, buf); if (!secret_event && GetLastError () == ERROR_ALREADY_EXISTS) secret_event = OpenEvent (EVENT_ALL_ACCESS, FALSE, buf); @@ -133,7 +134,7 @@ fhandler_socket::check_peer_secret_event (struct sockaddr_in* peer, int* secret) __small_sprintf (buf, SECRET_EVENT_NAME, peer->sin_port, secret_ptr [0], secret_ptr [1], secret_ptr [2], secret_ptr [3]); - ev = CreateEvent (NULL, FALSE, FALSE, buf); + ev = CreateEvent (&sec_none_nih, FALSE, FALSE, buf); if (!ev && GetLastError () == ERROR_ALREADY_EXISTS) { debug_printf ("%s event already exist"); diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc index 46e6c861e..87328af58 100644 --- a/winsup/cygwin/fhandler_tape.cc +++ b/winsup/cygwin/fhandler_tape.cc @@ -14,10 +14,10 @@ details. */ #include <fcntl.h> #include <errno.h> #include <unistd.h> - #include <sys/mtio.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 47ed3ce77..606c689ca 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -15,6 +15,7 @@ details. */ #include <errno.h> #include <ctype.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "sync.h" #include "sigproc.h" diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index c866e5357..7edc3644e 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -17,6 +17,7 @@ details. */ #include <ctype.h> #include <limits.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "sync.h" diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc index c5f5e0763..3588dfff1 100644 --- a/winsup/cygwin/fhandler_windows.cc +++ b/winsup/cygwin/fhandler_windows.cc @@ -16,6 +16,7 @@ details. */ #include <wingdi.h> #include <winuser.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" /* diff --git a/winsup/cygwin/fhandler_zero.cc b/winsup/cygwin/fhandler_zero.cc index bef73f0fc..452ba757b 100644 --- a/winsup/cygwin/fhandler_zero.cc +++ b/winsup/cygwin/fhandler_zero.cc @@ -12,6 +12,7 @@ details. */ #include "winsup.h" #include <errno.h> +#include "security.h" #include "fhandler.h" fhandler_dev_zero::fhandler_dev_zero (const char *name) diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 4e3c32668..91f27eae1 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -15,6 +15,7 @@ details. */ #include <fcntl.h> #include <stdarg.h> #include <errno.h> +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygerrno.h" @@ -27,7 +28,6 @@ details. */ #include "perthread.h" #include "perprocess.h" #include "dll_init.h" -#include "security.h" #ifdef DEBUGGING static int npid = 0; diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 32dc6d0a3..3e0ab3e88 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -20,11 +20,11 @@ details. */ #include "sync.h" #include "sigproc.h" #include "pinfo.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" #include "cygerrno.h" -#include "security.h" /* Read /etc/group only once for better performance. This is done on the first call that needs information from it. */ diff --git a/winsup/cygwin/ioctl.cc b/winsup/cygwin/ioctl.cc index 93870444d..217bbf2fd 100644 --- a/winsup/cygwin/ioctl.cc +++ b/winsup/cygwin/ioctl.cc @@ -15,6 +15,7 @@ details. */ #include <sys/ioctl.h> #include <errno.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc index fd1653a3e..43bb0c52a 100644 --- a/winsup/cygwin/malloc_wrapper.cc +++ b/winsup/cygwin/malloc_wrapper.cc @@ -14,6 +14,7 @@ details. */ #include "winsup.h" #include <stdlib.h> #include <assert.h> +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 78e60f121..5d8580a8d 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -14,6 +14,7 @@ details. */ #include <stddef.h> #include <sys/mman.h> #include <errno.h> +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygerrno.h" @@ -21,7 +22,6 @@ details. */ #include "sync.h" #include "sigproc.h" #include "pinfo.h" -#include "security.h" #include "sys/cygwin.h" #define PAGE_CNT(bytes) howmany(bytes,getpagesize()) diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 04b30fd54..c3b1e355a 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -26,6 +26,7 @@ details. */ #include <winsock2.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "dtable.h" diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index c417e34fd..f29eb2018 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -14,13 +14,13 @@ details. */ #include <stdio.h> #include <errno.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "sync.h" #include "sigproc.h" #include "pinfo.h" #include "cygheap.h" -#include "security.h" #include <sys/termios.h> /* Read /etc/passwd only once for better performance. This is done diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 8c1469470..575d64f98 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -65,6 +65,7 @@ details. */ #include <cygwin/version.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "sync.h" @@ -74,7 +75,6 @@ details. */ #include "cygheap.h" #include "shared_info.h" #include "registry.h" -#include "security.h" #include <assert.h> #include "shortcut.h" diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 996137a3c..ae3e68ec8 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -13,6 +13,7 @@ details. */ #include <time.h> #include <errno.h> #include <limits.h> +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygerrno.h" @@ -22,7 +23,6 @@ details. */ #include "cygwin_version.h" #include "perprocess.h" #include "environ.h" -#include "security.h" #include <assert.h> #include <ntdef.h> #include "ntdll.h" diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 37aaaa856..e111ba1a8 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -13,11 +13,11 @@ details. */ #include <sys/fcntl.h> #include <errno.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" #include "thread.h" -#include "security.h" static int make_pipe (int fildes[2], unsigned int psize, int mode) diff --git a/winsup/cygwin/poll.cc b/winsup/cygwin/poll.cc index 4a216ad63..eed46236c 100644 --- a/winsup/cygwin/poll.cc +++ b/winsup/cygwin/poll.cc @@ -12,6 +12,7 @@ #include <sys/time.h> #include <sys/poll.h> #include <errno.h> +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 6b9b7cc31..2b2ee744e 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -25,6 +25,7 @@ details. */ #include <winuser.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "dtable.h" @@ -32,7 +33,6 @@ details. */ #include "sigproc.h" #include "pinfo.h" #include "cygheap.h" -#include "security.h" static int searchace (aclent_t *aclp, int nentries, int type, int id = -1) diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index 6a6867c48..925a6b237 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -26,6 +26,7 @@ details. */ #include <wininet.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "dtable.h" @@ -33,7 +34,6 @@ details. */ #include "sigproc.h" #include "pinfo.h" #include "cygheap.h" -#include "security.h" SID_IDENTIFIER_AUTHORITY sid_auth[] = { {SECURITY_NULL_SID_AUTHORITY}, diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index dd9b37b74..b55582bd4 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -30,6 +30,7 @@ details. */ #include <subauth.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "dtable.h" @@ -37,7 +38,6 @@ details. */ #include "sigproc.h" #include "pinfo.h" #include "cygheap.h" -#include "security.h" #include <ntdef.h> #include "ntdll.h" #include "lm.h" diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 3716a7932..cfccd8563 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -34,6 +34,7 @@ details. */ #include <winsock.h> #include "select.h" #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index 5419fa4d5..309965c00 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -17,6 +17,7 @@ details. */ #include "sync.h" #include "sigproc.h" #include "pinfo.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" @@ -24,7 +25,6 @@ details. */ #include "shared_info.h" #include "registry.h" #include "cygwin_version.h" -#include "security.h" #define SHAREDVER (unsigned)(cygwin_version.api_major << 16 | \ cygwin_version.api_minor) diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 051e62eb2..768d6f1fd 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -21,6 +21,7 @@ details. */ #include "sync.h" #include "sigproc.h" #include "pinfo.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" @@ -28,7 +29,6 @@ details. */ #include "perthread.h" #include <assert.h> #include "shared_info.h" -#include "security.h" /* * Convenience defines diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 1603f446a..462cea7aa 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -22,6 +22,7 @@ details. */ #include "cygerrno.h" #include <sys/cygwin.h> #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "dtable.h" @@ -35,7 +36,6 @@ details. */ #include "perthread.h" #include "registry.h" #include "environ.h" -#include "security.h" #define LINE_BUF_CHUNK (MAX_PATH * 2) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 7e37278da..6cf832b8c 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -28,6 +28,7 @@ details. */ #include <sys/cygwin.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "dtable.h" @@ -36,7 +37,6 @@ details. */ #include "pinfo.h" #include <unistd.h> #include "shared_info.h" -#include "security.h" #include "cygheap.h" extern int normalize_posix_path (const char *, char *); diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc index 0377a9747..ab7e8c401 100644 --- a/winsup/cygwin/sysconf.cc +++ b/winsup/cygwin/sysconf.cc @@ -14,6 +14,7 @@ details. */ #include <time.h> #include <limits.h> #include <ntdef.h> +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc index e728dfeb3..383848372 100644 --- a/winsup/cygwin/syslog.cc +++ b/winsup/cygwin/syslog.cc @@ -14,6 +14,7 @@ details. */ #include <syslog.h> #include <stdarg.h> #include <unistd.h> +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygerrno.h" diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc index 63c483bf0..defea6a53 100644 --- a/winsup/cygwin/termios.cc +++ b/winsup/cygwin/termios.cc @@ -15,10 +15,11 @@ details. */ #include <errno.h> #include <signal.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" -#include <cygwin/version.h> +#include "cygwin/version.h" #include "perprocess.h" #include <sys/termios.h> diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 365b3bba2..0a994a0b3 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -18,12 +18,12 @@ details. */ #include <errno.h> #include "cygerrno.h" #include "perprocess.h" +#include "security.h" #include "fhandler.h" #include "path.h" #include "sync.h" #include "sigproc.h" #include "pinfo.h" -#include "security.h" #define FACTOR (0x19db1ded53e8000LL) #define NSPERSEC 10000000LL diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 1e4fd3685..f04fea233 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -16,6 +16,7 @@ details. */ #include <winuser.h> #include <sys/cygwin.h> #include "cygerrno.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" @@ -23,7 +24,6 @@ details. */ #include "sigproc.h" #include "pinfo.h" #include "shared_info.h" -#include "security.h" extern fhandler_tty_master *tty_master; diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 6f73fbf1e..6d82b753c 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -21,11 +21,11 @@ details. */ #include "sync.h" #include "sigproc.h" #include "pinfo.h" +#include "security.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" #include "registry.h" -#include "security.h" struct passwd * internal_getlogin (cygheap_user &user) |