Commit Graph

7240 Commits

Author SHA1 Message Date
Corinna Vinschen 5c86c94db7 * utils.sgml: Fix typo in passwd screen text. 2008-12-16 10:56:33 +00:00
Corinna Vinschen 2cc8b9e014 * fhandler_registry.cc (DEFAULT_VALUE_NAME): Remove constant.
(encode_regname): Encode empty (default) name to "@".
	Encode "@" to "%40".  Change error return to -1.
	(decode_regname): Decode "@" to empty name.  Decode "%40" to "@".
	(fhandler_registry::exists): Skip check for keys if name is empty.
	Remove check for DEFAULT_VALUE_NAME, now handled by decode_regname ().
	(fhandler_registry::readdir): Remove check for empty name, now
	handled by encode_regname ().
	(fhandler_registry::open): Remove check for DEFAULT_VALUE_NAME.
	(fhandler_registry::open_key): Fail with ENOENT if key name is empty.
2008-12-16 09:20:05 +00:00
Corinna Vinschen 1348f65bb9 * syscalls.cc (gen_full_path_at): Use isabspath instead of isdirsep
to recognize absolute path.
2008-12-15 20:53:18 +00:00
Corinna Vinschen 658fe9ec36 * sec_auth.cc (open_local_policy): Set lsa handle to
INVALID_HANDLE_VALUE when LsaOpenPolicy fails.  Explain why.
2008-12-15 20:25:44 +00:00
Corinna Vinschen 63a89e8464 * setlsapwd.cc (setlsapwd): Simplify code. Only try to call cygserver
if opening local policy fails.  Don't treat removing non-existant
	private data as error.
2008-12-15 18:07:35 +00:00
Corinna Vinschen faded04e6c * setpwd.cc (client_request_setpwd::serve): Don't treat removing
non-existant private data as error.
2008-12-15 18:05:50 +00:00
Corinna Vinschen 85fd77a145 * setlsapwd.cc (setlsapwd): Explicitely erase password buffer content
after usage.
2008-12-15 17:39:39 +00:00
Corinna Vinschen d08afb78d1 * setpwd.cc (client_request_setpwd::serve): Explicitely erase password
buffer content after usage.
2008-12-15 17:39:21 +00:00
Corinna Vinschen 8d12bd32cd * passwd.c (main): Put how to delete the registry password on its own
line in passwd -R output.
2008-12-15 17:33:08 +00:00
Corinna Vinschen 6452986601 * fhandler_registry.cc (fhandler_registry::exists): Handle EACCES.
(fhandler_registry::open): Ditto.
2008-12-15 12:51:46 +00:00
Corinna Vinschen f8a41da921 * cygwin.din: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc,
getwchar, putwc, putwchar, ungetwc.
	* posix.sgml: Move above functions (add missing) into "implemented
	SUSv3" section.
	* include/cygwin/version.h: Bump api minor number.
2008-12-15 12:40:29 +00:00
Corinna Vinschen 305b19d738 * fhandler.h (class fhandler_registry): Declare dup method.
* fhandler_registry.cc (fhandler_registry::exists): Fix missing
	parenthesis.
	(fhandler_registry::dup): New method.
2008-12-15 12:33:27 +00:00
Corinna Vinschen 12406f25fb * gcc.sgml: Use 'bash$' as Cygwin prompt throughout.
* gdb.sgml: Ditto.
	* pathnames.sgml: Ditto.  Fix the @ expansion example.
2008-12-15 09:37:50 +00:00
Christopher Faylor ec4eb70c33 * fhandler_disk_file.cc (readdir_get_ino): Don't complain about MS-DOS paths
since the function could be fed one by an internal call.
2008-12-14 06:01:46 +00:00
Christopher Faylor 2b0c1c0d44 * utils.sgml: Convert some backslashes to slashes. 2008-12-13 22:43:54 +00:00
Christopher Faylor 693862058a * pathnames.sgml: Convert some backslashes to slashes. 2008-12-13 21:14:44 +00:00
Christopher Faylor 9fe25af7a6 * cygheap.cc (cygheap_user::~cygheap_user): Remove unneeded if 0'ed code.
* fhandler_registry.cc (fhandler_registry::exists): Recode goto as if/else to
avoid a gcc4 compiler warning.
(fhandler_registry::open): Ditto.  Use one goto rather than two.
* gentls_offsets: Fix compiler warning in generated output.
* tlsoffsets.h: Regenerate.
* mount.cc (fillout_mntent): slashify native paths returned via getmntent.
2008-12-13 21:05:31 +00:00
Corinna Vinschen baaa8b9140 * pathnames.sgml: New section for /proc/registry. Document registry
name encoding.
2008-12-12 15:14:06 +00:00
Corinna Vinschen 373e8a118b * resolv.h: #include <netinet/in.h> for sockaddr_in typedef. 2008-12-09 16:09:46 +00:00
Danny Smith cf2f4a6aef Committed as obvious.
2008-12-08  Dmitry G. Gorbachev  <d.g.gorbachev@gmail.com>

	* cpu_features.c (__cpu_features_init): Remove erroneous ';'.
