Commit Graph

2026 Commits

Author SHA1 Message Date
Christopher Faylor b4bb31ad55 * path.cc (path_conv::check): Make sure any trailing path component is part of
potential normalized posix path.
2002-05-23 20:01:46 +00:00
Corinna Vinschen 82d178a405 * getfacl.c (usage): Standardize usage output. Change return type to
static void.
	(print_version): New function.
	(longopts): Added longopts for all options.
	(main): Accommodate new help and version options.
2002-05-23 10:56:57 +00:00
Christopher Faylor b2f338e9a9 * smallprint.c (__small_vsprintf): Implement '%o' after all these years. 2002-05-23 06:00:49 +00:00
Christopher Faylor ff7b1ed927 fix typo. 2002-05-23 04:48:03 +00:00
Christopher Faylor 8704ad9da9 * mount.cc (version) New global variable.
(usage) Standardize usage output.  Accomodate new version option.
(print_version) New function.
(longopts) Accomodate new version option.
(opts) Ditto.
(main) Ditto.
2002-05-23 04:19:07 +00:00
Christopher Faylor fc240f584b * fhandler.h (fhandler_virtual::exists): Eliminate path argument.
(fhandler_proc::exists): Ditto.
(fhandler_registry::exists): Ditto.
(fhandler_process::exists): Ditto.
* fhandler_proc.cc (fhandler_proc::exists): Ditto.  Use built-in name.
* fhandler_process.cc (fhandler_process::exists): Ditto.
(fstat): Ditto.
* fhandler_registry.cc (fhandler_registry::exists): Ditto.
(fhandler_registry::fstat): Ditto.
* fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
* path.cc (path_conv::check): Ditto.  Add debugging.
* syscalls.cc (dup): Always call dup2 for error handling.
2002-05-22 22:09:58 +00:00
Corinna Vinschen 1d2b71d6a3 * include/cygwin/types.h: Revert previous patch. 2002-05-22 12:47:54 +00:00
Corinna Vinschen 36f86a5537 * include/cygwin/types.h: Define pthread stuff only if _POSIX_THREADS
is defined.
2002-05-22 10:33:39 +00:00
Corinna Vinschen 5bb52de4e2 * cygpath.cc (usage): Change usage output slightly.
* cygpath.cc (main): Add option l to support conversion to
	Windows long file names.  Refactured code for capital options.
	Support of options from file for capital options.
	(dowin): New function.  Refactured from main.
	(doit): Call long path conversion.
	(get_long_name): New function.
	(get_long_paths): New function.
	(get_long_path_name_w32impl): New function.  Reimplementation
	of Windows API function GetLongPathName (only 98/Me/2000/XP or
	higher).
	(get_short_name): Call GetShortPathName only once.
	(get_short_paths): Fix calculating buffer size.
	* utils.sgml: Update cygpath section for l option.
2002-05-22 10:05:41 +00:00
Earnie Boyd 382df84bda * Makefile.in: Increment VERSION to 1.4.
(conf_prefix): New variable.
	(bindist): Modify target to use $(conf_prefix).
2002-05-21 16:50:13 +00:00
Corinna Vinschen 2d6ce5c228 * security.cc (open_local_policy): Initialize lsa to
INVALID_HANDLE_VALUE instead of NULL.
	(get_logon_server_and_user_domain): Test for INVALID_HANDLE_VALUE
	instead of NULL.
	(create_token): Both of the above.
2002-05-21 14:50:26 +00:00
Danny Smith 130e7349a5 2002-05-20 Philip Aston <philipa@mail.com>
* include/pbt.h (PBT_APMRESUMESUSPEND): Correct value is 7.
2002-05-20 00:57:18 +00:00
Danny Smith a110a2ad4d 2002-05-20 Ren� M�ller Fonseca <fonseca@users.sourceforge.net>
* include/lmaccess.h: (NetAccess*, NetGroup*,
	NetLocalGroup*, NetUser*, NetGet*, INetLogonControl[2],
	NetQueryDisplayInfotmationIndex): Replace LPWSTR with LPCWSTR.
2002-05-20 00:52:06 +00:00
Christopher Faylor 9ded8bd8b2 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of nlink
consistent for remote files.
2002-05-18 21:07:18 +00:00
Christopher Faylor cf737d6b32 * strace.cc (add_child): Use calloc since new requires working libstdc++.a.
(fhandler_disk_file::fstat): Ditto for delete/free.
2002-05-18 21:05:10 +00:00
Christopher Faylor 2701126aaf * path.cc (path_conv::check): Always set executable bit for executable
extension.
2002-05-18 20:27:49 +00:00
Christopher Faylor 197f807736 remove white space 2002-05-18 06:10:16 +00:00
Christopher Faylor b05b7d84d6 * fhandler.cc (fhandler_base::lseek): Avoid calling SetFilePointer with high
order part of 64 bit address on OS's which do not support that kind of
operation.  Otherwise Windows 95 will become confused.
2002-05-17 19:30:52 +00:00
Corinna Vinschen d6dc98256c * fhandler_raw.cc (fhandler_dev_raw::open): Replace set_errno()
by __seterrno_from_win_error().
	* security.cc (open_local_policy): Ditto.
	(get_lsa_srv_inf): Ditto.
	(get_user_groups): Ditto.
	(get_user_primary_group): Ditto.
	(create_token): Ditto.
	(subauth): Ditto.
