Commit Graph

71 Commits

Author SHA1 Message Date
Corinna Vinschen 5c86c94db7 * utils.sgml: Fix typo in passwd screen text. 2008-12-16 10:56:33 +00:00
Christopher Faylor 2b0c1c0d44 * utils.sgml: Convert some backslashes to slashes. 2008-12-13 22:43:54 +00:00
Corinna Vinschen d865502063 * passwd.c (longopts): Add --reg-store-pwd option.
(opts): Add -R option.
	(usage): Add text for -R/--reg-store-pwd option.
	(main): Fix size of local user and password string arrays.
	Handle -R option.
	* utils.sgml: Add text for passwd -R/--reg-store-pwd option.
2008-11-26 10:19:09 +00:00
Corinna Vinschen 56d8179570 * mount.cc (NT_MAX_PATH): Define.
(longopts): Rename mount-commands option to mount-entries.
	(opts): Remove removed options.
	(struct opt): Move up in file to allow using it in usage.
	(usage): Change text for --mount-entries option.  Remove
	-X option.  Add valid options output.
	(main): Remove handling -b option.
	(convert_spaces): New static function to convert spaces to "\040"
	string.
	(mount_entries): Renamed from mount_commands.  Rewrite to emit
	/etc/fstab compatible output.
	(show_cygdrive_info): Print "nouser" rather than "system".
	* umount.cc (longopts): Remove remove-all-mounts,
	remove-cygdrive-prefix, remove-system-mounts, system and user options.
	(opts): Remove A, c, s, S, u options.
	(usage): Remove text for all removed options.
	(main): Remove handling for all removed options.
	(remove_all_mounts): Remove.
	(remove_all_system_mounts): Remove.
	(remove_cygdrive_prefix): Remove.
	* utils.sgml: Fix mount and umount documentation.  Move description
	of (cyg,not)exec options to mount table section.
2008-08-13 16:35:04 +00:00
Corinna Vinschen e93f946aa7 * utils.sgml: Remove useless text. 2008-07-25 07:08:56 +00:00
Corinna Vinschen f9519bcd1a * mkgroup.c: Rework to allow per-domain/per-machine id_offset.
Add -b option to skip builtin groups.
	(main): Simplify code.
	* mkpasswd.c: Rework to allow per-domain/per-machine id_offset.
	(main): Simplify code.
	* utils.sgml: Explain changed mkgroup/mkpasswd -d/-D/-l/-L options.
	Add mkgroup -b option.
2008-07-23 18:09:50 +00:00
Corinna Vinschen 0bdab5c8a9 * mkgroup.c: Consolidate variable names.
(enum_unix_groups): New function.
	(print_special): Use LookupAccountSidW instead of LookupAccountSidA.
	(current_group): Ditto.
	(usage): Add -U option.
	(longopts): Add --unix option.
	(opts): Add -U option.
	(main): Handle -U option.  Call enum_unix_groups if set.
	* mkpasswd.c: Consolidate variable names.
	(current_user): Use LookupAccountSidW instead of LookupAccountSidA.
	(enum_unix_users): New function.
	(usage): Add -U option.
	(longopts): Add --unix option.
	(opts): Add -U option.
	(main): Handle -U option.  Call enum_unix_groups if set.
	* utils.sgml: Add -U option text to mkgroup and mkpasswd description.
2008-07-23 11:41:10 +00:00
Corinna Vinschen a1e1990348 * Makefile.in (cygcheck.exe): Link against ntdll.
* bloda.cc: Use statically linked functions throughout.
	* cygpath.cc: Drop 9x considerations.
	* mkgroup.c: Revamp.  Redefine -l and -d options to take optional
	machine and domain parameters.  Redefine -c to work always, using
	token information.  Add -L, -D, -C to create unique groupnames in
	domain\group syntax.  Add -S option to define domain\group separator
	char.  Ignore -u and -s options.
	* mkpasswd.c: Revamp.  Redefine -l and -d options to take optional
	machine and domain parameters.  Redefine -c to work always, using
	token information.  Add -L, -D, -C to create unique usernames in
	domain\user syntax.  Add -S option to define domain\user separator
	char.  Ignore -g and -s options.  Prefer to take homedir from $HOME
	over $HOMEDRIVE/$HOMEPATH.
	* path.cc (oopts): Add "acl", "noacl", "posix=0" and "posix=1" options.
	(getmntent): Accomodate throughout.
	* ps.cc: Fix copyright dates.
	* utils.sgml: Fix text for mkgroup and mkpasswd.
