summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * autoload.cc (NtQueryVolumeInformationFile): Add.Corinna Vinschen2005-04-126-66/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fhandler.cc (fhandler_base::raw_write): Don't touch has_changed flag. * fhandler.h (enum change_state): Remove. (fhandler_base::status): Revert has_changed to a simple bit. (fhandler_base::fstat_helper): Add nAllocSize parameter. Rename ftCreationTime to ftChangeTime. * fhandler_disk_file.cc: Call fstat_helper with additional allocation size throughout. (fhandler_base::fstat_by_handle): Use NT native functions to get full file information on NT. Call fstat_helper with LastWriteTime as ctime, if ChangeTime is not available. (fhandler_base::fstat_by_name): Call fstat_helper with LastWriteTime as ctime. (fhandler_base::fstat_helper): Add comment. Drop special FAT handling since it's useless. Use nAllocSize for st_blocks if available. (fhandler_disk_file::touch_ctime): Only touch LastWriteTime. (fhandler_disk_file::fchmod): Set has_changed on 9x only. (fhandler_disk_file::fchown): Don't set has_changed. (fhandler_disk_file::facl): Ditto. (fhandler_disk_file::ftruncate): Ditto. (fhandler_disk_file::link): Set has_changed on 9x only and on original file only. (fhandler_base::open_fs): Don't set has_changed in O_TRUNC case. * ntdll.h (FILE_BASIC_INFORMATION): Define. (FILE_STANDARD_INFORMATION): Define. (FILE_INTERNAL_INFORMATION): Define. (FILE_EA_INFORMATION): Define. (FILE_ACCESS_INFORMATION): Define. (FILE_POSITION_INFORMATION): Define. (FILE_MODE_INFORMATION): Define. (FILE_ALIGNMENT_INFORMATION): Define. (FILE_NAME_INFORMATION): Don't define with arbitrary FileName size. (FILE_ALL_INFORMATION): Define. (FILE_INFORMATION_CLASS): Add FileAllInformation. (FILE_FS_VOLUME_INFORMATION): Define. (FS_INFORMATION_CLASS): Define. (NtQueryVolumeInformationFile): Define.
* Fix ChangeLog entry.Corinna Vinschen2005-04-111-1/+1
|
* Revert previous patch.Corinna Vinschen2005-04-115-29/+37
| | | | | | | * autoload.cc (GetVolumePathNamesForVolumeNameA): Remove. * autoload.cc (GetVolumeNameForVolumeMountPointA): Add. * syscalls.cc (sync): Rewrite guid case to skip floppies also on Windows 2000.
* * syscalls.cc (sync): Use renamed has_get_volume_pathnames wincap.Corinna Vinschen2005-04-114-15/+23
| | | | | | | * wincap.h (wincaps::has_get_volume_pathnames): Rename from has_guid_volumes * wincap.cc: Accomodate above rename throughout. Set to false on Windows 2000.
* * pipe.cc (fhandler_pipe::open): Remove O_CREAT limitation.Christopher Faylor2005-04-082-6/+5
|
* * syslog.cc (try_connect_guard): Remove useless conditionalized code.Corinna Vinschen2005-04-072-4/+4
|
* * syslog.cc: Include sys/socket.h.Corinna Vinschen2005-04-073-3/+153
| | | | | | | | | | | | | | | | | (try_connect_guard): New static variable. (syslogd_inited): Ditto. (syslogd_sock): Ditto. (try_connect_syslogd): New function to connect and write syslog to local syslogd. (vsyslog): Log to stderr if LOG_PERROR flag has been given to openlog. Try logging to syslogd. Use Event Log resp. log file as fallback. (closelog): Close socket to syslogd. * include/sys/syslog.h (_PATH_LOG): Define. (INTERNAL_NOPRI): Define if SYSLOG_NAMES is defined. (INTERNAL_MARK): Ditto. (struct _code): Ditto. (prioritynames): Ditto. (facilitynames): Ditto.
* * fhandler_socket.cc (get_inet_addr): Add type parameter to returnCorinna Vinschen2005-04-062-4/+28
| | | | | | | | unix socket type. Read socket type from unix socket file. (fhandler_socket::bind): Write socket type to unix socket file. (fhandler_socket::connect): Return with errno EPROTOTYPE if socket type of socket doesn't match socket type of unix socket trying to connect to.
* * security.h (cygsidlist::addfromgr): Avoid duplicate entries.Corinna Vinschen2005-04-063-11/+15
| | | | | * grp.cc (initgrousp): Add syscall_printf. (setgroups): Add syscall_printf and make sure sids are added only once.
* * net.cc (cygwin_getservbyname): Return (possibly NULL) return value of dup_entChristopher Faylor2005-04-062-11/+21
| | | | | | | rather than assuming that tls buffer is valid. (cygwin_getservbyport): Ditto. (cygwin_gethostbyname): Ditto. (cygwin_gethostbyaddr): Ditto.
* * cygtls.cc (_cygtls::remove): Don't free or close stuff if we're being calledChristopher Faylor2005-04-052-9/+17
| | | | in a "non-standard" way.
* * sync.h (muto::initforce): Delete flawed implementation.Christopher Faylor2005-04-055-5/+12
| | | | | * pwdgrp.h (pwdgrp::pglock): Make static. * grp.cc (pwdgrp::pwdgrp): Eliminate use of initforce.
* * sync.h (muto::initforce): Force initialization even when name != NULL.Christopher Faylor2005-04-053-2/+10
| | | | | * grp.cc (pwdgrp::pwdgrp): Use initforce since the enclosing structure is !NO_COPY.
* * sync.h (muto::operator int): New operator.Christopher Faylor2005-04-0519-118/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (locker): Remove unused class. (new_muto): Delete. (new_muto1): Ditto. (new_muto_name): Ditto. * cygheap.cc (cygheap_setup_for_child): Reflect use of static storage for muto rather than pointer. (_csbrk): Ditto. (_cmalloc): Ditto. (_cmalloc): Ditto. (_cfree): Ditto. * cygheap.h (cwdstuff::cwd_lock): Ditto. (cwdstuff::get_drive): Ditto. * cygmalloc.h (__malloc_lock): Ditto. (__malloc_unlock): Ditto. * cygtls.cc (sentry::lock): Ditto. (sentry::sentry): Ditto. (~sentry): Ditto. (_cygtls::init): Ditto. * dcrt0.cc: Ditto. (cygwin_atexit): Ditto. (cygwin_exit): Ditto. * debug.cc (lock_debug::locker): Ditto. (lock_debug::lock_debug): Ditto. (lock_debug::unlock): Ditto. (debug_init): Ditto. * dtable.cc (dtable::init_lock): Ditto. * dtable.h (dtable::lock_cs): Ditto. (dtable::lock): Ditto. (dtable::unlock): Ditto. * exceptions.cc (mask_sync): Ditto. (sighold): Ditto. (set_process_mask_delta): Ditto. (set_signal_mask): Ditto. (events_init): Ditto. * grp.cc (pwdgrp::pwdgrp): Ditto. * malloc_wrapper.cc (mallock): Ditto. (malloc_init): Ditto. * path.cc (cwdstuff::cwd_lock): Ditto. (cwdstuff::get_hash): Ditto. (cwdstuff::get_hash): Ditto. (cwdstuff::init): Ditto. (cwdstuff::set): Ditto. (cwdstuff::get): Ditto. * pwdgrp.h (pwdgrp::pglock): Ditto. (pwdgrp::refresh): Ditto. * sigproc.cc (sync_proc_subproc): Ditto. (get_proc_lock): Ditto. (proc_subproc): Ditto. (_cygtls::remove_wq): Ditto. (proc_terminate): Ditto. (sigproc_init): Ditto. * timer.cc (lock_timer_tracker::protect): Ditto. (lock_timer_tracker::lock_timer_tracker): Ditto. (lock_timer_tracker::~lock_timer_tracker): Ditto. * wininfo.cc (wininfo::_lock;): Ditto. (wininfo::winthread): Ditto. (operator HWND): Ditto. (wininfo::lock): Ditto. (wininfo::release): Ditto. * wininfo.h (wininfo::_lock;): Ditto.
* * path.cc (path_conv::check): Only check for PC_NO_ACCESS_CHECK in endChristopher Faylor2005-04-042-3/+8
| | | | component.
* * dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges on 9x.Corinna Vinschen2005-04-045-22/+52
| | | | | | | | | | | | | | | | | * fhandler.h (enum change_state): Add. (fhandler_base::status): Add a bit to has_changed flag. (fhandler_base::has_changed): Implement with type change_state. * fhandler.cc (fhandler_base::raw_write): Accomodate type change of has_changed. * fhandler_disk_file.cc )fhandler_disk_file::touch_ctime): Also touch modification time if has_changed == data_changed. (fhandler_disk_file::fchmod): Also open on 9x, otherwise we can't touch ctime. Accomodate type change of has_changed. (fhandler_disk_file::fchown): Accomodate type change of has_changed. (fhandler_disk_file::facl): Ditto. (fhandler_disk_file::ftruncate): Ditto. (fhandler_disk_file::link): Ditto. (fhandler_base::open_fs): Ditto.
* * cygheap.cc (cygheap_init): Accomodate set_process_privilege change.Corinna Vinschen2005-04-0318-287/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygheap.h (cygheap_user::curr_primary_token): New member. (cygheap_user::primary_token): New method. (cygheap_user::deimpersonate): Always revert to processes' impersonation token. (cygheap_user::reimpersonate): Set processes' or setuid token as necessary. (cygheap_user::has_impersonation_tokens): Look for curr_primary_token value. (cygheap_user::close_impersonation_tokens): Close curr_primary_token here if necessary. Don't reset token values to NO_IMPERSONATION since that's done in uinfo_init anyway. (init_cygheap::luid): New LUID array keeping privilege LUIDs. * cygtls.cc (_cygtls::init_thread): Call cygheap->user.reimpersonate. * dcrt0.cc (hProcToken): New global variable to keep process token. (hProcImpToken): Ditto for process impersonation token. (dll_crt0_0): Open process token here once. Duplicate to create hProcImpToken. (dll_crt0_1): Call set_cygwin_privileges. * environ.cc (allow_ntea): Drop duplicate declaration. (allow_smbntsec): Ditto. (set_traverse): Only set allow_traverse here. (environ_init): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Drop call to enable_restore_privilege. (fhandler_disk_file::fchown): Ditto. (fhandler_disk_file::facl): Ditto. * fork.cc (fork_child): Move call to cygheap->user.reimpersonate after syn with parent. Call set_cygwin_privileges. * grp.cc (internal_getgroups): Use hProcImpToken instead of opening process token. * path.cc (fs_info::update): Bypass traverse checking when retrieving volume information using push/pop_thread_privileges. * registry.cc (load_registry_hive): Drop setting restore privilege since it's already set if available. * sec_helper.cc: Include cygtls.h. (cygpriv): Privilege string array. (privilege_luid): New function, evaluate LUID from cygpriv_idx. (privilege_luid_by_name): New function, evaluate LUID from privilege string. (privilege_name): New function, evaluate privilege string from cygpriv_idx. (set_privilege): New static function called by set_process_privilege and set_thread_privilege. Call privilege_luid to get privilege LUID. Fix bug in return value evaluation. Improve debug output. (set_cygwin_privileges): New function. (set_process_privilege): Remove. (enable_restore_privilege): Remove. * security.cc (allow_traverse): New global variable. (sys_privs): Change type to cygpriv_idx and store privilege indices instead of strings. (SYSTEM_PRIVILEGES_COUNT): Renamed from SYSTEM_PERMISSION_COUNT. (get_system_priv_list): Don't use numerical constant in malloc call. Use privilege_luid to get privilege LUIDs. (get_priv_list): Call privilege_luid_by_name to get LUIDs. Improve inner privilege LUID comparison loop. (create_token): Enable create token privilege using push/pop_self_privileges. Use hProcToken instead of opening process token. Use default DACL when duplicating token. (subauth): Enable tcb privilege using push/pop_self_privileges. Use sec_none instead of homw made security attributes when duplicating token. (check_file_access): Don't duplicate access token, use active impersonation token as is. * security.h (enum cygpriv_idx): New enumeration type enumerating possible privileges. (privilege_luid): Declare new function. (privilege_luid_by_name): Ditto. (privilege_name): Ditto. (allow_traverse): Declare. (set_privilege): Declare function. (set_process_privilege): Define as macro. (enable_restore_privilege): Remove declaration. (_push_thread_privilege): Define macro. (push_thread_privilege): Ditto. (pop_thread_privilege): Ditto. (pop_self_privilege): Ditto. * spawn.cc (spawn_guts): Use cygheap->user.primary_token instead of cygheap->user.token. * syscalls.cc (statvfs): Bypass traverse checking when retrieving volume information using push/pop_thread_privileges. Rearrange code to simplify push/pop bracketing. (seteuid32): Use hProcToken instead of opening process token. Call cygheap->user.deimpersonate instead of RevertToSelf. Create impersonation token from primary internal or external token. Set cygheap->user.curr_primary_token and cygheap->user.current_token privileges once here. Drop "failed" and "failed_ptok" labels. Drop setting DefaultDacl of process token. (setegid32): Use hProcToken and hProcImpToken instead of opening process token. Always reimpersonate afterwards. * uinfo.cc (cygheap_user::init): Use hProcToken instead of opening process token. (internal_getlogin): Ditto. Set hProcImpToken, too. (uinfo_init): Initialize cygheap->user.curr_primary_token. * winsup.h (hProcToken): Declare. (hProcImpToken): Declare.
* Unify usage of CYG_MAX_PATH throughout. Change buffers fromCorinna Vinschen2005-04-0315-35/+41
| | | | | size CYG_MAX_PATH + 1 to CYG_MAX_PATH. Change length tests accordingly.
* * include/cygwin/version.h: Bump DLL minor number to 15.Christopher Faylor2005-04-022-1/+5
|
* * fork.cc (fork_child): Add missing __stdcall.Corinna Vinschen2005-04-012-1/+5
|
* * sigproc.cc (create_signal_arrive): New (temporary?) function to createChristopher Faylor2005-04-013-10/+27
| | | | | | signal_arrived event. (sigproc_init): Use create_signal_arrived. * fork.cc (fork_child): Create signal_arrived early.
* * fork.cc (fork_child): Fixup SYSV IPC shared memory before fixingCorinna Vinschen2005-04-012-5/+16
| | | | up fdtab.
* * gentls_offsets: Add '-m32' flag to native compiler call to satisfyCorinna Vinschen2005-03-312-2/+7
| | | | cross platform builds.
* * errno.cc (NO_SYSTEM_RESOURCES): Map to EAGAIN.Corinna Vinschen2005-03-302-0/+15
| | | | | | | | (NONPAGED_SYSTEM_RESOURCES): Ditto. (PAGED_SYSTEM_RESOURCES): Ditto. (WORKING_SET_QUOTA): Ditto. (PAGEFILE_QUOTA): Ditto. (COMMITMENT_LIMIT): Ditto.
* * environ.cc (spenvs): Re-force SYSTEMROOT to always be included inChristopher Faylor2005-03-302-2/+9
| | | | | environment. (build_env): Ditto.
* * environ.cc (spenv::retrieve): Revert most of previous change.Christopher Faylor2005-03-302-18/+29
| | | | | (build_env): Ditto. Rework to track environment variables which need to always be in the windows environment in a separate array.
* * path.cc (symlink_info::case_check): Ignore trailing charactersCorinna Vinschen2005-03-302-1/+6
| | | | in paths when comparing case.
* fix typoChristopher Faylor2005-03-301-1/+1
|
* * environ.h (win_env::immediate): Declare new field.Christopher Faylor2005-03-303-31/+103
| | | | | | | | | | | | | | | | | | | | (win_env::operator = ): Declare new operator. (win_env::reset): Declare new function. (win_env::~win_env): Declare new destructor. (getwinenv): Add optional third argument to declaration. * environ.cc (conv_envvars): Accommodate immediate field. (win_env::operator =): Define new operator. (win_env::~win_env): Define new destructor. (win_env::add_cache): Add value to environment immediately if "immediate" is set. (getwinenv): Accept optional third argument which will be used to store "cached" values to avoid overwriting real cache. (spenv::force): Declare new field. (spenvs): Accommodate force field. Add "PATH=" with force set to true. (spenv::retrieve): Avoid duping anything if we're not building an envblock. (build_env): Ditto. Use size of potentially constructed new environment block to determine if we need to create an environment block. Pass getwinenv temporary storage to avoid inappropriately overwriting the environment cache.
* * include/limits.h (NAME_MAX): New define.Corinna Vinschen2005-03-292-1/+9
| | | | (PATH_MAX): POSIX allows PATH_MAX to include trailing NUL.
* * path.cc (is_floppy): Make externally available.Corinna Vinschen2005-03-294-4/+26
| | | | | | | * path.h (is_floppy): Declare. * syscalls.cc (sync): Check for floppies on A: and B: in guid case. Don't call setmntent in non-guid case but evaluate drive bit mask locally.
* * fhandler_process.cc: Re-add exename.Corinna Vinschen2005-03-292-3/+10
|
* * include/ctype.h: Accommodate building in newlib.Christopher Faylor2005-03-282-1/+5
|
* * timer.cc (getitimer): Check that ovalue is a valid pointer, not just NULL.Christopher Faylor2005-03-282-5/+7
|
* * timer.cc (timer_tracker::settime): Set times to zero when just cancelling aChristopher Faylor2005-03-282-1/+8
| | | | timer.
* * cygthread.cc (cygthread::detach): Revert to just waiting for thred eventChristopher Faylor2005-03-285-23/+52
| | | | | | | | | | | | | | | | | since waiting for anything else is racy. * timer.cc (timer_tracker::hcancel): Rename from cancel. (timer_tracker::cancel): New method. (timer_tracker::th): Remove. (timer_tracker::~timer_tracker): Call cancel method. (timer_tracker::timer_tracker): Ditto. (timer_tracker::timer_tracker): Always, clear cancel, even though it is probably not strictly necessary for ttstart. (timer_thread): Accommodate cancel -> hcancel rename. (timer_tracker::settime): Ditto. (timer_tracker::gettime): Ditto. (timer_delete): Ditto. * cygwin.din: Export _ctype_. * include/ctype.h: Mark that _ctype_ is imported.
* * timer.cc (timer_tracker::timer_tracker): Eliminate simple constructor.Christopher Faylor2005-03-283-3/+10
| | | | | (ttstart): Fully initialize. * errno.cc: Fix typo introduced in previous change.
* * errno.cc (FILENAME_EXCED_RANGE): Map to ENAMETOOLONG.Christopher Faylor2005-03-282-1/+5
|
* update copyrightChristopher Faylor2005-03-281-1/+1
|
* * signal.cc (nanosleep): Revert tv_sec < 0 check as it is fixed properly in theChristopher Faylor2005-03-271-0/+5
| | | | below change to hires.h.
* * times.cc (hires_ms::usecs): Compare the difference.Christopher Faylor2005-03-275-4/+8
| | | | * hires.h: Add parentheses to HIRES_DELAY_MAX.
* * timer.cc (nanosleep): Treat tv_sec < 0 as invalid.Christopher Faylor2005-03-273-5/+21
| | | | * include/search.h: Make declarations consistent with newlib.
* * wininfo.h (wininfo::timer_active): Delete.Christopher Faylor2005-03-2725-287/+509
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (wininfo::itv): Ditto. (wininfo::start_time): Ditto. (wininfo::window_started): Ditto. (wininfo::getitimer): Ditto. (wininfo::setitimer): Ditto. (wininfo::wininfo): Ditto. (wininfo::lock): New method. (wininfo::release): Ditto. * window.cc: Use new lock/acquire wininfo methods throughout. (wininfo::wininfo): Delete (wininfo::getitimer): Ditto. (wininfo::setitimer): Ditto. (getitimer): Ditto. (setitimer): Ditto. (ualarm): Ditto. (alarm): Ditto. (wininfo::lock): Define new function. (wininfo::release): Ditto. (wininfo::process): Delete WM_TIMER handling. * timer.cc (struct timetracker): Delete it, flags. Add it_interval, interval_us, sleepto_us, running, init_muto(), syncthread, and gettime(). (ttstart): Make NO_COPY. (lock_timer_tracker): New class. (timer_tracker::timer_tracker): Distinguish ttstart case. (timer_tracker::~timer_tracker): New destructor. Clean out events, and reset magic. (timer_tracker::init_muto): New method. (to_us): Round up as per POSIX. (timer_thread): Reorganize to match timer_tracker::settime and timer_tracker::gettime. Call sig_send without wait. Call auto_release. (timer_tracker::settime): Reorganize logic to avoid race. Call gettime to recover old value. (timer_tracker::gettime): New method. (timer_create): Properly set errno on invalid timerid. Use new lock_timer_tracker method. (timer_delete): Ditto. Simplify code slightly. (timer_gettime): New function. (fixup_timers_after_fork): Reinit ttstart. (getitimer): New implementation. (setitimer): Ditto. (ualarm): Ditto. (alarm): Ditto. * cygwin.din: Export timer_gettime. * winsup.h: Remove has has_visible_window_station declaration. * Makefile.in (DLL_OFILES): Add lsearch.o. * cygthread.h (cygthread::notify_detached): New element. (cygthread::cygthread): Take optional fourth argument signifying event to signal on thread completion. * cygthread.cc (cygthread::stub): Signal notify_detached event, if it exists. (cygthread::cygthread): Initialize notify_detached from fourth argument. (cygthread::detach): Wait for notify_detached field is present. * lsearch.cc: New file. * search.h: Ditto. * include/cygwin/version.h: Bump API minor number to 126. * cygwin.din: Export lsearch, lfind.
* * fhandler.h (fhandler_socket::secret_event): Remove.Corinna Vinschen2005-03-245-263/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fhandler_socket::af_local_set_secret): New function combining former set_connect_secret and get_connect_secret into one function. (fhandler_socket::af_local_setblocking): Rename from eid_setblocking. (fhandler_socket::af_local_unsetblocking): Rename from eid_unsetblocking. (fhandler_socket::af_local_set_cred): New method. (fhandler_socket::af_local_copy): New method. (fhandler_socket::af_local_recv_secret): New method. (fhandler_socket::af_local_send_secret): New method. (fhandler_socket::af_local_recv_cred): Rename from eid_recv. (fhandler_socket::af_local_send_cred): Rename from eid_send. (fhandler_socket::af_local_accept): New method. (fhandler_socket::af_local_set_sockpair_cred): Rename from set_socketpair_eids. (fhandler_socket::eid_accept): Remove. (fhandler_socket::eid_connect): Remove. (fhandler_socket::set_connect_secret): Remove. (fhandler_socket::get_connect_secret): Remove. (fhandler_socket::create_secret_event): Remove. (fhandler_socket::check_peer_secret_event): Remove. (fhandler_socket::signal_secret_event): Remove. (fhandler_socket::close_secret_event): Remove. (fhandler_socket::sec_event_accept): Remove. (fhandler_socket::sec_event_connect): Remove. * fhandler_socket.cc (secret_event_name): Remove. (fhandler_socket::af_local_set_sockpair_cred): Rename from set_socketpair_eids. (fhandler_socket::af_local_setblocking): Rename from eid_setblocking. (fhandler_socket::af_local_unsetblocking): Rename from eid_unsetblocking. (fhandler_socket::af_local_recv_secret): New function to receive AF_LOCAL connect secret over socket itself. (fhandler_socket::af_local_send_secret): New function to send AF_LOCAL connect secret over socket itself. (fhandler_socket::af_local_recv_cred): Rename from eid_recv. (fhandler_socket::af_local_send_cred): Rename from eid_send. (fhandler_socket::eid_connect): Remove. (fhandler_socket::af_local_connect): Take over connect side handling of AF_LOCAL secret and credential handshake. (fhandler_socket::eid_accept): Remove. (fhandler_socket::af_local_accept): New method, take over accept side handling of AF_LOCAL secret and credential handshake. (fhandler_socket::af_local_set_cred): New method, set eid credentials to start values. (fhandler_socket::af_local_copy): New method, copy secret and credentials to another socket. (fhandler_socket::af_local_set_secret): New function combining former set_connect_secret and get_connect_secret into one function. (fhandler_socket::create_secret_event): Remove. (fhandler_socket::signal_secret_event): Remove. (fhandler_socket::close_secret_event): Remove. (fhandler_socket::check_peer_secret_event): Remove. (fhandler_socket::sec_event_connect): Remove. (fhandler_socket::sec_event_accept): Remove. (fhandler_socket::fixup_after_fork): Drop secret_event handling. (fhandler_socket::bind): Call af_local_set_secret. (fhandler_socket::connect): Call af_local_set_cred and af_local_connect. (fhandler_socket::listen): Call af_local_set_cred. (fhandler_socket::accept): Call af_local_copy and af_local_accept on accepted socket. (fhandler_socket::close): Don't call close_secret_event. (fhandler_socket::set_close_on_exec): Don't set secret_event inheritance. * net.cc (cygwin_getsockopt): Add debug output. (socketpair): Call af_local_set_sockpair_cred instead of set_socketpair_eids. * select.cc (set_bits): Drop AF_LOCAL special handling in case of except bit set.
* * include/ctype.h: Always define macros when inside cygwin.Christopher Faylor2005-03-232-2/+8
| | | | (isblank): New macro.
* checkin previously missed file.Christopher Faylor2005-03-231-1/+0
|
* fix commentChristopher Faylor2005-03-231-1/+1
|
* * fhandler.h (fhandler_socket::eid_connect): Make private.Corinna Vinschen2005-03-234-76/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fhandler_socket::set_connect_secret): Ditto. (fhandler_socket::get_connect_secret): Ditto. (fhandler_socket::create_secret_event): Ditto. Remove secret argument. (fhandler_socket::check_peer_secret_event): Ditto. (fhandler_socket::signal_secret_event): Make private. (fhandler_socket::close_secret_event): Ditto. (fhandler_socket::sec_event_accept): New private method. (fhandler_socket::sec_event_connect): Ditto. (fhandler_socket::af_local_connect): New public method. * fhandler_socket.cc: Use 'struct sockaddr' and 'struct sockaddr_in' rather than just 'sockaddr' and 'sockaddr_in' throughout. (fhandler_socket::eid_connect): Drop AF_LOCAL/SOCK_STREAM test. (fhandler_socket::create_secret_event): Remove secret argument. Always use connect_secret instead. (fhandler_socket::check_peer_secret_event): Ditto. (fhandler_socket::sec_event_connect): New method, combining entire secret event handshake on connect side. (fhandler_socket::af_local_connect): New method, combining secret event handshake and eid credential transaction on connect side, to be called from select. (fhandler_socket::sec_event_accept): New method, combining entire secret event handshake on accept side. (fhandler_socket::connect): Drop secret, use connect_secret instead. Move entire secret event handshake to sec_event_connect. (fhandler_socket::accept): Move entire secret event handshake to sec_event_accept. * select.cc (set_bits): Just call af_local_connect here.
* * include/cygwin/version.h: Change coment for most recent API version bump toChristopher Faylor2005-03-232-1/+7
| | | | | reflect new additions to the DLL and to remove change obsoleted by the previous checkin.
* * include/ctype.h: New file.Christopher Faylor2005-03-234-4/+194
| | | | | | * ctype.cc: Ditto. * Makefile.in: Add ctype.o to DLL_OFILES. * cygwin.din: Remove _ctype_ptr (for now?).