2002-05-17 09:32:45 +00:00
Corinna Vinschen 35a89cbe95 * times.cc (utimes): Use FILE_WRITE_ATTRIBUTES even on 9x/Me when
opening file for writing timestamp.
	* wincap.cc: Remove flag has_specific_access_rights.
	* wincap.h: Ditto.
2002-05-17 08:32:29 +00:00
Corinna Vinschen ebbdc7034b * syscalls.cc (seteuid): Set default dacl in process token.
Replace in-line code by call to verify_token().
	(setegid): Reverse change from 2002-01-21. Add call to
	RevertToSelf and set primary group in impersonation token.
	* security.cc (create_token): Store pgrpsid in token security
	descriptor, except if it already appears in my_grps.
	Use sec_acl() in place of get_dacl().
	(verify_token): Create from code in seteuid(), with tighter checks.
	(get_dacl) Deleted.
	(get_group_sidlist): Add argument to indicate if pgrpsid is already
	in the groups.
	* security.h: Define verify_token().
	* autoload.cc: Load GetKernelObjectSecurity().
2002-05-16 09:30:48 +00:00
Corinna Vinschen e355de817c * cygpath.cc (get_short_paths): Fix more error checking.
(get_short_name): Ditto.

	* cygpath.cc (main): Add option H to show the Windows' profiles
	directory.  Support short names for options DPSW.  Clean up
	copied code lines.
	* utils.sgml: Update cygpath section for H option and s support.
2002-05-15 11:36:00 +00:00
Corinna Vinschen 5588e28765 * cygpath.cc (get_short_name): Fix error checking. 2002-05-14 16:07:26 +00:00
Christopher Faylor ef48a2cad3 * kill.cc (prog_name) New global variable.
(usage) Standardize usage output.  Add descriptions.
(print_version) New function.
(longopts) Accomodate new version option.
(opts) Ditto.
(main) Ditto.
2002-05-13 23:42:32 +00:00
Christopher Faylor feb7f1a97d * cygwin.din: Add strlcat and strlcpy.
* include/cygwin/version.h: Increment API minor version number.
2002-05-13 19:53:46 +00:00
Corinna Vinschen 043bc3e1ee * shared.cc (__sec_user): Split into sec_acl() and call orig_sid().
(sec_acl): Create from part of __sec_user(), except creator/owner.
	* security.h: Define sec_acl() and MAX_DACL_LEN.