2008-07-22 14:40:05 +00:00
Corinna Vinschen b2dab9e8bc * utils.sgml: Add id's to all examples. 2008-07-17 10:32:03 +00:00
Corinna Vinschen ca9029913a * cygpath.cc (usage): Add -O and -F, remove tabs.
(get_special_folder): New function.
	(get_user_folder): New function.
	(dowin): Add -O and -F, better -D, -P error handling.
	(main): Add -O and -F.
	* utils.sgml (cygpath): Document -O and -F.
2007-01-09 12:17:05 +00:00
Corinna Vinschen 3c256e38f9 * regtool.cc (longopts): Add --wow32 option.
(opts): Add -W option.
	(usage): Add text for --wow32/-W option.
	(main): Handle --wow32/-W option.
	* utils.sgml: Document the new -W option.
2006-10-19 09:08:44 +00:00
Corinna Vinschen 40c60b89d5 * regtool.cc (KEY_WOW64_64KEY): Define.
(longopts): Add --wow64 option.
	(opts): Add -w option.
	(wow64): New variable to control usage of KEY_WOW64_64KEY access flag.
	(usage): Add text for --wow64/-w option.
	(print_version): Fix copyright.
	(find_key): Use wow64 value in calls to RegOpenKeyEx and RegCreateKeyEx.
	(cmd_add): Use wow64 value in call to RegCreateKeyEx.
	(regDeleteKeyEx): New function pointer to load RegDeleteKeyEx function
	dynamically.
	(cmd_remove): Load and use regDeleteKeyEx when wow64 is set.
	(main): Handle --wow64/-w option.
	* utils.sgml: Document the new -w option.
2006-10-16 18:00:06 +00:00
Corinna Vinschen 17c8ac3992 * regtool.cc (options): Add 'binary'.
(usage): Document 'load|unload|save' and '-b'.
	(find_key): Add 'options' parameter, add load/unload.
	(cmd_set): Add KT_BINARY case.
	(cmd_get): Add hex output in KT_BINARY case.
	(cmd_load): New function.
	(cmd_unload): New function.
	(set_privilege): New function.
	(cmd_save): New function.
	(commands): Add load, unload and save.
	(main): Add '-b'
	* utils.sgml (regtool): Document it.
2006-03-03 09:43:35 +00:00
Corinna Vinschen df4f13b723 * ps.cc (longopts): Add --process option.
(opts): Add -p option.
	(usage): Mention -p/--process option.
	(main): Handle -p option.
	* utils.sgml: Describe -p/--process option.
2006-02-16 11:17:19 +00:00
Christopher Faylor 5d97040501 *** cygwin DLL Changes:
* child_info.h (CURR_CHILD_INFO_MAGIC): Reset.
(child_info::dwProcessId): Delete.
(child_info::straced): New variable.
(child_info::handle_fork): New member function.
* dcrt0.cc (in_forkee): New global variable.
(__cygwin_user_data::forkee): Mark as obsolete.
(do_global_ctors): Use in_forkee rather than user_data->forkee.
(get_cygwin_startup_info): Ditto.  Deal with new straced field to allow strace
to deal with children of attached processes.
(initial_env): Accommodate changes to strace::hello.
(child_info_fork::handle_fork): Rename from plain old 'handle_fork'.  Move
alloc_stack() call elsewhere.
(dll_crt0_0): Fill out more of user_data.  Reference handle_fork via fork_info.
Add some debugging output.
(_dll_crt0): Don't wait for sync thread if sync_startup is invalid.  Zero
sync_startup here.  Call alloc_stack() here, if appropriate.
(dll_crt0_1): Use in_forkee rather than user_data->forkee.
(dll_crt0): Ditto.
* malloc_wrapper.cc (malloc_init): Ditto.
* dll_init.cc (in_forkee): Remove local static version of this variable.
(dll_list::load_after_fork): Don't set in_forkee here.
* external.cc (cygwin_internal): Use strace method rather than accessing field
directly.
* fhandler.cc (fhandler_base::read): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
* fork.cc (frok::parent): Invoke strace write_childpid to communicate with
potential strace.
(child_copy): Add more detail to debugging output.
* init.cc (calibration_id): New static variable.
(prime_threads): Set sync_startup to invalid handle if we already know about
thread_func_ix.  Use static calibration_id to hold calibration thread id.
* munge_threadfunc (munge_threadfunc): Don't try to debug if we don't find
threadfunc_ix.
(dll_entry): Avoid calling munge_threadfunc and _cygtls::remove on non-cygwin
threads invoked during process startup.
* pinfo.cc (set_myself): Always call strace.hello here regardless of DEBUGGING.
* sigproc.cc (child_info::child_info): Remove spurious handling of dwProcessId.
Set straced as appropriate.
* spawn.cc (spawn_guts): Rename ciresrv to ch.  Invoke strace write_childpid to
communicate with potential strace.
* strace.cc: Include child_info.h.
(strace::hello): Remove inited test.  Use active() method to test if strace has
been activated.  Handle case where we are started before
(mypid): New function.
(strace::vsprntf): Try to deal more intelligently with case where progname may
not be filled out.  Put pid in parentheses if it is a windows pid rather than a
cygwin pid.  myself has been filled out.
(strace::write_childpid): New function for notifying strace about the creation
of children.
(strace::vprntf): Use strace method rather than accessing field directly.
(strace_printf): Ditto.
(strace::wm): Ditto.
* winsup.h (in_forkee): Declare.
* include/sys/strace.h (strace::write_childpid): Declare new function.
(strace::attached): Define new function.
(strace::active): Ditto.
(strace::active_val): Ditto.
(_STRACE_ON): Delete.
(_STRACE_OFF): Ditto.
(define_strace0): Use strace method rather than accessing field directly.
(strace_printf_wrap): Ditto.
(strace_printf_wrap1): Ditto.

