From 508682370b4aad954555e5611c994eb96fb5cc56 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 14 Nov 2003 19:14:43 +0000 Subject: [PATCH] * mkgroup.c: Avoid compiler warnings throughout. * mkpasswd.c: Ditto. * passwd.c: Ditto. --- winsup/utils/ChangeLog | 1243 +++++++++++++++++++++++++++++++++++++++ winsup/utils/mkgroup.c | 14 +- winsup/utils/mkpasswd.c | 10 +- winsup/utils/passwd.c | 6 +- 4 files changed, 1258 insertions(+), 15 deletions(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 64f4433ee..59f59cfff 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,1246 @@ +2003-11-14 Corinna Vinschen + + * mkgroup.c: Avoid compiler warnings throughout. + * mkpasswd.c: Ditto. + * passwd.c: Ditto. + +2003-09-10 Christopher Faylor + + * Makefile.in (MINGW_CXX): Define and use for mingw-compiled files. + * path.cc: Include more path info in cygwin-specific includes since the + cygwin directory is no longer included by default. + +2003-09-10 Christopher Faylor + + * Makefile.in: More fixups to adjust for the fact that mingw_getopt.o + is no longer built. + +2003-09-10 Christopher Faylor + + * Makefile.in: Remove references to getopt since it is now part of + mingwex. + +2003-09-08 Christopher Faylor + + * Makefile.in: Rename libz.h -> zlib.h. + +2003-09-07 Christopher Faylor + + * Makefile.in: Detect existence of mingw zlib headers and libraries. + Build cygcheck without package checking if they are unavailable. + * dump_setup.cc: Generate dummy zlib macros when zlib is not available. + (open_package_list): Use zlib functions to uncompress package lists. + Return gzFile rather than FILE *. + (check_package_files): Change fp to gzFile to accommodate zlib + functions. Use gzgets to read from package file. Use gzclose to close + the handle. + (package_list): Ditto. + (package_find): Ditto. + +2003-09-05 Igor Pechtchanski + + * dump_setup.cc (check_package_files): Don't fail on empty package. + +2003-09-01 AJ Reins + + * mount.cc (mount_commands): Ensure user mode is actually user mode and + not the default system mode. + +2003-08-31 Christopher Faylor + + * kill.cc (forcekill): Silence some compiler warnings. + +2003-08-31 Christopher Faylor + + * Makefile.in: Oops. Put the '...' in the right place. + +2003-08-31 Christopher Faylor + + * Makefile.in: Display "..." when not-verbose. + + * kill.cc (forcekill): Default to entered pid when pinfo fails. Issue + some warnings when things don't work. + +2003-08-17 David Rothenberger + + * dump_setup.cc (check_package_files): Strip leading / and ./ from + package file names. + +2003-08-16 David Rothenberger + + * dump_setup.cc (package_find): Don't stop searching on missing + file list. + (package_list): Ditto. + +2003-08-16 Igor Pechtchanski + + * dump_setup.cc: (package_list): Make output terse unless + verbose requested. Fix formatting. + (package_find): Ditto. + +2003-08-15 Corinna Vinschen + + * cygcheck.cc (main): Fix some formatting and help text printing. + +2003-08-15 Igor Pechtchanski + + * cygcheck.cc (find_package,list_package): New global + variables. + (usage): Add "--find-package" and "--list-package" options, + reformat output. + (longopts, opts): Add "--find-package" and "--list-package" + options. + (main): Process the "--find-package" and "--list-package" + flags. Add new semantic checks. Add calls to find_package() + and list_package(). + * dump_setup.cc: Fix header comment. + (match_argv): Change return type to int to distinguish + between real matches and default ones. + (open_package_list): New static function. + (check_package_files): Factor out opening the package list + file into open_package_list(). + (get_packages): New static function. + (dump_setup): Factor out getting a list of packages into + get_packages(). + (package_list, package_find): New global functions. + +2003-08-15 Corinna Vinschen + + * regtool.cc (usage): Add missing linefeed. Move example to --help + text. Fix forward slash description. + +2003-08-13 Igor Pechtchanski + + * dump_setup.cc (check_package_files): Fix extra '/' in filename. + Resize command buffer. Fix buffer overflow bug. + +2003-08-09 Igor Pechtchanski + Christopher Faylor + + * dump_setup.cc (dump_setup): Check for the existence of the package + list file. Rework slightly to use static buffer for popen commands. + +2003-08-07 Igor Pechtchanski + Christopher Faylor + + * dump_setup.cc (version_len): New static variable. + (could_not_access,directory_exists): New static function. + (file_exists): Ditto. + (check_package_files): Ditto. + (dump_setup): Check the contents of each package if check_files is true + and output the result in the "Status" column. Flush output after each + package. + +2003-08-07 Igor Pechtchanski + Christopher Faylor + + * dump_setup.cc (dump_setup): Remove redundant null check. Add + informative message if package info not found. + +2003-07-26 Christopher Faylor + + * mount.cc (do_mount): Issue warning when using managed mount option on + non-empty directory. + +2003-07-25 Christopher Faylor + + * configure.in: Use 'install-sh -c'. + * configure: Regenerate. + +2003-07-25 Christopher Faylor + + * configure.in: Always use install-sh. + * configure: Regenerate. + +2003-07-03 Christopher Faylor + + * mount.cc (struct opt): Remove posix option. + +2003-07-03 Christopher Faylor + + * 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-06-12 Christopher Faylor + + * cygcheck.cc (pretty_id): Rework slightly to not rely on spaces. + +2003-06-12 Christopher Faylor + + * cygpath.cc: Throughout, always return error when GetShortPathName + returns 0. + +2003-04-26 Joshua Daniel Franklin + + * mkpasswd.c (usage) Remove extra newline from description output. + +2003-04-26 Joshua Daniel Franklin + + * cygcheck.cc (usage) Add description output. + * cygpath.cc (usage) Add description output. + * dumper.cc (usage) Add newline to description output. + * kill.cc (usage) Add description output. + * mkgroup.c (usage) Grammatical change to description output. + * mkpasswd.c (usage) Grammatical change to description output. + * mount.cc (usage) Add description output. + * passwd.c (usage) Add description output. + * ps.cc (usage) Add description output. + * regtool.cc (usage) Add description output. + * setfacl.c (usage) Remove extra newline from description output. + * ssp.c (usage) Add description output. + * strace.cc (usage) Add description output. + * umount.cc (usage) Add description output. + +2003-04-10 Pierre Humblet + + * mkpasswd.c (current_user): print uid and gid as unsigned. + (enum_users): Ditto. Do not free servername. + (usage): Update to allow several domains and improve -p. + (main): On Win9x limit uids to 1000. Only print specials + when -l is specified. Add a loop to allow several domains + and free servername in the loop. + * mkgroup.c (enum_groups): Do not free servername. + (usage): Update to allow several domains. Change uid to gid. + (main): Only print specials when -l is specified. Add a + loop to allow several domains and free servername in the loop. + +2003-03-24 Christopher Faylor + + * cygcheck.cc (dump_sysinfo): Ensure that CYGWIN environment variable + is correctly set. + +2003-03-09 Corinna Vinschen + + * getfacl.c (username): Fix ambiguous printf calls. + (groupname): Ditto. + (main): Ditto. + +2003-03-04 Christopher Faylor + + * Makefile.in (strace.exe): Include mingw_getopt.o in link line. + * cygcheck.cc (print_version): Update copyright. + * strace.cc (print_version): Ditto. + (main): Allow cygwin paths for -o option. + (create_child): Allow cygwin path as argv[0]. + * path.cc (path.cc): Allow UNC paths. + +2003-03-01 Pierre Humblet + + * mkpasswd.cc (main): On Win95, output both a default line and a + line for the current user (if known) with a pseudorandom uid. If + the -u switch is given, produce a line for the specified user. + * mkgroup.cc (main): On Win95 change the group name from "unknown" to + "all". + +2003-02-28 Christopher Faylor + + * Makefile.in (cygcheck.o): Fix so that actual mingw include files are + used. + * cygcheck.cc (find_on_path): Translate from cygwin path when qualified + path name found. + (pretty_id): New function. Dump output of id command. + (dump_sysinfo): Call pretty_id for CYGWIN=ntsec and CYGWIN=nontsec cases. + +2003-02-12 Christopher Faylor + + * cygpath.cc (doit): Allocate more space for non-path filename. + +2003-02-07 Christopher Faylor + + * dump_setup.cc (compar): Use case insensitive comparisons. + (dump_setup): Calculate package_len based on already used "len". Don't + bother with version_len. + +2003-02-07 Igor Pechtchanski + + * dump_setup.cc (dump_setup): Compute the longest package name + and align columns properly. + +2003-02-06 Christopher Faylor + + * cygcheck.cc (common_apps): Add some more apps. + * path.cc (get_cygdrive): Correctly set system flag. + +2003-01-22 Corinna Vinschen + + * Makefile.in (ALL_LDFLAGS): Remove newlib/libm from tools paths. + (MINGW_LDFLAGS): Remove in favor of definition from Makefile.common. + +2003-01-15 Corinna Vinschen + + * mkgroup.c: Fix copyright date. + * mkpasswd.c: Ditto. + * setfacl.c: Ditto. + +2003-01-09 Pierre Humblet + + * setfacl.c (usage): Remove double ":" for mask and other. + +2003-01-07 Pierre Humblet + + * mkpasswd.c (current_user): Create. + (usage): Reorganize to support Win95/98/ME. + (main): Add option for -c. Reorganize to parse options for + Win95/98/ME and to call current_user. Add username in gecos field + on Win95/98/ME. + * mkgroup.c (enum_groups): Print gid with %u. + (print_win_error): Create from passwd.cc. + (current_group): Create. + (usage): Reorganize to support Win95/98/ME. + (main): Add option for -c. Reorganize to parse options for + Win95/98/ME and to call current_group. + +2002-12-14 Pierre Humblet + + * setfacl.c (main): Place a single : after other and mask. + * getfacl.c (getaclentry): Allow both : and :: for other and mask. + (main): Remove extraneous break. + +2002-11-25 Corinna Vinschen + + * mkpasswd.c (main): Set pw_passwd field to '*' on 9x/Me. + +2002-11-24 Corinna Vinschen + + * setfacl.c (getperm): Set only `other' permission bits. + (getaclentry): Set a_id to -1 by default. + +2002-11-24 Corinna Vinschen + + * getfacl.c (permstr): Use `other' permission bits for requesting + ace permissions. + +2002-11-08 Corinna Vinschen + + * setfacl.c (usage): Add missing LF. + +2002-10-30 Christopher Faylor + + * cygpath.cc (get_long_path_name_w32impl): Define similarly to + GetLongPathName. + (get_long_name): Correctly prototype GetLongPathName. + (get_long_paths): Implement using get_long_name to cut down on code + duplication. + (doit): Do various things to make path output work predictably. + +2002-10-19 Christopher Faylor + + * mount.cc (usage): Correctly report default mode. + * strace.cc (main): Use strtoul as appropriate. + +2002-09-29 Christopher Faylor + + * cygpath.cc (close_arg): Remove unused static. + * mkgroup.c (enum_local_users): Avoid compiler warning. + (enum_users): Ditto. + * mkpasswd.c: Ditto throughout. + * ssp.c: Ditto throughout. + +2002-09-18 Christopher Faylor + + * cygcheck.cc: Include sys/time.h rather than time.h to avoid a + compiler error. + +2002-09-17 Christopher Faylor + + * cygcheck.cc: Reorder includes to avoid compiler error. + +2002-09-15 Joshua Daniel Franklin + + * cygcheck.cc (print_version) Add final newline. + * getfacl.c (print_version) Add final newline. + * kill.cc (print_version) Add final newline. + * mkgroup.c (print_version) Add final newline. + * mkpasswd.c (print_version) Add final newline. + * mount.cc (print_version) Add final newline. + * passwd.c (print_version) Add final newline. + * ps.cc (print_version) Add final newline. + * regtool.cc (print_version) Add final newline. + * setfacl.c (print_version) Add final newline. + * ssp.c (print_version) Add final newline. + * strace.cc (print_version) Add final newline. + * umount.cc (print_version) Add final newline. + +2002-09-12 Igor Pechtchanski + + * cygpath.cc (options) New global variable. + (main) Make short options global for easier change. + (print_version) Add a missing newline. + +2002-08-07 Igor Pechtchanski + + * regtool.cc (find_key): Add support for custom key separator. + (usage): Document it. + +2002-08-02 Corinna Vinschen + + * mkgroup.c (main): Don't print an entry for "Everyone". + * mkpasswd.c (print_special): Set pw_gid to 544 for SYSTEM user. + (main): Don't print an entry for "Everyone". + +2002-07-06 Christopher Faylor + + * configure.in: Check for libiconv.a. + * configure: Regenerate. + * Makefile.in: Add libiconv.a to libraries required for dumper.exe. + +2002-07-06 Christopher Faylor + + * Makefile.in: Use MINGW stuff from Makefile.common. + +2002-07-01 Corinna Vinschen + + * mkgroup.c: Add function pointers for functions from advapi32.dll. + (load_netapi): Load used functions from advapi32.dll. + (main): Use function pointers instead of statically linked functions + from advapi32.dll. + +2002-07-01 Christopher Faylor + + * mount.cc (main): Ensure that mount_already_exists() also gets default + flag that is passed to do_mount. + +2002-06-22 Joshua Daniel Franklin + + * 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. + +2002-06-18 Joshua Daniel Franklin + + * cygpath.cc (usage): Clean up usage output. + (dowin): Correct output of -t mixed for -ADHPSW options. + +2002-06-14 Corinna Vinschen + + * passwd.c: Rearrange includes to avoid unnecessary warnings. + (GetPW): Add parameter to (dis)allow printing of Windows username. + Use defines instead of numerical constants where possible. + Try avoiding impersonation problem. Rearrange to print Windows + username only if it's different from Cygwin username. + (ChangePW): Use defines instead of numerical constants where possible. + (main): Call GetPW with additional parameter. Change error text. + +2002-06-14 Joshua Daniel Franklin + + * passwd.c (GetPW): Handle case of user-edited /etc/passwd + with cygwin_internal (CW_EXTRACT_DOMAIN_AND_USER, ...). + +2002-06-09 Christopher Faylor + + * path.cc (cygpath): Change MOUNT_AUTO to MOUNT_CYGDRIVE. + (getmntent): Ditto. + +2002-06-09 Christopher Faylor + + * mount.cc (main): Use default system/user flag for cygdrive stuff, + too. + (change_cygdrive_prefix): Change MOUNT_AUTO to MOUNT_CYGDRIVE. + * umount.cc (remove_cygdrive_prefix): Ditto. + (main): Use default system/user flag for cygdrive stuff, too. + +2002-06-08 Christopher Faylor + + * mount.cc (opts): Remove '-i' option. + (usage): Ditto. + (main): Ditto. + (longopts): Remove --import-old-mounts option. + +2002-06-07 David Peterson + Christopher Faylor + + * cygpath.cc: Add option to output windows paths in different formats: + "dos" and "mixed". + (main): Process options. + (doit): Check new options flags. + +2002-06-06 Egor Duda + + * regtool.cc (Fail): Be more verbose. + (find_key): Add support for remote registry access. + (usage): Document it. + * utils.sgml: Document it. + +2002-06-06 Christopher Faylor + + * strace.cc (main): Make toggle a local variable. + +2002-06-07 Conrad Scott + + * 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-05 Joshua Daniel Franklin + + * strace.cc (version): New global variable. + (usage): Accommodate stdout output. + (print_version): New function. + +2002-06-03 Joshua Daniel Franklin + + * ssp.c (version): New global variable. + (longopts): Ditto. + (opts): Ditto. + (run_program): Correct cmd_line typos to cmdline. + (usage): New function. Standardize usage output. Add ssp.txt to + --help output. + (print_version): New function. + (main): Accommodate getopt. + +2002-06-03 Joshua Daniel Franklin + + * umount.cc (version): New global variable. + (longopts): Accommodate new --version option. + (opts): Ditto. + (usage): Standardize usage output. + (print_version): New function. + (main): Accommodate --help, --version options. + +2002-06-02 Joshua Daniel Franklin + + * regtool.cc (prog_name): New global variable. + (longopts): Ditto. + (opts): Ditto. + (usage): Standardize usage output. Rearrange/add descriptions. + (print_version): New function. + (main): Accommodate longopts and new --help, --version options. Add + check for (_argv[optind+1] == NULL). + +2002-06-02 Christopher Faylor + + * 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-05-30 Christopher Faylor + + * mkpasswd.cc (main): Don't reset to binmode if stdout is a terminal. + +2002-05-29 Christopher Faylor + + * mount.cc (main): Make -b the default. + +2002-05-29 Corinna Vinschen + + * ps.cc (main): Use uid or uid32 member of struct external_pinfo + dependent of the value of the struct's version member. + +2002-05-29 Corinna Vinschen + + * ps.cc (main): Change print format for uid to unsigned. Use uid32 + member of struct external_pinfo instead of uid. + +2002-05-28 Joshua Daniel Franklin + + * passwd.c (prog_name): New global variable. + (longopts): Ditto. + (opts): Ditto. + (usage): Standardize output. Accommodate new options. + (print_version): New function. + (main): Accommodate longopts and new --help, --version options. + +2002-05-28 Joshua Daniel Franklin + + * ps.cc (usage): Fix typo. + +2002-05-27 Joshua Daniel Franklin + + * ps.cc (prog_name): New global variable. + (longopts): Ditto. + (opts): Ditto. + (usage): New function. + (print_version): New function. + (main): Accommodate longopts and new --help, --version options. + +2002-05-26 Christopher Faylor + + * strace.cc (attach_process): Don't tell process to start stracing + here. + (proc_child): Do it here, instead, after first debug event. This + should work around inexplicable races with DebugActiveProcess. + (dostrace): Pass any pid argument to proc_child. + +2002-05-23 Joshua Daniel Franklin + + * 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-22 Joshua Daniel Franklin + + * mount.cc (version): New global variable. + (usage): Standardize usage output. Accommodate new version option. + (print_version): New function. + (longopts): Accommodate new version option. + (opts): Ditto. + (main): Ditto. + +2002-05-22 Corinna Vinschen + + * cygpath.cc (usage): Change usage output slightly. + +2002-05-20 Joerg Schaible + + * 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-18 Christopher Faylor + + * strace.cc (add_child): Use calloc since new requires working + libstdc++.a. + (remove_child): Ditto for delete/free. + +2002-05-15 Mark Blackburn + + * cygpath.cc (get_short_paths): Fix more error checking. + (get_short_name): Ditto. + +2002-05-14 Joerg Schaible + + * 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-14 Mark Blackburn + + * cygpath.cc (get_short_paths): Fix error checking. + +2002-05-13 Joshua Daniel Franklin + + * kill.cc (prog_name): New global variable. + (usage): Standardize usage output. Add descriptions. + (print_version): New function. + (longopts): Accommodate new version option. + (opts): Ditto. + (main): Ditto. + +2002-05-13 Christopher Faylor + + * kill.cc (listsig): Display numeric id when given symbolic input. + +2002-05-13 Christopher Faylor + + * kill.cc (usage): Show new options. Allow specification of output + stream. + (main): Implement 'h' option. + +2002-05-13 Christopher Faylor + + * 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. + + * mount.cc (longopts): Make static. + (opts): Ditto. + +2002-05-12 Christopher Faylor + + * 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-07 Joshua Daniel Franklin + + * 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-03-29 Corinna Vinschen + + * mkgroup.c (main): Change call to exit() to a return statement. + * mkpasswd.c (main): Ditto. + +2002-03-27 Joshua Daniel Franklin joshuadfranklin@yahoo.com + + * mkpasswd.c (usage): Simplify usage output. Generalize to allow use + for help. Correct '?' typo to 'h'. + (longopts): Add version option. + (opts): Add 'v' version option. + (print_version): New function. + (main): Accommodate new version option. Accommodate usage parameter + changes. + +2002-03-19 Christopher Faylor + + * mkgroup.c (usage): Use one just fprintf + string concatenation for + output message. + (print_version): Add void to function type and update copyright. + +2002-03-16 Joshua Daniel Franklin + + * mkgroup.c (usage): Simplify usage output. Generalize to allow use + for help. Correct '?' typo to 'h'. + (longopts): Add version option. + (opts): Add 'v' version option. + (print_version): New function. + (main): Accommodate new version option. Accommodate usage parameter + changes. Use usage to output help message. + +2002-03-15 Corinna Vinschen + + * mkgroup.c (main): When generating group 513, check for computer's + primary domain instead of current user's domain. + +2002-03-14 Corinna Vinschen + + * mkgroup.c (main): When generating group 513, check for domain SID + if computer name isn't mapped to a SID. + +2001-03-11 Joshua Daniel Franklin + + * kill.cc (usage): Move to top of file. + (getsig): Ditto. + (forcekill): Ditto. + +2002-03-06 Christopher Faylor + + * cygcheck.cc: Reformat. + +2002-03-06 Christopher Faylor + + * cygcheck.cc (longopts): Use correct short option for --version. + +2002-03-06 Christopher Faylor + + * cygpath.cc: Reformat. + +2002-02-27 Joshua Daniel Franklin + + * cygpath.cc (print_version): New function. + (main): Accommodate new version function. Initialize 'o' to prevent + warning. + +2002-02-27 Christopher Faylor + + * cygcheck.cc (main): Eliminate non-GNU formatting glitch. + +2002-02-27 Christopher Faylor + + * ssp.c (help_desk): Fix compiler warning. + +2002-02-27 Joshua Daniel Franklin + Christopher Faylor + + Change appropriate globals to statics throughout. + * cygcheck.cc (usage): Simplify usage output. Generalize to allow use + for help. + (longopts): Add version option. + (opts): Add 'V" version option. + (print_version): New function. + (main): Accommodate new version option. Accommodate usage parameter + changes. Use usage to output help message. + +002-02-19 Christopher Faylor + + * Makefile.in (CXXFLAGS): Add override so that HAVE_DECL_GETOPT is + defined. + (libbfd): Use -B rather than -L so that bfd from build directory is + correctly found. + (libintl): Ditto. + +2002-02-15 Christopher Faylor + + * mount.cc (usage): Fix typo in output. + +2002-02-14 Christopher Faylor + + * strace.cc (attach_process): Change CW_STRACE_ON to CW_STRACE_TOGGLE. + +2002-01-31 Corinna Vinschen + + * mkpasswd.c (main): Set default home path for 9x/Me if --path-to-home + isn't given. + +2002-01-30 Corinna Vinschen + + * passwd.cc (ChangePW): Add parameter to differ between called for + checking old password and called for changing password. If called + for checking old password, return non-zero only if password is surely + incorrect. + (main): Call ChangePW() with additional parameter. + +2002-01-29 Christopher Faylor + + * dump_setup.cc (parse_filename): Don't consider '_' part of the + version. + +2002-01-28 Christopher Faylor + + * cygcheck.cc: Fix typo. Remove uid_t kludge. Rely on kludge in + sys/cygwin.h instead. + * getfacl.c: Add include to remove warning. + * mkgroup.c (main): Assign variables outside of parameter passing. + This seems to eliminate some compiler warnings. + +2002-01-28 Christopher Faylor + + * cygcheck.cc: Use specific cygwin includes, as required. + +2002-01-28 Christopher Faylor + + * Makefile.in (MINGW_INCLUDES): Change cygwin include. + * strace.cc: Use specific cygwin includes, as required. + (load_cygwin): New function. Loads cygwin DLL, if necessary. + (attach_process): Attaches strace to a running process. + (dostrace): Accept pid argument. Attach to pid if supplied. + (usage): Describe -p option. Correct system description. + (longopts): Alphabetize. + (opts): Ditto. + (main): Ditto. Handle -p option. + +2002-01-21 Christopher Faylor + + * Makefile.in (CXXFLAGS): Ensure that important settings are preserved + even when overriden by command line. + +2002-01-21 Christopher Faylor + + * Makefile.in: Build intermediate cygcheck.o to force use of MINGW_CXXFLAGS. + * cygcheck.cc (cygwin_info): Intitialize variable to quiet g++ warning. + (dump_sysinfo): Make variables unsigned to quiet g++ warnings. + * strace.cc (version_string): Rename from SCCSid. + (add_child): Remove unused variable. + (version): Use version_string. Avoid use of fprintf. + +2002-01-21 DJ Delorie + + * Makefile.in: Use CXX instead of CC to compile C++ sources. + +2002-01-17 DJ Delorie + + * cygcheck.cc (already_did): Avoid default constructors, which may + require exception support. + +2001-01-16 Joshua Daniel Franklin + + * cygpath.cc (main): Add options to show Desktop and Start + Menu's Programs directory for current user or all users. + Move bulk of DPWS options outside the getopt case statement. + * utils.sgml: Update cygpath section for ADPWS options. + +2002-01-15 Joerg Schaible + + * cygpath.cc (doit): Empty file ignored using option -i. + +2002-01-15 Mark Bradshaw + + * mkpasswd.c (print_win_error): Add a new function. + (enum_users): Use print_win_error. + (enum_local_groups): Ditto. + (main): Ditto. + +2001-12-26 Jonathan Kamens + + * cygpath.cc (doit): Detect and warn about an empty path. Detect and + warn about errors converting a path. + (main): Set prog_name correctly -- don't leave an extra slash or + backslash at the beginning of it. + +Fri Dec 14 14:04:37 2001 Jason Tishler + + * mkpasswd.c (enum_users): Change to unconditionally use + the --path-to-home option, if supplied by the user. Use default + --path-to-home option value, if appropriate. + (usage): Change usage statement to reflect new semantics. + (main): Remove defaulting of the --path-to-home option. + +Fri Dec 14 12:10:39 2001 Jason Tishler + + * mkpasswd.c (opts): Add indication that '-p' option requires an + argument. + +2001-12-11 Christopher Faylor + + * Makefile.in: Add define to CXXFLAGS. + +2001-12-03 Christopher Faylor + + * cygcheck.cc (usage): Add -c description. + * cygpath.cc (usage): Alphabetize options. + * strace.cc (usage): Ditto. + +2001-11-21 Christopher Faylor + + * path.cc (cygpath): Don't consider cygdrive stuff when trying to derive + native paths. + +2001-11-20 Mark Bradshaw + + * mkpasswd.c: include lmerr.h + (main): New -u option to allow specifying a + specific user. If specified, groups aren't displayed and + output is limited to only the specified user. + (enum_users): If specific user is specified, via -u option, + display only that user's record. With -u use NetUserGetInfo + instead of NetUserEnum. + (load_netapi): Added netusergetinfo. + +2001-11-15 Gary R. Van Sickle + + * strace.cc (main): Change getopt() to getopt_long(). + Add support for help and version info. + Use new parse_mask() function for -m/--mask option. + (longopts): Add long options structure. + (opts): Move options string from getopts call to static var. + (usage): Print usage information. + (SCCSid): Version info. + (version): New function for displaying version info. + (parse_mask): New function supporting parsing of mnemonics, + hex, and basic expressions in masks. + (mnemonic2ul): New mnemonic parsing function. + (tag_mask_mnemonic): New type. + (mnemonic_table): New table of mnemonics for mnemonic2ul() to + search through. + +2001-11-12 Corinna Vinschen + + * cygcheck.cc (dump_sysinfo): Redefine output format slightly. + Print correct build number on 9x/ME systems. + +2001-11-12 Christopher Faylor + + * cygcheck.cc (main): Slight formatting tweak. + +2001-11-12 Corinna Vinschen + + * cygcheck.cc (dump_sysinfo): Add some more details. + +2001-11-12 Corinna Vinschen + + * cygcheck.cc (dump_sysinfo): Print more detailed OS information string + using OSVERSIONINFOEX information. + +2001-11-11 Christopher Faylor + + * path.h: New file. + +2001-11-11 Christopher Faylor + + * cygcheck.cc (scan_registry): Open registry with read-only access. + (main): Reflect argument change for dump_setup. + * dump_setup.cc (dump_setup): Add preliminary extra argument for future + use. + * path.cc (read_mounts): Open registry with read-only access. + +2001-11-11 Christopher Faylor + + * cygcheck.cc (main): Display package info when '-s' is specified. + * dump_setup.cc (dump_setup): Change header. Remove typo. Always sort + packages output. + +2001-11-11 Christopher Faylor + + * dump_setup.cc: New file. + * Makefile.in: Add info for dump_setup.o. + * cygcheck.cc (main): Recognize '-c' option for checking setup + installed base. + * path.cc (cygpath): Read mount table if not loaded. + +2001-11-10 Christopher Faylor + + * Makefile.in (cygcheck.exe): Compile as -mno-cygwin executable. + * path.cc: New file. + * cygcheck.cc (init_paths): Use MS-DOS path syntax. + (cygwin_info): Properly display cygwin version numbers. Prettify some + output. + (dump_sysinfo): Calculate max names of posix and ms-dos paths for + prettier output. + +2001-11-09 Corinna Vinschen + + * cygcheck.cc (dump_sysinfo): Print more detailed OS information string. + +2001-11-04 Corinna Vinschen + + * getfacl.c (username): New function. + (groupname): Ditto. + (usage): Ditto. Add more user friendly help text. + (main): Add -n and --help option. Print names instead of IDs + unless -n option is given. + * setfacl.c (getperm): Tolerate whitespace and comment chars in input. + (getaclentry): Fix several input string misdetections. + (getaclentries): Allow - as input file name to read from stdin. + Tolerate whitespace and comment chars in input. + (usage): Add more user friendly help text. + (main): Add --help option. + +2001-11-04 Egor Duda + + * strace.cc (main): New option '-w'. Start traced process in separate + window. New option '-S x'. Flush buffered output every x seconds. + (create_child): Start child process in new window, when requested. + When requested, periodically flush debugging output. + +2001-10-24 Christopher Faylor + + * Makefile.in: Remove EXEEXT consideration. We always need .exe + extensions. + +2001-10-20 Corinna Vinschen + + * mkgroup.c: Avoid compiler warnings. + (print_special): New function. + (main): Print special accounts by calling print_special(). + * mkpasswd.c: Avoid compiler warnings. + (enum_users): Print additional U-domain\username info in gecos + field when SIDs are printed. + (print_special): New function. + (main): Print special accounts by calling print_special(). + +2001-10-15 Christopher Faylor + + * mkpasswd.cc (enum_users): Shorten "unused" passwd field. + +2001-10-13 Christopher Faylor + + * Makefile.in: Allow stdinc searching for dumper. + +Tue Oct 9 21:59:00 2001 Christopher Faylor + + * Makefile.in (MINGW_INCLUDES): Accommodate changes in Makefile.common. + +Sun Oct 7 23:06:39 2001 Christopher Faylor + + * kill.cc (main): Set exit value to 1 on invalid pid. Perform minor + cleanup. + +Fri Sep 21 20:40:30 2001 Christopher Faylor + + * Makefile.in (mingw_getopt.o): Ensure that newlib include directories + are not searched. + +Thu Sep 20 21:00:20 2001 Christopher Faylor + + * Makefile.in (MINGW_INCLUDES): Still need cygwin/include directory. + +Wed Sep 19 12:22:08 2001 Christopher Faylor + + * Makefile.in: Filter newlib includes from mingw compilation. + +2001-09-14 Egor Duda + + * dumper.cc (dumper::dumper): Print error code in case of error. + (dumper::add_thread): Ditto. + (dumper::collect_memory_sections): Ditto. + (dumper::dump_memory_region): Ditto. + (dumper::collect_process_information): Ditto. + (print_section_name): Fix formatting. + +2001-09-13 Egor Duda + + * dumper.cc (main): Properly recognize negative pids (used by w9x). + +2001-09-09 Egor Duda + + * dumper.cc (main): Change command-line arguments format to be + similar to gdb. Allow adding error_start=x:\path\to\dumper.exe to + CYGWIN environment variable to perform core dumping in case of + program crash. + (usage): Ditto. + +Wed Sep 5 22:37:21 2001 Christopher Faylor + + * Makefile.in (dumper): Change logic for libbfd and libintl so that + they will be found either in the build tree or the installed directory. + * mkpasswd.c (enum_users): Add a comment as a password for NT. + +2001-09-03 Michael A Chase + + * mount.cc (mount_commands): Don't write /cygdrive/u mount points. + +2001-09-03 Michael A Chase + + * mount.cc (longopts): Add mount-commands to options list. + (usage): Add mount-commands option. + (mount_commands): New function. Write commands to recreate current + mounts. + +Sat Sep 1 15:58:11 2001 Christopher Faylor + + * mount.cc (main): Eliminate excess arguments in printf. + +2001-08-30 Egor Duda + + * dumper.h: Update copyright notice. + * dumper.cc: Ditto. + * dumper.cc: (dumper::print_core_section_list): New function. + * dumper.h: (dumper::print_core_section_list): Declare it. + * dumper.cc (print_section_name): New function. + (dumper::collect_process_information): Augment debugging output. + Stop debugee processing if it posts double exception. + (usage): Fix typo in option name. + +Tue Aug 28 14:45:02 2001 Christopher Faylor + + * mount.cc (main): Issue correct warning for 'not enough arguments'. + +2001-08-14 Joerg Schaible + + * cygpath.cc (main): Support -w for Windows (System) directories and + return physical correct orthography for the Windows System dir. + +2001-07-14 Chris Genly + + * regtool.cc (find_key): Handle keys with only one subkey. + +Wed Jun 27 22:46:10 2001 Christopher Faylor + + * regtool.cc (find_key): Revert previous change. + +Wed Jun 27 13:37:41 2001 Keith Starsmeare" + + * regtool.cc (find_key): Allow '/' as a synonym for '\\'. + +Fri Jun 15 00:49:21 2001 Christopher Faylor + + * mkpasswd.c (main): Output passwd file in binary mode so that there + are no CRs in the file. + * umount.cc (remove_all_user_mounts): Don't try to remove /cygdrive + mounts. + +Tue May 1 10:50:48 2001 Christopher Faylor + + * mkpasswd.c (enum_users): Use /bin/bash as the default shell. + (main): Ditto. + +Sat Apr 28 22:32:01 2001 Christopher Faylor + + * passwd.cc (ttymnam): New function. + (main): Use ttynam() to report name of tty. + +2001-04-19 Egor Duda + + * dumper.cc (dumper::init_core_dump): Set architecture field in dump + header. + +Mon Apr 16 15:08:00 2001 Corinna Vinschen + + * mkgroup.c: Add function pointers `netlocalgroupgetmembers' and + `netgroupgetusers'. + (load_netapi): Load function pointers `netlocalgroupgetmembers' + and `netgroupgetusers'. + (enum_local_users): New function. + (enum_local_groups): Call `enum_local_users' for each group if + `print_users' is set. + (enum_users): New function. + (enum_groups): Call `enum_users' for each group if `print_users' is set. + (usage): Add usage text for `-u/--users'. + (longopts): Add option `--users'. + (opts): Add option character `u'. + (main): Set `print_users' according to option `-u/--users'. + Call `enum_local_groups' and `enum_groups' with additional parameter + `print_users'. + +2001-04-15 Michael A Chase + + * mount.cc (longopts): Add help to options list. + (opts): Add 'h' to options string. + * umount.cc (longopts): Add help to options list. + (opts): Add 'h' to options string and change 'R' to 'A'. + +2001-04-13 Kazuhiro Fujieda + + * mkgroup.c (enum_groups): Use RID + offset specified an additional + argument as ID. + (usage): Add description of -o option. + (longopts, opts): Add specifications of -o/--id-offset option. + (main): Add -o option. Invoke enum_groups with specified offset. + * mkpasswd.c (enum_users): Just like mkgroup.c. + (usage, longopts, opts): Ditto. + (main): Add -o option. Invoke enum_users with specified offset only + against domain accounts. + +2001-04-11 Egor Duda + + * mkgroup.c (uni2ansi): Use native method to convert from Unicode + to multi-byte strings. + * mkpasswd.c (uni2ansi): Ditto. + (enum_users): Pass buffer size when converting string. + (enum_local_groups): Ditto. + * mkgroup.c (enum_groups): Ditto. + (enum_local_groups): Ditto. + +Mon Apr 2 22:41:33 2001 Christopher Faylor + + * mount.cc (main): Use getopt_long for parsing arguments. + (usage): Reformat, show long and short options. + * umount.cc (main): Ditto, all of the above. + +Mon Apr 2 10:58:26 2001 Christopher Faylor + + * mount.cc (show_mounts): Change format string to more closely resemble + UNIX when displaying mount table. + +Sat Mar 17 21:46:06 2001 Christopher Faylor + + * kill.cc (forcekill): Use dwProcessId when opening a process, not the + Cygwin pid. + +Mon Mar 5 18:50:00 2001 Corinna Vinschen + + * getfacl.c: Add copyright hint. + * setfacl.c: Ditto. + * strace.cc: Ditto. + +Tue Jan 09 10:26:23 2001 Tony Sideris + + * regtool.cc (cmd_list): Add new registry display options. + (cmd_list): Add code to implement -p, -k, and -l options. + + * regtool.cc (Fail): Add call to LocalFree to free memory allocated by + FormatMessage. + +Wed Jan 10 09:16:57 2001 Christopher Faylor + + * regtool.cc (translate): Ensure that 'c' is initialized. + (cmd_set): Ditto for rv. + 2003-11-07 Mark Blackburn * cygpath.cc (main): Allow multiple pathnames on command line. diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c index c9de68390..d6a5092ec 100644 --- a/winsup/utils/mkgroup.c +++ b/winsup/utils/mkgroup.c @@ -136,7 +136,7 @@ enum_local_users (LPWSTR groupname) DWORD reshdl = 0; if (!netlocalgroupgetmembers (NULL, groupname, - 1, (LPBYTE *) &buf1, + 1, (void *) &buf1, MAX_PREFERRED_LENGTH, &entries, &total, &reshdl)) { @@ -170,7 +170,7 @@ enum_local_groups (int print_sids, int print_users) { DWORD i; - rc = netlocalgroupenum (NULL, 0, (LPBYTE *) &buffer, 1024, + rc = netlocalgroupenum (NULL, 0, (void *) &buffer, 1024, &entriesread, &totalentries, &resume_handle); switch (rc) { @@ -255,7 +255,7 @@ enum_users (LPWSTR servername, LPWSTR groupname) DWORD reshdl = 0; if (!netgroupgetusers (servername, groupname, - 0, (LPBYTE *) &buf1, + 0, (void *) &buf1, MAX_PREFERRED_LENGTH, &entries, &total, &reshdl)) { @@ -292,7 +292,7 @@ enum_groups (LPWSTR servername, int print_sids, int print_users, int id_offset) { DWORD i; - rc = netgroupenum (servername, 2, (LPBYTE *) & buffer, 1024, + rc = netgroupenum (servername, 2, (void *) & buffer, 1024, &entriesread, &totalentries, &resume_handle); switch (rc) { @@ -657,7 +657,7 @@ main (int argc, char **argv) { ret = lsaqueryinformationpolicy (lsa, PolicyPrimaryDomainInformation, - (PVOID *) &pdi); + (void *) &pdi); if (ret == STATUS_SUCCESS) { if (pdi->Sid) @@ -694,10 +694,10 @@ main (int argc, char **argv) if (domain_specified) { mbstowcs (domain_name, argv[optind], (strlen (argv[optind]) + 1)); - rc = netgetdcname (NULL, domain_name, (LPBYTE *) & servername); + rc = netgetdcname (NULL, domain_name, (void *) &servername); } else - rc = netgetdcname (NULL, NULL, (LPBYTE *) & servername); + rc = netgetdcname (NULL, NULL, (void *) &servername); if (rc != ERROR_SUCCESS) { diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c index 4a547a535..d2493b47d 100644 --- a/winsup/utils/mkpasswd.c +++ b/winsup/utils/mkpasswd.c @@ -237,12 +237,12 @@ enum_users (LPWSTR servername, int print_sids, int print_cygpath, { MultiByteToWideChar (CP_ACP, 0, disp_username, -1, uni_name, 512 ); rc = netusergetinfo(servername, (LPWSTR) & uni_name, 3, - (LPBYTE *) &buffer ); + (void *) &buffer ); entriesread=1; } else rc = netuserenum (servername, 3, FILTER_NORMAL_ACCOUNT, - (LPBYTE *) & buffer, 1024, + (void *) &buffer, 1024, &entriesread, &totalentries, &resume_handle); switch (rc) { @@ -367,7 +367,7 @@ enum_local_groups (int print_sids) { DWORD i; - rc = netlocalgroupenum (NULL, 0, (LPBYTE *) & buffer, 1024, + rc = netlocalgroupenum (NULL, 0, (void *) &buffer, 1024, &entriesread, &totalentries, &resume_handle); switch (rc) { @@ -718,10 +718,10 @@ main (int argc, char **argv) if (domain_name_specified) { mbstowcs (domain_name, argv[optind], (strlen (argv[optind]) + 1)); - rc = netgetdcname (NULL, domain_name, (LPBYTE *) & servername); + rc = netgetdcname (NULL, domain_name, (void *) &servername); } else - rc = netgetdcname (NULL, NULL, (LPBYTE *) & servername); + rc = netgetdcname (NULL, NULL, (void *) &servername); if (rc != ERROR_SUCCESS) { diff --git a/winsup/utils/passwd.c b/winsup/utils/passwd.c index a6fc778d4..d0f3289cb 100644 --- a/winsup/utils/passwd.c +++ b/winsup/utils/passwd.c @@ -133,7 +133,7 @@ GetPW (char *user, int print_win_name) } } MultiByteToWideChar (CP_ACP, 0, user, -1, name, 2 * (UNLEN + 1)); - ret = NetUserGetInfo (NULL, name, 3, (LPBYTE *) &ui); + ret = NetUserGetInfo (NULL, name, 3, (void *) &ui); return EvalRet (ret, user) ? NULL : ui; } @@ -184,7 +184,7 @@ PrintPW (PUSER_INFO_3 ui) printf ("Password expired : %s", (ui->usri3_password_expired) ? "yes\n" : "no\n"); printf ("Latest password change : %s", ctime(&t)); - ret = NetUserModalsGet (NULL, 0, (LPBYTE *) &mi); + ret = NetUserModalsGet (NULL, 0, (void *) &mi); if (! ret) { if (mi->usrmod0_max_passwd_age == TIMEQ_FOREVER) @@ -213,7 +213,7 @@ SetModals (int xarg, int narg, int iarg, int Larg) int ret; PUSER_MODALS_INFO_0 mi; - ret = NetUserModalsGet (NULL, 0, (LPBYTE *) &mi); + ret = NetUserModalsGet (NULL, 0, (void *) &mi); if (! ret) { if (xarg == 0)