2002-05-13 12:10:49 +00:00
Christopher Faylor 6eabab557a * kill.cc (listsig): Display numeric id when given symbolic input. 2002-05-13 05:35:44 +00:00
Christopher Faylor 3ff9fd2b9b document kill -h. 2002-05-13 05:25:14 +00:00
Christopher Faylor 30feaa22dd * kill.cc (usage): Show new options. Allow specification of output stream.
(main): Implement 'h' option.
2002-05-13 05:23:37 +00:00
Christopher Faylor 65791b5de3 Update ChangeLog with missing entry. 2002-05-13 05:18:34 +00:00
Christopher Faylor c49fa76263 * Makefile.in (kill.exe): Add as a specific target.
* kill.cc (longopts): New.
(opts): Ditto.
(get_sig): Accept const char * parameter.  Return -1 on unknown signal.
(test_for_unknown_sig): New function.
(listsig): New function.
(main): Use getopt_long for option parsing.  Implement -l, and -s options.  Use
test_for_unknown_sig() to test for signal validity.
2002-05-13 05:13:58 +00:00
Christopher Faylor d52265ffb2 remove a comma 2002-05-12 19:29:20 +00:00
Christopher Faylor c8b20196dd * fhandler_disk_file.cc (fhandler_disk_file::open): Avoid using O_DIROPEN when
OS doesn't support it.  Return proper errno in that case.
2002-05-12 19:20:01 +00:00
Christopher Faylor 56caca1d16 fix entry 2002-05-12 04:55:10 +00:00
Christopher Faylor b4f8d31f3b * syscalls.cc (_read): Change error to EBADF if attempt to write to a
non-writable fd.
2002-05-12 04:43:29 +00:00
Christopher Faylor 48897dfeb9 * mount.cc (do_mount): Default to non-exec option for remote drives. Report
warnings before attempting a mount.
(longopts): Add no-executable option.
(mount_commands): Ditto.
(opts): Ditto.
(usage): Ditto.  Indicate that system mount is now the default.
(main): Accommodate no-executable option.  Make system mount the default.
* umount.cc (usage): Indicate that system umount is now the default.
(main): Make system umount the default.
2002-05-12 04:29:54 +00:00
Christopher Faylor 29ee580d07 * fhandler.h (executable_states): For now, make dont_care_if_executable
equivalent to not_executable.
* sys/mount.h: Define MOUNT_NOTEXEC.
* path.h (fs_info): New class.
(path_conv): Move fs-specific fields to new 'fs' structure.
(path_conv::update_fs_info): Move to fs_info and rename to just 'update'.
* path.cc (fs_info::update): Ditto.  Return 'true' if successful.
(fillout_mntent): Add ',noexec' to list of reported options.
2002-05-12 03:08:59 +00:00
Christopher Faylor b84621d2e3 * fhandler_virtual.cc (fhandler_virtual::close): Quiet a compiler warning. 2002-05-12 01:59:53 +00:00
Christopher Faylor 6566d27da4 fix formatting 2002-05-12 01:50:38 +00:00
Christopher Faylor 0371d66a64 fix comment 2002-05-12 01:41:17 +00:00
Christopher Faylor 9ba913a56d * autoload.cc: Add dynamic load statements for 'ZwQueryInformationProcess' and
'ZwQueryVirtualMemory'.
* fhandler.h: Change type of bufalloc and filesize members of fhandler_virtual
from int to size_t.  Change type of position member from __off32_t to
__off64_t.  Add new fileid member to fhandler_virtual class.  Make seekdir take
an __off64_t argument.  Make lseek take an __off64_t argument.  Add
fill_filebuf method to fhandler_virtual.  Add fill_filebuf method to
fhandler_proc.  Add fill_filebuf method to fhandler_registry.  Add fill_filebuf
method to fhandler_process.  Add saved_pid and saved_p members to
fhandler_process.
* fhandler_proc.cc (proc_listing_array): Add 'loadavg', 'meminfo', and 'stat'.
(proc_fhandlers array): Ditto.
(fhandler_proc::open): Use fill_filebuf to flesh out the file contents.
(fhandler_proc::fill_filebuf): New method.
(fhandler_proc::format_proc_meminfo): Ditto.
(fhandler_proc::format_proc_stat): Ditto.
(fhandler_proc::format_proc_uptime): Ditto.
* fhandler_process.cc (process_listing): Add 'stat' and 'statm'.
(fhandler_process::fstat): Find the _pinfo structure for the process named in
the filename.  Return ENOENT if the process is no longer around.  Set the gid
and uid fields of the stat structure.
(fhandler_process::open): Store pid and pointer to _pinfo structure in
saved_pid and saved_p respectively.  Use fill_filebuf to flesh out file
contents.
(fhandler_proc::fill_filebuf): New method.
(format_process_stat): New function.
(format_process_status): Ditto.
(format_process_statm): Ditto.
(get_process_state): Ditto.
(get_mem_values): Ditto.
* fhandler_registry.cc (fhandler_registry::seekdir): Change argument type from
__off32_t to __off64_t.
(fhandler_registry::fill_filebuf): New method.
* fhandler_virtual.cc (fhandler_virtual::seekdir): Change argument type from
__off32_t to __off64_t.
(fhandler_virtual::lseek): Ditto.
(fhandler_virtual::fill_filebuf): New method.
(fhandler_virtual::fhandler_virtual): Initialise fileid to -1.
* wincap.cc: Set flag has_process_io_counters appropriately.
* wincap.h: Add flag has_process_io_counters.
2002-05-12 01:37:48 +00:00
Christopher Faylor f561f644e9 * syscalls.cc (_write): Change error to EBADF if attempt to write to a
non-writable fd.
2002-05-09 22:55:08 +00:00
Corinna Vinschen 6327de5fef * cygheap.h (class cygheap_user): Add member `orig_psid'.
Add method `orig_sid()'.
	* cygheap.cc (cygheap_user::set_sid): Maintain orig_psid.
2002-05-08 14:21:08 +00:00
Christopher Faylor 84d06cb64d * dumper.cc (usage) Standardize usage output. Generalize to allow use for
help.
(longopts) New struct.  Added longopts for all options.
(print_version) New function.
(main) Change getopt to getopt_long.  Accommodate new help and version options.
2002-05-08 01:55:56 +00:00
Danny Smith 735bb7e7d7 * include/commctrl.h (ImageList_DragShowNolock): Remove
conflicting redeclaration.
2002-05-07 22:58:26 +00:00
Corinna Vinschen 795b46cf8f * localtime.cc (tzsetwall): Use wildabbr if generated timezone name
length < 3.
2002-05-07 13:18:44 +00:00
Danny Smith 3769952b4d * include/windows.h: Move _ANONYMOUS_UNION, _ANONYMOUS_STRUCT,
STRICT and related defines to ...
	* include/windef.h: Here.

	ChangeLog: Correct date and typo in last entry.
2002-05-06 23:37:52 +00:00
Corinna Vinschen a991777994 * spawn.cc (spawn_guts): Move call to set_process_privilege()
to load_registry_hive().
	* registry.cc (load_registry_hive): ditto.
	* fork.cc (fork_parent): Call sec_user_nih() only once.
2002-05-06 10:05:46 +00:00
Christopher Faylor 13ee3618d0 * path.h (path_conv::path_conv): Initialise normalized_path to NULL. 2002-05-04 18:27:27 +00:00
Christopher Faylor 58e74c7e7f . 2002-05-04 04:30:57 +00:00