*** cygwin utils changes:
* strace.cc (nprocesses): Make static global.
(quiet): New variable.
(strace_active): Ditto.
(add_child): Increment nprocesses here.  Don't add a child if it is already
added (windows bug?).  Report on child if not quiet.
(get_child): Just return NULL if child not found.
(remove_child): Report on child if not quiet.
(attach_process): Don't complain if given a windows process.  Use windows pid
in error.
(handle_output_debug_string): Issue error if trying to manipulate a process
that we don't know about.  Handle _STRACE_CHILD_PID - attach to reported child
when we get this.
(proc_child): Move nprocesses to file scope.  Report on exceptions.
(longopts): Implement "--quiet".
(opts): Implement "-q".
(main): Manipulate quiet flag.
* utils.sgml (strace): Add words describing '-q'.
2005-12-29 20:46:34 +00:00
Christopher Faylor 801d6cc753 * strace.cc (show_usecs): Renamed from 'usecs'.
(main): Use show_usecs rather than usecs.  Toggle delta if '-u' is specified.
(handle_output_debug_string): Avoid printing microsecond timestamp if
show_usecs == 0.
* utils.sgml (strace): Add words to describe '-u'.
2005-12-05 16:39:06 +00:00
Christopher Faylor a39cfda7ba * Makefile.in: Link cygcheck with libwininet.a.
* cygcheck.cc: Add includes.
(grep_packages): New global variable.
(display_internet_error): New function.
(safe_chars): New global variable.
(base_url): Ditto.
(package_grep): New function.
(usage): Reword --help output for clarity.  Document new argument.
(longopts): Add 'package-query' option.
(opts): Add 'p' option, reorder to be consistent with 'longopts'.
(main): Accommodate new option.
* utils.sgml (cygcheck): Update --help output.  Document new -p option.
2005-11-22 17:19:17 +00:00
Christopher Faylor b94d50c035 add other options 2005-10-03 16:39:29 +00:00
Christopher Faylor 0d235234c5 * mount.cc (usage): Clarify action of -m option. 2005-05-01 15:50:02 +00:00
Corinna Vinschen a30482a386 * utils.sgml (mount): Clarify setting cygdrive prefix for user
and system-wide.
2005-04-20 12:25:43 +00:00
Joshua Daniel Franklin 4c6344923e * cygpath.cc (usage): Clarify help output to indicate acceptance
of multiple file names as arguments.
2005-02-24 04:32:45 +00:00
Joshua Daniel Franklin c98b30eadc * .sgml: Cleanup markup for XML validity. 2004-12-24 21:58:38 +00:00
Corinna Vinschen e3118d880b * mkgroup.cc (netapibufferallocate,netgroupgetinfo): New function
pointers.
	(load_netapi): Load NetApiBufferAllocate and NetGroupGetInfo.
	(enum_local_groups,enum_groups): Add disp_groupname parameter.
	Load info for disp_groupname if specified.
	(usage): Add description of "-g/--group" option.
	(longopts,opts): Add "-g/--group" option.
	(main): Process "-g/--group" option.
	* utils.sgml (mkgroup): Add description of "-g/--group" option