2008-12-09 02:42:21 +00:00
Corinna Vinschen d27ebea923 * fhandler_registry.cc (encode_regname): Add Parameter add_val.
Append "%val" if add_val is set.
	(decode_regname): Remove trailing "%val". Change returncode accordingly.
	(__DIR_hash): New class.
	(d_hash): New macro.
	(key_exists): New function.
	(fhandler_registry::exists): Remove encode of registry name before path
	compare, decode file part of path instead.  Skip checks for keys if
	trailing "%val" detected.
	(fhandler_registry::fstat): Change check of return value of
	decode_regname ().
	(fhandler_registry::readdir): Allocate __DIR_hash.  Record key names in
	hash table. Append "%val" if key with same name exists. Fix error
	handling of encode_regname ().  Set dirent.d_type.
	(fhandler_registry::closedir): Delete __DIR_hash.
	(fhandler_registry::open): Don't open key if trailing "%val" detected
	by decode_regname ().
	(open_key): Ditto.
2008-12-08 11:45:18 +00:00
Chris Sutcliffe 4864a38c34 2008-12-05 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.13.
        * Makefile.in: Ditto.
2008-12-06 02:25:28 +00:00
Chris Sutcliffe 8310aa78b2 2008-12-05 Chris Sutcliffe <ir0nh34d@users.sf.net>
* lib/glut.def: remove.
        * lib/glut32.def: ditto.
2008-12-06 02:19:57 +00:00
Corinna Vinschen edff4e3d94 * ntsec.sgml: Fix typo. 2008-12-04 10:07:54 +00:00
Corinna Vinschen e1984134be * libc/minires.c (open_sock): Set non blocking and close on exec.
(res_ninit): Set id pseudo-randomly.
	(res_nsend): Do not set close on exec. Initialize server from id.
	Flush socket. Tighten rules for answer acceptance.
	(res_nmkquery): Update id using current data.
2008-12-03 16:37:53 +00:00
Corinna Vinschen 5875a5e7d5 * ntsec.sgml: Revamp parts of the doc for clearness. 2008-12-03 11:47:27 +00:00
Corinna Vinschen f5e7a77023 * ntsec.sgml: Fix a few typos. 2008-12-02 19:29:37 +00:00
Corinna Vinschen fcbc8f1968 * cygserver.sgml: Fix cross reference to the ntsec documentation. 2008-12-02 17:39:39 +00:00
Corinna Vinschen 798afebc20 * cygserver.sgml: Document new feature to store hidden passwords
for seteuid.
2008-12-02 17:32:38 +00:00
Corinna Vinschen e39e660c54 * ntsec.sgml: Finishing up changes for 1.7. 2008-12-02 17:07:40 +00:00
Corinna Vinschen 1a3e844b43 * fhandler_registry.cc (must_encode): Fix condition changed for testing. 2008-12-02 11:44:58 +00:00
Corinna Vinschen 651d8393c8 * fhandler_registry.cc (must_encode): New function.
(encode_regname): Ditto.
	(decode_regname): Ditto.
	(fhandler_registry::exists): Encode name before path compare.
	(fhandler_registry::fstat): Pass decoded name to win32 registry call.
	(fhandler_registry::readdir): Return encoded name to user.
	(fhandler_registry::open): Store decoded name into value_name.
	(open_key): Pass decoded name to win32 registry call.
2008-12-02 11:40:13 +00:00
Corinna Vinschen d973def200 * ntsec.sgml: Further changes for 1.7. Switch from "NT" to "Windows".
Add preliminary text.  Try to be more clear in description.  Remove
	useless chapters.  Finish the permission related chapters.
