summaryrefslogtreecommitdiffstats
path: root/winsup/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* * setfacl.c (setfacl): Change from void to int. Return 2 in case ofCorinna Vinschen2008-05-222-7/+20
| | | | | error. (main): Return with error code from setfacl.
* * Makefile.in (CYGWIN_BINS): Remove ipcrm and ipcs.Corinna Vinschen2008-05-154-1054/+7
| | | | | * ipcrm.c: Remove. * ipcs.c: Remove.
* * mount.cc (usage): Mark -s and -u as ignored.Corinna Vinschen2008-04-232-15/+15
| | | | | | (print_version): Simplify printing copyright dates. (main): Remove default_flag. Dont set flags on -s and -u options. (mount_commands): Drop handling -s and -u options.
* * cygcheck.cc (dump_sysinfo): Fix multiple Cygwin DLL test.Corinna Vinschen2008-04-223-116/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | * path.cc: Fetch mount points from fstab files instead of from registry. Use adapted functions copied from Cygwin DLL. (mnt_t): Drop issys member. Define as "mnt_t" instead of "struct mnt_t" subsequently. (max_mount_entry): New variable. (unconvert_slashes): Move to earlier location in file. Make inline. (find2): Remove. (get_cygdrive0): Remove. (get_cygdrive): Remove. (skip_ws): New function. (find_ws): Ditto. (conv_fstab_spaces): Ditto. (read_flags): Ditto. (from_fstab_line): Ditto. (get_user): Ditto. (from_fstab): Ditto. (mnt_sort): Ditto. (read_mounts): Drop old registry code. Fetch "Software\Cygwin\Setup\rootdir" value from HKCU or HKLM key. Use rootdir extracted from module path as fallback. Call from_fstab for nouser and user mount points. (setmntent): Check max_mount_entry to test if read_mounts must be called. (getmntent): Use MOUNT_SYSTEM flag instead of mnt_t's issys member.
* * path.cc: Include malloc.h for alloca.Brian Dessent2008-03-162-48/+53
| | | | | | (is_symlink): Rewrite. Just read the whole file in memory rather than by parts. Account for an ITEMIDLIST if present, as well as the new style of Cygwin shortcut supporting targets > MAX_PATH.
* * cygpath.cc (do_sysfolders): Use cygwin_conv_path.Corinna Vinschen2008-03-126-29/+53
| | | | | | | | | | | | (do_pathconv): Use cygwin_conv_path and cygwin_conv_path_list. * dumper.cc (main): Use cygwin_conv_path. Allocate target path dynamically. * mkpasswd.c (current_user): Use cygwin_conv_path. (enum_users): Ditto. * ps.cc (NT_MAX_PATH): Define. (main): Use cygwin_conv_path. * regtool.cc (find_key): Ditto. Allocate target path dynamically. (cmd_save): Ditto.
* * cygcheck.cc (find_app_on_path): Make buffer SYMLINK_MAX + 1Brian Dessent2008-03-112-3/+8
| | | | chars.
* * cygcheck.cc (dirname): New static function.Brian Dessent2008-03-114-31/+100
| | | | | | | | | | | | | | (find_app_on_path): Use SYMLINK_MAX. Resolve symlink relative to link's location. Adjust to the fact that cygpath already normalizes its return value. * path.cc (rel_vconcat): Add cwd parameter, and use it instead of calling GetCurrentDirectory() if possible. Rename throughout. (vcygpath): Rename from cygpath and accept cwd and va_list. Pass cwd on to rel_vconcat(). (cygpath_rel): New front end for vcygpath. (cygpath): Ditto. * path.h (cygpath_rel): Declare. (SYMLINK_MAX): Define to 4095.
* * Makefile.in (install): Don't install the testsuite.Brian Dessent2008-03-092-1/+5
|
* * Makefile.in: Add a 'check' target that builds and runsBrian Dessent2008-03-095-13/+309
| | | | | | | | | | | | | | | | | | | | | testsuite.exe from path-testsuite.o and testsuite.o. * path.cc: Include testsuite.h. (struct mnt): Change to a mnt_t typedef and don't define mount_table when TESTSUITE is defined. (find2): Don't include when TESTSUITE is defined to avoid warning. (get_cygdrive0): Ditto. (get_cygdrive): Ditto. (read_mounts): Provide empty implementation when TESTSUITE is defined. (vconcat): Use the isslash macro. (unconvert_slashes): New helper to convert to backslashses. (rel_vconcat): Handle relative paths more gracefully. (cygpath): Skip a leading "./" sequence. Avoid double-slashes. Normalize final output to backslashes and remove redundant path sequences. * testsuite.cc: New file implementing testsuite driver. * testsuite.h: New header implementing harness mount table and series of tests.
* * Makefile.in: Reorganize considerably, using GNU make'sBrian Dessent2008-03-082-149/+87
| | | | static pattern rules and target-specific variables.
* * mkpasswd.c (main): Simplify generating SYSTEM entry. Add entriesCorinna Vinschen2008-02-282-15/+10
| | | | for LocalService and NetworkService accounts. Change comments.
* * cygcheck.cc (dump_sysinfo): Always try to get a OSVERSIONINFOEXCorinna Vinschen2008-01-132-59/+126
| | | | | | first. Load kernel32.dll earlier. Make osname a buffer. Simplify Non-NT code. Use GetProductInfo in Vista/2008 case. Clean up non-Vista version info. Exit early if not on NT.
* * bloda.cc (enum bad_app): Add BYTEMOBILE.Dave Korn2007-12-292-1/+15
| | | | | (dodgy_app_detects[]): Add FILENAME entry to detect bmnet.dll. (big_list_of_dodgy_apps[]): Add description for BYTEMOBILE.
* * Makefile.in (cygcheck.exe): Don't link to ntdll.Brian Dessent2007-12-213-12/+42
| | | | | | | | * bloda.cc (pNtQuerySystemInformation): Add. (pRtlAnsiStringToUnicodeString): Add. (get_process_list): Use function pointers for NT functions. (dump_dodgy_apps): Skip dodgy app check on non-NT platforms. Use GetProcAddress for NT-specific functions.
* * regtool.cc (opts): Add missing 'W'.Corinna Vinschen2007-12-072-1/+5
|
* * ps.cc: Include limits.h.Corinna Vinschen2007-12-062-3/+14
| | | | | | (main): Set file name buffer size to PATH_MAX. Use progname or progname_long member of struct external_pinfo dependent of the value of the struct's version member.
* 2007-08-31 Dave Korn <dave.korn@artimi.com>Dave Korn2007-08-312-1/+6
| | | | | * mkgroup.c (enum_groups): Use MAX_PREFERRED_LENGTH in netgroupenum call so that it will automatically size returned buffer sufficiently.
* * Makefile.in (cygcheck.exe): Add bloda.o as prerequisite, adjustingDave Korn2007-08-034-5/+438
| | | | | | | | dependency-filtering $(wordlist ...) call appropriately. Link ntdll. (bloda.o): New rule to build bloda.o * cygcheck.cc (dump_sysinfo): Call bloda function dump_dodgy_apps(). * bloda.cc: New file implements detection of applications from the Big List Of Dodgy Apps.
* Add missing ChangeLog entry.Corinna Vinschen2007-07-241-0/+1
|
* * dumper.cc: Change license to plain GPLv2 + later.Corinna Vinschen2007-07-245-10/+386
| | | | | * dumper.h: Ditto. * parse_pe.cc: Ditto.
* * strace.cc (create_child): Don't convert a path from cygwin format unless itChristopher Faylor2007-07-232-1/+7
| | | | has a slash.
* * strace.cc (usage): Add missing description for -q.Christopher Faylor2007-07-102-1/+6
|
* * cygwin/strsig.cc (__signals): New macro.Christopher Faylor2007-07-103-3/+17
| | | | | | | | | | | (sys_sigabbrev): New array of signal strings, patterned after linux. (siglist): Use __signals. * cygwin/include/cygwin/signal.h (sys_sigabbrev): Define. * cygwin/include/cygwin/version.h: Bump API minor version to 177. * utils/Makefile.in (kill.exe): Remove reliance on libiberty. * utils/kill.cc (strsigno): New function patterned after libiberty but using newly exported cygwin array.
* * cygcheck.cc (pathlike): New class.Christopher Faylor2007-06-043-183/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (paths): Redefine as type pathlike. (display_error): Declare a few different ways to allow more flexible usage throughout. (display_error_fmt): New function for those cases where C++ just isn't enough. (add_path): Rewrite to allocate pathlike paths. Always tack on a trailing slash since that's what everyone who uses it wants. NULL terminate the path list. Register "it's a system path" field. (init_path): Call add_path with info regarding whether path is a system path or not. (pathlike::check_existence): Move into pathlike class. Accept file and extension arguments to build up path on the fly. Modify other arguments. (find_on_path): Constify return value and appropriate arguments. Eliminate short-circuit for fully-qualified paths. Simplify loop which iterates over path. (already_did): Constify argument. (track_down): Ditto. Regularize some error messages. (find_app_on_path): Ditto. (cygcheck): Constify argument. Use 20th century string handling functions. (dump_sysinfo): Remove odd inclusion of '\\bin' "Just in case". Accommodate change of paths to pathlike. * path.cc (isslash): Rename from SLASH_P and use throughout. (rel_vconcat): Front-end to vconcat which prepends cwd to path before passing along for conversion to native windows. (cygpath): Remove "./" test. Call rel_vconcat if filename appears to be relative.
* * dumper.cc (dumper::prepare_core_dump): Record a phdr for each section.Corinna Vinschen2007-05-292-3/+62
|
* * cygpath.cc (do_options): Allow outputflag combined with otherCorinna Vinschen2007-05-292-9/+15
| | | | | | | basic flags. Only check options_from_file_flag if reading options from command line. (main): Check for NULL argz vector. Don't free argz vector prematurely. Don't force flag combination in !options_from_file_flag case.
* * cygpath.cc: Include argz.h.Corinna Vinschen2007-05-232-127/+130
| | | | | | | | | | | | | | (options_from_file_flag): Move from main to global static variable. (mode_flag): Ditto. (do_sysfolders): Rename from dowin and accommodate throughout. Don't exit from here. (do_pathconv): Rename from doit and accommodate throughout. (print_version): Change copyright. (do_options): New function, centralizing option processing. Rework checking options for correctness. (action): New function, centralizing calling worker functions. (main): Simplify. Move option processing to do_options. Move calling worker functions to action. Rework getting arguments from files.
* * utils/cygpath.cc (get_long_path_name_w32impl): Close handles returned byChristopher Faylor2007-03-312-4/+15
| | | | FindFirstFile.
* * cygwin/external.cc (cygwin_internal): Implement CW_SET_DOS_FILE_WARNING.Christopher Faylor2007-03-302-0/+7
| | | | | | * cygwin/include/sys/cygwin.h: Define CW_SET_DOS_FILE_WARNING. * utils/mount.cc (main): Turn dos file warnings off since we know what we're doing.
* * ipcs.c (_POSIX2_LINE_MAX): Drop definition.Corinna Vinschen2007-02-222-1/+4
|
* * cygcheck.cc (dump_sysinfo): Add "not supported" to osname on 9xCorinna Vinschen2007-02-202-12/+12
| | | | | machines. Drop "not supported" for Vista. Drop "Longhorn" text for now.
* * cygpath.cc (usage): Add -O and -F, remove tabs.Corinna Vinschen2007-01-093-40/+99
| | | | | | | | (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.
* * dumper.cc: Include ansidecl.h before including bfd.h to woraroundCorinna Vinschen2006-12-212-2/+7
| | | | a problem with the order in which system include files are included.
* * dumper.cc: Add an include to accommodate new include/elf usage.Christopher Faylor2006-12-112-0/+5
|
* correct email addressChristopher Faylor2006-12-111-1/+1
|
* * mount.cc (do_mount): Avoid unnecessary cygwin_conv_to_win32_path and passChristopher Faylor2006-12-102-4/+6
| | | | POSIX path directly - this avoids a cygwin DLL warning.
* * regtool.cc (key_type): Drop.Corinna Vinschen2006-10-212-111/+218
| | | | | | | | | | | | | | | | | | | | (REG_AUTO): Define. (value_type): Replace key_type. Use REG_xxx values directly. Accomodate change throughout. (longopts): Add --dword, --dword-le, --none, --qword and --hex options. (opts): Add -d, -D, -n, -Q and -x options. (types): Array to convert REG_xxx into strings. (hex): New variable to keep value of --hex option. (usage): Accomodate new options. Print only the necessary by default. Only be verbose in case of -h/--help option. (cmd_list): Use key separator from -K option when printing. Print value type when verbose option is given. Handle so far not handled REG_xxx types. (cmd_set): Avoid SEGV due to missing argument. Handle so far not handled REG_xxx types. (cmd_get): Handle --binary option type agnostic. Handle so far not handled REG_xxx types. (main): Handle new options.
* * regtool.cc (longopts): Add --wow32 option.Corinna Vinschen2006-10-193-0/+19
| | | | | | | (opts): Add -W option. (usage): Add text for --wow32/-W option. (main): Handle --wow32/-W option. * utils.sgml: Document the new -W option.
* * regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead defineCorinna Vinschen2006-10-162-4/+6
| | | | WINVER to 0x0502 before including windows.h.
* * regtool.cc (KEY_WOW64_64KEY): Define.Corinna Vinschen2006-10-163-6/+57
| | | | | | | | | | | | | | | (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.
* * cygcheck.cc (get_word, get_dword): Move to path.cc.Corinna Vinschen2006-10-054-46/+363
| | | | | | | | | | | | | | | | | | | (LINK_EXTENSION): New macro. (check_existence): New static function. (find_on_path): Check for symbolic links if asked. (dll_info): New error handling. (track_down): Only call dll_info() for executables, display an error for symlinks, and print magic number for others. (find_app_on_path): New static function. (cygcheck, dump_sysinfo): Call find_app_on_path() instead of find_on_path(). * path.cc (cmp_shortcut_header): New static function. (get_word, get_dword): Moved from cygcheck.cc. (EXE_MAGIC, SHORTCUT_MAGIC, SYMLINK_COOKIE, SYMLINK_MAGIC): New macros. (is_exe, is_symlink, readlink): New functions. * path.h (is_exe, is_symlink, readlink): Declare. (get_word, get_dword): Ditto.
* white spaceChristopher Faylor2006-09-131-1/+1
|
* Check in previously mentioned change to cygcheck.ccChristopher Faylor2006-09-131-0/+6
|
* * Makefile.in: Fix -ntdll typo.Christopher Faylor2006-09-122-3/+12
| | | | | * cygcheck.cc (main): Restore POSIXLY_CORRECT before displaying user's environment.
* * path.cc (vconcat): Don't convert backslahes to slashes.Corinna Vinschen2006-08-032-4/+6
| | | | (cygpath): Return native path with all backslashes.
* * Makefile.in (cygpath.exe): Add rule to link cygpath against ntdll.dll.Corinna Vinschen2006-08-023-0/+178
| | | | | | | | | * cygpath.cc: Include DDK headers. (RtlAllocateUnicodeString): New static inline function. (get_device_name): New static function to evaluate DOS path from native NT path. (get_device_paths): New function to do the same for path lists. (doit): Call get_device_paths/get_device_name where appropriate.
* * cygpath.cc (get_long_name): Fallback to get_long_path_name_w32impl.Corinna Vinschen2006-07-312-4/+15
|
* * cygpath.c (get_long_name): Cover the case that GetLongPathNameCorinna Vinschen2006-07-272-4/+16
| | | | | doesn't return valid information for non-existant files. Just return incoming filename in that case.
* * Makefile.in: Build setmetamode.exe.Corinna Vinschen2006-07-033-1/+88
| | | | * setmetamode.c: New file.