2004-07-12 16:52:16 +00:00
Joshua Daniel Franklin af6b55758b Define ps status flags 2004-06-11 18:25:06 +00:00
Christopher Faylor f135dd3ee7 * cygpath.cc (long_options): Add "mode" option.
(options): Ditto.
(usage): Report on new option.
(report_mode): New function.
(main): Implement -M option.
2004-02-25 01:23:20 +00:00
Joshua Daniel Franklin 49a4f409df * utils.sgml: Update cygcheck options 2004-02-11 04:10:47 +00:00
Joshua Daniel Franklin d5f60b41f4 Cleanup minor markup problems. 2004-01-24 08:10:27 +00:00
Joshua Daniel Franklin 701c67ff9e Document new passwd options. 2004-01-20 01:00:20 +00:00
Christopher Faylor 2f631ebc94 change default for --change-default-prefix 2003-08-05 01:06:22 +00:00
Christopher Faylor baf77a53b0 * mount.cc (struct opt): Remove posix option. 2003-07-04 03:20:22 +00:00
Christopher Faylor 08604f02bc * mount.cc (longopts): Add long "options" keyword.
(opts): Add -o option.
(usage): Display -o option.
(struct opt): New.
(concat3): New function.
(main): Handle -o flag.
2003-07-04 03:11:18 +00:00
Joshua Daniel Franklin 45bfd8ed74 * mkpasswd.c (usage) Remove extra newline from description output. 2003-04-26 22:33:00 +00:00
Joshua Daniel Franklin 518a04c40b Pierre's update for mkgroup/mkpasswd 2003-04-10 23:27:13 +00:00
Christopher Faylor 921587de50 note mount binary default. 2003-03-27 18:46:16 +00:00
Christopher Faylor 0e2b01821a fix typo 2003-03-12 17:21:31 +00:00
Joshua Daniel Franklin 34a50bf03f Document new mkgroup,mkpasswd options 2003-03-01 17:29:51 +00:00
Joshua Daniel Franklin 46c1de5bf7 * cygwinenv.sgml: Add section for 'CYGWIN codepage:[ansi|oem]' 2003-02-03 00:30:45 +00:00
Christopher Faylor 62012a3f31 fix some glitches 2002-08-21 15:42:18 +00:00
Christopher Faylor df2bb2a531 jdf fix. 2002-07-16 03:12:55 +00:00
Christopher Faylor 0ee8b8158e jdf patch 2002-07-11 02:06:50 +00:00
Christopher Faylor 6394f3595a more jdf 2002-07-10 00:30:53 +00:00
Christopher Faylor f6b5a68428 More jdf changes. 2002-07-09 04:27:47 +00:00
Christopher Faylor 597f5d3801 Joshua Daniel Franklin update. 2002-07-08 16:30:01 +00:00
Christopher Faylor aeb6d1c36e doc patch. 2002-07-07 00:55:51 +00:00
Christopher Faylor 0914e17db5 Update from Joshua Daniel Franklin 2002-06-25 01:16:23 +00:00
Christopher Faylor 325268e1c1 Add dumper.exe words from Egor Duda. 2002-06-12 16:06:10 +00:00
Christopher Faylor 2bd6505b39 * cygpath.cc: Add option to output windows paths in different formats: "dos"
and "mixed".
(main): Process options.
(doit): Check new options flags.
2002-06-07 19:25:26 +00:00
Corinna Vinschen 381fb8baa1 * regtool.cc (Fail): Be more verbose.
(find_key): Add support for remote registry access.
	(usage): Document it.
	* utils.sgml: Document it.
2002-06-07 11:12:16 +00:00
Christopher Faylor 80082f1ec4 * strace.cc (toggle): New global variable.
(error): Use exit instead of ExitProcess so that stdio buffers get flushed.
(create_child): Remove command line error checking.
(dostrace): Ditto.
(dotoggle): New function.
(usage): Add entry for new option -T|--toggle.  Alphabetize.
(longopts): Add new option -T|--toggle.
(opts): Ditto.
(main): Handle new -T|--toggle option.  Move all command line checking here
from other functions.
* utils.sgml: Update section for strace.
2002-06-07 01:36:17 +00:00
Christopher Faylor f69af9b3d2 * strace.cc (forkdebug): Make true by default.
(attach_process): Use window pid if cygwin pid isn't available (yet).
(create_child): Use either DEBUG_ONLY_THIS_PROCESS or DEBUG_PROCESS,
exclusively.  (Suggested by Conrad.Scott@dsl.pipex.com)
2002-06-02 17:46:38 +00:00