summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * include/cygwin/types.h: Move #include <sys/sysmacros.h> toYaakov Selkowitz2011-04-053-5/+37
| | | | | | | end of header so that it gets the dev_t typedef. * include/sys/sysmacros.h (gnu_dev_major, gnu_dev_minor, gnu_dev_makedev): Prototype and define as inline functions. (major, minor, makedev): Redefine in terms of gnu_dev_*.
* * include/cygwin/types.h: Move multiple inclusion guards toYaakov Selkowitz2011-04-052-4/+10
| | | | beginning and end of header.
* * Makefile.in: Move Makefile.common include earlier to fix problems withChristopher Faylor2011-04-042-9/+14
| | | | relative ${srcdir} path which confuses make.
* * new-features.sgml (ov-new1.7.10): Document dropped NT4 support.Corinna Vinschen2011-04-042-0/+8
|
* Drop NT4 support.Corinna Vinschen2011-04-0418-288/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * autoload.cc (DnsQuery_A): Fatal if not available. (DnsRecordListFree): Ditto. (DsGetDcNameW): Ditto. (NetGetAnyDCName): Remove. (NetGetDCName): Remove. (EnumProcessModules): Fatal if not available. (GetModuleFileNameExW): Ditto. (GetModuleInformation): Ditto. (GetProcessMemoryInfo): Ditto. (QueryWorkingSet): Ditto. (LsaRegisterLogonProcess): Ditto. * fenv.cc (_feinitialise): Drop supports_sse condition. * fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment. (fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition. (fhandler_disk_file::opendir): Ditto. * fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment. * fhandler_proc.cc (format_proc_partitions): Drop NT4-only code. * fhandler_process.cc (get_process_state): Ditto. * kernel32.cc (GetWindowsDirectoryW): Remove. (GetWindowsDirectoryA): Remove. * miscfuncs.cc (nice_to_winprio): Drop NT4-only code. * mount.cc (fs_info::update): Fix comments. * net.cc (get_2k_ifs): Drop NT4-only code. * sec_auth.cc (get_logon_server): Ditto. (lsaauth): Drop NT4-specific error handling. * security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally. * select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE. (peek_windows): Drop NT4-only condition in call to PeekMessage. * syscalls.cc (gethostid): Remove NT4-only workaround. * wincap.cc: Througout, drop has_dacl_protect, has_broken_if_oper_status, has_process_io_counters, has_terminal_services, has_extended_priority_class, has_guid_volumes, has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from wincaps. (wincap_nt4sp4): Remove. (wincap_minimal): Set to wincap_2000. (wincapc::init): Rely on availability of OSVERSIONINFOEX structure. Treat error from GetVersionEx as fatal. Treat NT4 as fatal. * wincap.h (struct wincaps): Drop has_dacl_protect, has_broken_if_oper_status, has_process_io_counters, has_terminal_services, has_extended_priority_class, has_guid_volumes, has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags and methods. * winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW. (GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
* * dtable.cc (dtable::init_std_file_from_handle): Fix a comment toCorinna Vinschen2011-04-042-2/+8
| | | | reflect the current state.
* * new-features.sgml (ov-new1.7.10): Document additional informationYaakov Selkowitz2011-04-042-0/+10
| | | | in /proc/version.
* * Makefile.in (fhandler_proc_CFLAGS): Define USERNAME, HOSTNAME,Yaakov Selkowitz2011-04-043-6/+20
| | | | | | and GCC_VERSION. * fhandler_proc.cc (format_proc_version): Add build machine and GCC version information as on Linux.
* * devices.h (fh_devices): Define FH_PROC_MIN_MINOR.Yaakov Selkowitz2011-04-043-17/+27
| | | | | | Reorder major-0 devices so that all /proc directories fall between FH_PROC and FH_PROC_MIN_MINOR. * path.h (isproc_dev): Redefine accordingly.
* * include/winnt.h (DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS): Add.Corinna Vinschen2011-04-042-0/+5
|
* * passwd.c (main): Add the ability to specify a username for the -RCorinna Vinschen2011-04-043-12/+38
| | | | | command. * utils.sgml: Document the aforementioned change.
* * cygserver_setpwd.h (setlsapwd): Add username parameter to declaration.Corinna Vinschen2011-04-044-9/+32
| | | | | | | * external.cc (cygwin_internal): In the CW_SET_PRIV_KEY case, fetch additional username parameter. * setlsapwd.cc (setlsapwd): Add username parameter. Allow admin to set the hidden password for other users.
* Add ChangeLog missing in previous checkinCorinna Vinschen2011-04-041-0/+9
|
* * sec_auth.cc (get_user_groups): Mark well-known groups as well-known.Corinna Vinschen2011-04-043-9/+29
| | | | | | | | (get_user_local_groups): Ditto. (verify_token): Drop useless label. * sec_helper.cc (cygsid::get_sid): Check for well-known SID if well_known isn't set. * security.h (well_known_sid_type): New inline function.
* * autoload.cc (FindFirstVolumeA): Remove.Corinna Vinschen2011-04-024-67/+56
| | | | | | | | | (FindNextVolumeA): Remove. (FindVolumeClose): Remove. (GetVolumeNameForVolumeMountPointA): Remove. * ntdll.h (NtFlushBuffersFile): Declare. * syscalls.cc (sync_worker): Rewrite using native NT functions. (sync): Ditto.
* * fhandler_proc.cc (format_proc_partitions): Express length in WCHARCorinna Vinschen2011-04-022-1/+6
| | | | size.
* * autoload.cc (GetExtendedTcpTable): Remove.Corinna Vinschen2011-04-026-145/+15
| | | | | | | | | | | | | (GetTcpTable): Remove. (CharNextExA): Remove. (FindWindowA): Remove. (ShowWindowAsync): Remove. * dcrt0.cc (disable_dep): Remove unused function. (dll_crt0_0): Drop comment babbling about TS & DEP. * fhandler_socket.cc (address_in_use): Remove unused function. * wincap.cc: Throughout, drop ts_has_dep_problem from wincaps. (wincapc::init): Drop code setting ts_has_dep_problem flag. * wincap.h (struct wincaps): Drop ts_has_dep_problem flags and method.
* update copyrightChristopher Faylor2011-04-011-1/+1
|
* * new-features.sgml (ov-new1.7.10): Document /proc/sysvipc/.Yaakov Selkowitz2011-04-012-0/+10
|
* Implement /proc/sysvipc/*Yaakov Selkowitz2011-04-0110-7/+392
| | | | | | | | | | | | | * devices.in (dev_procsysvipc_storage): Add. * devices.cc: Regenerate. * devices.h (fh_devices): Add FH_PROCSYSVIPC. * dtable.cc (build_fh_pc): Add case FH_PROCSYSVIPC. * fhandler.h (class fhandler_procsysvipc): Declare. (fhandler_union): Add __procsysvipc. * fhandler_proc.cc (proc_tab): Add sysvipc virt_directory. * fhandler_procsysvipc.cc: New file. * Makefile.in (DLL_OFILES): Add fhandler_procsysvipc.o. * path.h (isproc_dev): Add FH_PROCSYSVIPC to conditional.
* * Makefile.in (DLL_OFILES): Add avapi32.o.Corinna Vinschen2011-04-014-12/+355
| | | | | | * advapi32.cc: New file. * autoload.cc: Add block of remaining advapi32 functions used by Cygwin. Keep commented out. Explain why.
* * new-features.sgml (ov-new1.7.10): /proc/loadavg now showsYaakov Selkowitz2011-04-012-0/+10
| | | | current running/total processes count.
* * fhandler_proc.cc (format_proc_loadavg): Add running/totalYaakov Selkowitz2011-04-013-5/+24
| | | | | | processes as fourth component of output. * fhandler_process.cc (get_process_state): Make non-static. Add FIXME about generating an 'O' flag.
* * fhandler_random.cc (fhandler_dev_random::crypt_gen_random):Corinna Vinschen2011-04-014-35/+51
| | | | | | | | | | | | Use CryptAcquireContextW. * ntdll.h (STATUS_PROCEDURE_NOT_FOUND): Define. * sec_auth.cc (open_local_policy): Rename NTSTATUS variable ret to status. Drop usage of LsaNtStatusToWinError. (verify_token): Call NtQuerySecurityObject instead of GetKernelObjectSecurity. (create_token): Rename NTSTATUS variable ret to status. Rename ret2 to sub_status. Drop usage of LsaNtStatusToWinError. In case LsaLogonUser fails, report the sub_status as well.
* * libc/strptime.c: Remove misleading comment.Corinna Vinschen2011-04-012-4/+4
|
* * ntdll.h: Allow usage from plain C code.Corinna Vinschen2011-03-312-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (FSCTL_PIPE_IMPERSONATE): Define. (enum _THREAD_INFORMATION_CLASS): Define. (RTL_QUERY_REGISTRY_xxx): Define. (RTL_REGISTRY_xxx): Define. (PRTL_QUERY_REGISTRY_ROUTINE): Define. (struct _RTL_QUERY_REGISTRY_TABLE): Define. (enum _KEY_VALUE_INFORMATION_CLASS): Define. (struct _KEY_VALUE_PARTIAL_INFORMATION): Define. (NtAccessCheck): Declare. (NtAllocateLocallyUniqueId): Declare. (NtCreateKey): Declare. (NtDuplicateToken): Declare. (NtLoadKey): Declare. (NtOpenKey): Declare. (NtOpenProcessToken): Declare. (NtOpenThreadToken): Declare. (NtPrivilegeCheck): Declare. (NtQueryInformationToken): Declare. (NtQueryValueKey): Declare. (NtSetInformationThread): Declare. (NtSetInformationToken): Declare. (NtSetValueKey): Declare. (RtlAbsoluteToSelfRelativeSD): Declare. (RtlAddAccessAllowedAce): Declare. (RtlAddAccessDeniedAce): Declare. (RtlAddAce): Declare. (RtlCheckRegistryKey): Declare. (RtlCopySid): Declare. (RtlCreateAcl): Declare. (RtlCreateRegistryKey): Declare. (RtlCreateSecurityDescriptor): Declare. (RtlEqualPrefixSid): Declare. (RtlEqualSid): Declare. (RtlFirstFreeAce): Declare. (RtlGetAce): Declare. (RtlGetDaclSecurityDescriptor): Declare. (RtlGetGroupSecurityDescriptor): Declare. (RtlGetOwnerSecurityDescriptor): Declare. (RtlIdentifierAuthoritySid): Declare. (RtlInitializeSid): Declare. (RtlLengthSid): Declare. (RtlQueryRegistryValues): Declare. (RtlSetControlSecurityDescriptor): Declare. (RtlSetDaclSecurityDescriptor): Declare. (RtlSetGroupSecurityDescriptor): Declare. (RtlSetOwnerSecurityDescriptor): Declare. (RtlSubAuthorityCountSid): Declare. (RtlSubAuthoritySid): Declare. (RtlWriteRegistryValue): Declare.
* * uinfo.cc (cygheap_user::init): Don't call GetUserName. Fetch usernameCorinna Vinschen2011-03-312-7/+26
| | | | | | from Windows environment instead. Explain why. (cygheap_user::env_domain): Use MAX_DOMAIN_NAME_LEN rather than DNLEN to specify the size of the domain name buffer.
* * Makefile.in (LIBS): Remove advapi32.dll.Corinna Vinschen2011-03-317-58/+53
| | | | | | | | | | | | | (clean): Remove cyglsa.def. * cyglsa.c: Drop definitions required for VC++. Don't include ntddk.h. Declare functions from NTDLL here. Explain why. Use NTDLL functions in place of ADVAPI32 functions. * cyglsa64.def: New file. * cyglsa64.dll: Regenerate. * make-64bit-version-with-mingw-w64.sh (LIBS): Remove advapi32.dll. Reference cyglsa64.def instead of mslsa.def. * make-64bit-version-with-visual-c.bat: Remove. * mslsa.def: Remove.
* * cyglsa.c: Fix compilation with MinGW-w64 toolchains.Corinna Vinschen2011-03-314-2/+33
| | | | | * make-64bit-version-with-mingw-w64.sh: New file. * cyglsa64.dll: Regenerate with MinGW-w64-gc.
* Fix ChangeLog entry.Corinna Vinschen2011-03-301-1/+0
|
* * hires.h: Fix copyright.Corinna Vinschen2011-03-303-174/+26
| | | | | | | | | | | | | | | * times.cc: Ditto. localtime, gmtime). (FACTOR): Add comment. (NSPERSEC): Ditto. (JITTER): New definition. Comment. (systime_ns): Avoid gratuitous copying of the value returned by GetSystemTimeAsFileTime. (corelocaltime, localtime, gmtime): Remove very old, unused code block. (cygwin_tzset): Remove. (hires_ms::timeGetTime_ns): Add missing semicolon in comment. (hires_ms::nsecs): Redefine check for difference between internal timer value and system time.
* * times.cc (hires_ms::resolution): Make sure resolution is never 0.Corinna Vinschen2011-03-302-0/+13
| | | | (clock_setres): Ditto.
* * regtool.cc (cmd_set): Avoid a compiler warning.Corinna Vinschen2011-03-302-5/+11
|
* * cygtls.h (struct _local_storage): Redefine process_ident as wchar_tCorinna Vinschen2011-03-293-18/+32
| | | | | | | | | | pointer. * syslog.cc (CYGWIN_LOG_NAME): Convert to wide char constant. (openlog): Convert incoming ident string to wide char. Fix formatting. (vsyslog): Print ident string as wide char string. Convert message string to wide char and call UNICODE Win32 Event functions to make sure to use correct codeset. * tlsoffset.h: Regenerate.
* * fhandler_socket.cc (get_inet_addr): Make externally available.Corinna Vinschen2011-03-294-23/+56
| | | | | | | | | | * autoload.cc (GetUdpTable): Define. * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64 to check for local socket file. Create socket with type returned by get_inet_addr. If connect on UDP socket works, test if there's really a listening peer, otherwise fall back to Windows event log. (try_connect_syslogd): Use syslogd_inited flag to check if syslogd is available.
* * cygcheck.cc (handle_unique_object_name): Avoid a compiler warning.Corinna Vinschen2011-03-294-5/+18
| | | | | | | | (dump_sysinfo): Ditto. * loadlib.h (_load_sys_library): Mark as used, to avoid a compiler warning. * path.cc (oopt): Gurad with !FSTAB_ONLY to avoid a compiler warning. (read_flags): Ditto.
* * uinfo.cc (cygheap_user::env_domain): Use LookupAccountSidW andCorinna Vinschen2011-03-292-9/+15
| | | | | convert user and domain to multibyte strings to make sure to use correct codeset.
* * autoload.cc (UuidCreate): Remove.Corinna Vinschen2011-03-296-23/+42
| | | | | | | | | | (UuidCreateSequential): Remove. * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler error with gcc 4.5.1. * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto. * ntdll.h (NtAllocateUuids): Declare. * syscalls.cc (gethostid): Use NtAllocateUuids function rather than UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
* * new-features.sgml (ov-new1.7.10): Document pthread spinlocks.Corinna Vinschen2011-03-292-0/+17
|
* * cygwin.din (pthread_spin_destroy): Export.Corinna Vinschen2011-03-299-13/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (pthread_spin_init): Export. (pthread_spin_lock): Export. (pthread_spin_trylock): Export. (pthread_spin_unlock): Export. * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init, pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock. (std-notimpl): Remove pthread_spin_[...]. * pthread.cc (pthread_spin_init): New function. * thread.cc (pthread_spinlock::is_good_object): New function. (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate protected data in pthread_mutex. (pthread_spinlock::pthread_spinlock): New constructor. (pthread_spinlock::lock): New method. (pthread_spinlock::unlock): New method. (pthread_spinlock::init): New method. (pthread_spin_lock): New function. (pthread_spin_trylock): New function. (pthread_spin_unlock): New function. (pthread_spin_destroy): New function. * thread.h (PTHREAD_SPINLOCK_MAGIC): Define. (class pthread_mutex): Change access level of members shared with derived classes to protected. (pthread_mutex::set_shared): New protected method. (class pthread_spinlock): New class, derived class of pthread_mutex. * include/pthread.h (pthread_spin_destroy): Declare. (pthread_spin_init): Declare. (pthread_spin_lock): Declare. (pthread_spin_trylock): Declare. (pthread_spin_unlock): Declare. * include/cygwin/types.h (pthread_spinlock_t): New typedef. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * net.cc (SIO_BASE_HANDLE): Define.Corinna Vinschen2011-03-292-36/+65
| | | | | (fdsock): If we got an LSP handle, try to create a copy of the base handle instead. Change comment to explain.
* * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.Corinna Vinschen2011-03-292-1/+5
|
* * autoload.cc (winmm): Remove time functions. Don't treatCorinna Vinschen2011-03-296-60/+164
| | | | | | | | | | | | | | | | | | | | | | | unloadable wave functions as fatal. * hires.h (hires_ms::timeGetTime_ns): New private method. (hires_ms::dmsecs): Call timeGetTime_ns here. * ntdll.h (struct _KSYSTEM_TIME): Define. (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime. (SharedUserData): Define here. (NtQueryTimerResolution): Declare. (NtSetTimerResolution): Declare. * path.cc (SharedUserData): Move to ntdll.h. * times.cc (hires_ms::timeGetTime_ns): New private method. Use throughout instead of timeGetTime. Document entire functionality of timeGetTime in case we need it. (hires_ms::resolution): Try a call to NtQueryTimerResolution to fetch current period. Fall back to heuristic if that fails. Cast to DWORD in assignments to minperiod. (clock_setres): Align period to possible values per a call to NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod and timeEndPeriod with underlying call to NtSetTimerResolution. Use status code from NtSetTimerResolution to compute errno. Convert period to ULONGLONG and store 100ns value to simplify code.
* * include/userenv.h: Add functions and definitions added with WindowsCorinna Vinschen2011-03-292-0/+36
| | | | 2000 and Vista.
* * include/sys/xattr.h: New file.Corinna Vinschen2011-03-292-0/+23
|
* * thread.cc (semaphore::init, destroy, close): Standards conformanceCorinna Vinschen2011-03-293-7/+35
| | | | | | fix. On a failure, return -1 and set errno. * thread.h (semaphore::terminate): Save errno since semaphore::close() may now modify it.
* * setfacl.c (strchrnul): Drop local implementation.Corinna Vinschen2011-03-282-11/+5
|
* * new-features.sgml (ov-new1.7.9): Add "new API" paragraph.Corinna Vinschen2011-03-282-0/+16
|
* * cygwin.din (strchrnul): Export.Corinna Vinschen2011-03-284-1/+10
| | | | | * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * posix.sgml (std-gnu): Add strchrnul.
* * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill outChristopher Faylor2011-03-272-1/+9
| | | | p.envptr.