summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
...
* * tty.cc (tty::common_init): Reverse logic of cygserver check inConrad Scott2002-07-032-1/+6
| | | | call to SetKernelObjectSecurity.
* * autoload.cc (WSAEventSelect): Define new autoload function.Corinna Vinschen2002-07-033-16/+83
| | | | | | (WSAEnumNetworkEvents): Ditto. * fhandler_socket.cc (fhandler_socket::accept): If socket is in blocking mode wait for incoming connection and signal.
* * cygheap.cc (init_cheap): Rearrange error message.Christopher Faylor2002-07-037-44/+28
| | | | | | | | (cygheap_fixup_in_child): Ditto. * dtable.cc: Remove if 0'ed code. * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode. * sec_helper.cc (cygsid::get_id): Use system_printf for error message. * tty.cc (tty::common_init): Ditto.
* * net.cc (cygwin_getpeername): Defend against NULL pointer dereference.Christopher Faylor2002-07-022-1/+5
|
* * mkgroup.c: Add function pointers for functions from advapi32.dll.Corinna Vinschen2002-07-022-4/+28
| | | | | | (load_netapi): Load used functions from advapi32.dll. (main): Use function pointers instead of statically linked functions from advapi32.dll.
* * include/cygwin/version.h: Bump API minor version.Corinna Vinschen2002-07-022-1/+6
|
* * security.cc (get_logon_server): Interpret a zero lengthCorinna Vinschen2002-07-022-3/+15
| | | | | | | | domain as the local domain. (get_group_sidlist): Add authenticated users SID to SYSTEM's group list instead of SYSTEM itself. (verify_token): Accept the primary group sid if it equals the token user sid.
* * cygwin.din (__fpclassifyd): Add symbol.Corinna Vinschen2002-07-022-0/+11
| | | | | | (__fpclassifyf): Ditto. (__signbitd): Ditto. (__signbitf): Ditto.
* * security.h (DONT_INHERIT): Eliminate definition.Corinna Vinschen2002-07-024-11/+19
| | | | | | | | (INHERIT_ALL): Ditto. (INHERIT_ONLY): Ditto. * sec_acl.cc: Use appropriate defines from accctrl.h instead of the above throughout. * security.cc: Ditto.
* 2002-07-02 Danny Smith <dannysmith@users.sourceforge.net>Danny Smith2002-07-022-5/+45
| | | | | | | | | | | | | | | | | | * include/commctrl.h (WC_*): Remove some duplicate defines. 2002-07-02 Ken Fitlike <kenfitlike@hotmail.com> * include/commctrl.h (WC_IPADDRESS[AW]): Add defines and UNICODE mappings. (IPM*): Add defines. (IPN_*): Add defines. (NMIPADDRESS): Add structure and typedefs. (MAKEIPADDRESS): Add macro. (MAKEIPRANGE): Add macro. (FIRST_IPADDRESS): Add macro. (SECOND_IPADDRESS): Add macro. (THIRD_IPADDRESS): Add macro. (FOURTH_IPADDRESS): Add macro.
* * syscalls.c (seteuid32): Return immediately if the program is not impersonatedChristopher Faylor2002-07-022-11/+16
| | | | | and both uid and gid are original. (setegid32): Return immediately if the new gid is the current egid.
* * syscalls.cc (seteuid32): Fix incorrect placement of Pierre's patch below.Christopher Faylor2002-07-022-5/+10
|
* * syscalls.cc (seteuid32): Fix incorrect use of system_printf.Christopher Faylor2002-07-022-1/+5
|
* * autoload.cc (GetSecurityInfo): Define new autoload function.Christopher Faylor2002-07-029-152/+507
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (RegQueryInfoKeyA): Ditto. * fhandler.h (fhandler_virtual::fill_filebuf): Change return type to bool. (fhandler_proc::fill_filebuf): Ditto. (fhandler_registry::fill_filebuf): Ditto. (fhandler_process::fill_filebuf): Ditto. (fhandler_registry::value_name): Add new member. (fhandler_registry::close): Add new method. (fhandler_process::p): Remove member. * fhandler_proc.cc (fhandler_proc::open): Add set_nohandle after calling superclass method. Check return value of fill_filebuf. (fhandler_proc::fill_filebuf): Change return type to bool. Add return statement. * fhandler_process.cc (fhandler_process::open): Add set_nohandle after calling superclass method. Remove references to p. Check return value of fill_filebuf. (fhandler_process::fill_filebuf): Change return type to bool. Don't use dereference operator on p. Add return statement. (fhandler_process::format_process_stat): Fix typo. * fhandler_registry.cc: Add static open_key declaration. (fhandler_registry::exists): Assume path is already normalised. Try opening the path as a key in its own right first, before reverting to enumerating subkeys and values of the parent key. (fhandler_registry::fstat): Add additional code to return more relevant information about the registry key/value. (fhandler_registry::readdir): Explicitly set desired access when opening registry key. Remove output of buf from debug_printf format string. (fhandler_registry::open): Use set_io_handle to store registry key handle. Set value_name member. Move code to read a value from the registry to fill_filebuf. Add call to fill_filebuf. (fhandler_registry::close): New method. (fhandler_registry::fill_filebuf): Change return type to bool. Add code to read a value from registry. (fhandler_registry::open_key): Make function static. Use KEY_READ as desired access unless this is the last path component. Check the return value of RegOpenKeyEx for an error instead of hKey. * fhandler_virtual.cc (fhandler_virtual::lseek): Check the return value of fill_filebuf. (fhandler_virtual::open): Remove call to set_nohandle. (fhandler_virtual::fill_filebuf): Change return type to bool. Add return statement. * security.cc (get_nt_object_attribute): New function. (get_object_attribute): New function. * security.h (get_object_attribute): New function declaration.
* * syscalls.c (seteuid32): Do not return an error when the token cannot beChristopher Faylor2002-07-014-3/+14
| | | | created only because of a problem with the gid.
* * mount.cc (main): Ensure that mount_already_exists() also gets default flagChristopher Faylor2002-07-013-61/+117
| | | | | | | | | that is passed to do_mount. * cygpath.cc (long_options): Add "dos" and "mixed", correct "close", "file" and "type" to use NULL flag. (usage): Clean up usage output (more), accomodate new options. (main): Add --dos and --mixed options; accomodate all output forms in --type. Make UNIXy output default.
* * fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.Christopher Faylor2002-07-0114-14/+39
| | | | | | | | | | | | | | | | * fhandler_console.cc (fhandler_console::open): *Really* force binary mode rather than make it optional. * fhandler_proc.cc (fhandler_proc::open): Ditto. * fhandler_process.cc (fhandler_process::open): Ditto. * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto. * fhandler_raw.cc (fhandler_dev_raw::open): Ditto. * fhandler_registry.cc (fhandler_registry::open): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. * fhandler_virtual.cc (fhandler_virtual::open): Ditto. * fhandler_windows.cc (fhandler_windows::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. * net.cc (fdsock): Ditto. * path.cc (set_flags): Add more debugging.
* * debug.cc (threads): Avoid initialization.Christopher Faylor2002-07-013-3/+8
| | | | | * uinfo.cc (cygheap_user::ontherange): (from Corinna Vinschen) Actually make below changes work.
* * uinfo.cc (cygheap_user::ontherange): Make cygwin root the last resort forChristopher Faylor2002-07-012-4/+7
| | | | HOMEPATH/HOMEDRIVE for consistency with HOME.
* * shared.cc (sec_none): Move to sec_helper.cc.Corinna Vinschen2002-07-013-96/+113
| | | | | | | | | | | | | | | | (sec_none_nih): Ditto. (sec_all): Ditto. (sec_all_nih): Ditto. (get_null_sd): Ditto. (sec_acl): Ditto. (__sec_user): Ditto. * sec_helper.cc (sec_none): Move from shared.cc to here. (sec_none_nih): Ditto. (sec_all): Ditto. (sec_all_nih): Ditto. (get_null_sd): Ditto. (sec_acl): Ditto. (__sec_user): Ditto.
* * uinfo.cc (cygheap_user::ontherange): Potentially set HOME from existingChristopher Faylor2002-07-012-10/+21
| | | | | | homepath and homedrive cygheap_user fields (not currently used yet). Set HOME to / if no other alternative. (cygheap_user::test_uid): Simplify.
* white spaceChristopher Faylor2002-07-012-2/+2
|
* * environ.cc (parse_options): Use setenv to potentially replace CYGWIN value onChristopher Faylor2002-07-012-14/+40
| | | | | | | | export. Fixes broken behavior since November 2000 changes. (regopt): Return indication of whether or not something has been parsed from the registry. (environ_init): Only attempt to export CYGWIN variable when values were set from the registry. It is exported automatically otherwise.
* * fhandler.h (fhandler_process::pid): New field.Christopher Faylor2002-06-303-7/+26
| | | | | | (fhandler_process::fstat): Remove unneeded array. Set pid element. (fhandler_process::open): Ditto. (fhandler_process::fill_filebuf): Handle case where 'p' field is NULL.
* * fhandler.h (fhandler_process::p): New field.Christopher Faylor2002-06-303-17/+29
| | | | | | | (fhandler_process:fill_filebuf): Revert to same definition as virtual in parent class. (fhandler_process::open): Fill out p field rather than passing as an argument. (fhandler_process::fill_filebuf): Use p pointer rather than argument.
* * security.cc (extract_nt_dom_user): Check for all buffer overflows.Corinna Vinschen2002-06-302-41/+31
| | | | | | Call LookupAccountSid after trying to get domain & user from passwd. (get_group_sidlist): Obtain the domain and user by calling extract_nt_dom_user instead of LookupAccountSid.
* * uinfo.cc (cygheap_user::test_uid): Use standard issetuid test.Christopher Faylor2002-06-292-1/+5
|
* * autoload.cc (NetGetDCName): Change to make this an optional load function.Christopher Faylor2002-06-294-7/+23
| | | | | | | | * cygheap.h (cygheap_user::logsrv): Return NULL when operation fails. (cygheap_user::winname): Ditto. (cygheap_user::domain): Ditto. * uinfo.cc (cygheap_user::env_logsrv): Save results in temp variable. (cygheap_user::env_userprofile): Ditto.
* * environ.cc (spenv::retrieve): Detect return of env_dontadd from cygheap_userChristopher Faylor2002-06-292-5/+13
| | | | | | | methods. (build_env): Avoid incrementing environment pointer if not actually adding to the environment. That could result in garbage in the environment table. Be more defensive when reallocing envblock.
* * uinfo.cc (cygheap_user::test_uid): Return NULL or further tests are sortaChristopher Faylor2002-06-292-2/+8
| | | | | useless. (cygheap_user::env_domain): Recalculate if name is missing.
* * environ.cc (spenv::from_cygheap): Still need to take setuid intoChristopher Faylor2002-06-292-2/+7
| | | | consideration.
* * uinfo.cc (cygheap_user::env_logsrv): Return "almost_null" in case where noChristopher Faylor2002-06-292-1/+6
| | | | domain or username is "SYSTEM".
* * cygheap.h (cygheap_user): Reorg to accommodate environment caching.Christopher Faylor2002-06-296-63/+124
| | | | | | | | | | | | | | | | | | | | | | (cygheap_user::logsrv): New method. (cygheap_user::winname): Ditto. (cygheap_user::domain): Ditto. (cygheap_user::test_uid): Ditto. * cygheap.cc (cygheap_user::set_name): Reflect name "pwinname" name change. * environ.cc (getwinenveq): New function. (spenv::from_cygheap): Change arguments. (spenv::retrieve): Ditto for call. Use getwinenveq to retrieve info from environment. Always return value from cygwin environment, if it exists. * environ.h (getwinenveq): Declare. * uinfo.cc (cygheap_user::ontherange): Use logsrv() rather than env_logsrv(). (cygheap_user::test_uid): Define new method. (cygheap_user::env_logsrv): Accept environment arguments. Use test_uid to find info. (cygheap_user::env_domain): Ditto. (cygheap_user::env_userprofile): Ditto. (cygheap_user::env_homepath): Ditto. (cygheap_user::env_homedrive): Ditto. (cygheap_user::env_name): Ditto.
* Add missing entry.Christopher Faylor2002-06-271-0/+1
|
* * cygheap.cc (cfree_and_set): New function.Christopher Faylor2002-06-278-52/+89
| | | | | | | | | | | | | | | | | | (cygheap_user::set_name): Use cfree_and_set to reset members. * cygheap.h (cygheap_user): Delete static members. (cygheap_user::puserprof): New member. (cfree_and_set): Declare. * dcrt0.cc (almost_null): Define. * winsup.h (almost_null): Declare. * syscalls.cc (cfree_and_set): Remove unused variable. * uinfo.cc (cygheap_user::homepath_env_buf): Eliminate. (cygheap_user::homedrive_env_buf): Ditto. (cygheap_user::userprofile_env_buf): Ditto. (cygheap_user::ontherange): YA change to try to preserve existing HOMEPATH and HOMEDRIVE. Return almost_null values when variables should not actually exist. (cygheap_user::env_logsrv): Ditto. (cygheap_user::env_domain): Ditto. (cygheap_user::env_userprofile): Ditto.
* Delete extraneous comment from my previous change.Conrad Scott2002-06-271-1/+1
|
* * dcrt0.cc (dll_crt0_1): Let __progname point to the applicationsCorinna Vinschen2002-06-272-4/+16
| | | | | basename. Move eliminating ".exe" suffix from argv[0] so that it always also affects __progname.
* * thread.cc (pthread::create): Added trace printf to get CreateThreadChristopher Faylor2002-06-272-1/+9
| | | | LastError.
* * mmap.cc (list::match): Check using pagesize aligned size.Corinna Vinschen2002-06-272-4/+10
|
* * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): ForceChristopher Faylor2002-06-272-13/+37
| | | | FindFirstFile on first file of directory when asking for x:\ .
* * cygheap.cc (cygheap_user::set_name): Correct thinko in below change.Christopher Faylor2002-06-273-5/+13
|
* * cygheap.cc (cygheap_user::set_name): Avoid clearing things when just settingChristopher Faylor2002-06-263-3/+18
| | | | | name to itself or during first time initialization. * environ.cc (check_case_init): Make case insensitive.
* * fhandler.h (fhandler_socket::bind): Add method definition.Corinna Vinschen2002-06-264-488/+653
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fhandler_socket::connect): Ditto. (fhandler_socket::listen): Ditto. (fhandler_socket::accept): Ditto. (fhandler_socket::getsockname): Ditto. (fhandler_socket::getpeername): Ditto. (fhandler_socket::recvfrom): Ditto. (fhandler_socket::recvmsg): Ditto. (fhandler_socket::sendto): Ditto. (fhandler_socket::sendmsg): Ditto. (fhandler_socket::shutdown): Ditto. * fhandler_socket.cc (get_inet_addr): Move here from net.cc. (fhandler_socket::bind): New method. (fhandler_socket::connect): Ditto. (fhandler_socket::listen): Ditto. (fhandler_socket::accept): Ditto. (fhandler_socket::getsockname): Ditto. (fhandler_socket::getpeername): Ditto. (fhandler_socket::recvfrom): Ditto. (fhandler_socket::recvmsg): Ditto. (fhandler_socket::sendto): Ditto. (fhandler_socket::sendmsg): Ditto. (fhandler_socket::shutdown): Ditto. * net.cc: Various formatting cleanups throughout. (get_inet_addr): Move to fhandler_socket.cc. (cygwin_bind): Move base functionality to appropriate fhandler_socket method. (cygwin_connect): Ditto. (cygwin_listen): Ditto. (cygwin_accept): Ditto. (cygwin_getsockname): Ditto. (cygwin_getpeername): Ditto. (cygwin_recvfrom): Ditto. (cygwin_recvmsg): Ditto. (cygwin_sendto): Ditto. (cygwin_sendmsg): Ditto. (cygwin_shutdown): Ditto.
* * pwdgrp.h (pwdgrp_read::~pwdgrp_read): Avoid compiler warning.Corinna Vinschen2002-06-262-1/+6
|
* * dcrt0.cc (_dcrt0): Be more defensive when reserved block is used and it's notChristopher Faylor2002-06-262-2/+9
| | | | cygwin info.
* * autoload (noload): Avoid clobbering bx register.Christopher Faylor2002-06-266-25/+52
| | | | | | | | | | | * environ.cc (codepage_init): Use case insensitive match. * fhandler_console.cc (cp_get_internal): Delete. (con_to_str): Use get_cp to derive code page. (str_to_con): Ditto. * miscfuncs.cc (get_cp): New function. (sys_wcstombs): New function. Converted from macro. (sys_mbstowcs): Ditto. * winsup.h: Reflect above changes.
* * winsup.h: Minor cleanup.Christopher Faylor2002-06-265-12/+30
| | | | | | | | * path.h (path_conv::[]): New operator. * syscalls.cc (_link): Use path_conv operators rather than methods, where appropriate. Minor white space cleanup. * include/cygwin/version.h: Bump DLL minor number. * dcrt0.cc (sm): Make NO_COPY.
* * include/winbase.h (FILE_FLAG_FIRST_PIPE_INSTANCE): Add constant.Conrad Scott2002-06-252-0/+7
|
* 2002-06-26 Casper S. Hornstrup <chorns@users.sourceforge.net>Danny Smith2002-06-253-6/+38
| | | | | | | | | | | | | * include/winbase.h (WINBASEAPI): Don't define if prior definition. * include/winioctl.h (PARTITION_FAT32, PARTITION_FAT32_XINT13, PARTITION_XINT13, PARTITION_XINT13_EXTENDED, PARTITION_LDM, PARTITION_UNIX): Add defines. (PDRIVE_LAYOUT_INFORMATION): Add typedef. (IsRecognizedPartition): Also check for PARTITION_FAT32, PARTITION_FAT32_XINT13 and PARTITION_XINT13. (IsContainerPartition): Add macro.
* * syscalls.cc (chown): Convert uid to 32 bit.Corinna Vinschen2002-06-252-3/+11
| | | | | (lchown): Ditto. (fchown): Ditto.