2008-12-01 18:34:44 +00:00
Christopher Faylor 83448783d5 fix typo 2008-11-30 22:42:24 +00:00
Christopher Faylor 51aa4c032b * faq-using.xml: Remove assertion that lpr doesn't exit.
* faq-what.xml: Remove ancient who's who data.
2008-11-30 22:37:45 +00:00
Christopher Faylor 4ff5152887 * exceptions.c (sigpacket::process): Set tls on return since it is assumed to
be set to a valid value by the caller.
2008-11-29 02:41:38 +00:00
Christopher Faylor 412ec1f444 * include/cygwin/version.h: Bump api minor number to 189 to flag the
implementation of dirent.d_type.
2008-11-29 01:39:53 +00:00
Christopher Faylor d92ed436e3 * exceptions.cc (sigpacket::process): Rework previous change. tls could still
become NULL.
2008-11-28 16:41:54 +00:00
Corinna Vinschen fa421c7a75 * dir.cc (readdir_worker): Initialize dirent.d_type and __d_unused1.
* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper):
	Set dirent.d_type based on FILE_ATTRIBUTE_*.
	* include/sys/dirent.h: Define _DIRENT_HAVE_D_TYPE (enables DT_*
	declarations).
	(struct dirent): Add d_type. Adjust __d_unused1 size to preserve layout.
2008-11-28 09:04:35 +00:00
Christopher Faylor 65ebf94e53 * exceptions.cc (sigpacket::process): Make sure that 'tls' is never NULL when
used.
2008-11-28 02:56:09 +00:00
Christopher Faylor 15c509b515 clarify entry 2008-11-26 17:21:20 +00:00
Christopher Faylor 025c1fac6e Remove unneeded whitespace.
* fhandler_fifo.cc (fhandler_fifo::open): Rework to cause errno to be set to
ENXIO when opening a fifo write/nonblocking.
* environ.cc (ucreqenv): Rename to ucenv.  Move code from old ucenv here and
conditionalize it on create_upcaseenv.
(ucenv): Delete.
(environ_init): Fix compiler warning by moving create_upcaseenv test to ucenv.
Don't bother checking for child_proc_info when calling ucenv since it is
assumed to be NULL at the point where the function is called.
* path.cc (symlink_worker): Turn off MS-DOS path warnings when dealing with
devices since the device handler passes in a translated MS-DOS path.
* sec_auth.cc (lsaprivkeyauth): Avoid variable initialization which causes a
compiler error.
* fhandler_netdrive.cc: Update copyright.
2008-11-26 17:21:04 +00:00
Christopher Faylor f43f75a09d * Revert erroneous checkin. 2008-11-26 16:42:27 +00:00
Christopher Faylor b73c50e86a update copyright 2008-11-26 16:42:00 +00:00
Christopher Faylor 81fa789153 * Makefile.in: Revert erroneous checkin.
* Makefile.common: Tweak to work better with new utils/mingw front-end.
2008-11-26 16:40:29 +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 d4db08d7a6 * Makefile.in (OBJS): Add setpwd.o.
* README: Explain new service to store passwords in the LSA registry
	area.
	* bsd_helper.cc (get_token_info): Make externally available.
	* bsd_helper.h (get_token_info): Declare.
	* client.cc (client_request::handle_request): Add case for
	CYGSERVER_REQUEST_SETPWD request.
	* setpwd.cc: New file implementing the CYGSERVER_REQUEST_SETPWD
	request.
2008-11-26 10:18:53 +00:00
Corinna Vinschen 51303cbd0c * Makefile.in (DLL_OFILES): Add setlsapwd.o.
* cygserver.h (CYGWIN_SERVER_VERSION_API): Bump.
	(request_code_t): Define CYGSERVER_REQUEST_SETPWD request type.
	* cygserver_msg.h (client_request_msg::retval): Use default value of -1
	for retval if msglen is 0.
	* cygserver_sem.h (client_request_sem::retval): Ditto.
	* cygserver_shm.h (client_request_shm::retval): Ditto.
	* cygserver_setpwd.h: New file.
	* external.cc (cygwin_internal): Implement new CW_SET_PRIV_KEY type.
	* sec_auth.cc (open_local_policy): Make externally available.
	Get ACCESS_MASK as argument.
	(create_token): Accommodate change to open_local_policy.
	(lsaauth): Ditto.
	(lsaprivkeyauth): New function fetching token by retrieving
	password stored in Cygwin or Interix LSA private data area and
	calling LogonUser with it.
	* security.h (lsaprivkeyauth): Declare.
	(open_local_policy): Declare.
	* setlsapwd.cc: New file implementing setting LSA private data password
	using LsaStorePrivateData or by calling cygserver if available.
	* syscalls.cc (seteuid32): Add workaround to get the original token
	when switching back to the original privileged user, even if
	setgroups group list is still active.  Add long comment to explain why.
	Call lsaprivkeyauth first, only if that fails call lsaauth or
	create_token.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_SET_PRIV_KEY.
2008-11-26 10:18:10 +00:00
Christopher Faylor b94518ea98 * overview2.sgml: Reorganize and make minor wording changes. 2008-11-25 16:39:58 +00:00
Christopher Faylor a5032b7899 * overview2.sgml: Clarify unix-specific automatic updates section. 2008-11-25 16:20:30 +00:00