Commit Graph

10494 Commits

Author SHA1 Message Date
Corinna Vinschen 3bde24b892 * mkgroup.c (main): Call enum_local_groups with offset 0x30000 for local
machine, too.
2014-11-28 08:44:39 +00:00
Corinna Vinschen f3939c059c * mkgroup.c (main): Call enum_groups with offset 0x30000 for local
machine, same as from DB.
	* mkpasswd.c (enum_unix_users): Set pw_passwd field to '*'.
	(enum_users): Ditto.
	(main): Call enum_users with offset of 0x30000 for local machine,
	same as from DB.
2014-11-27 19:55:37 +00:00
Corinna Vinschen e7d7418270 * mount.cc (mount_info::init): Take bool argument and allow to
initialize mount table in two steps, system and user, depending on
	bool value.
	* mount.h (class mount_info): Align declaration of init function to
	above change.
	* shared.cc (user_info::initialize): Initialize mount table in two
	steps to allow internal_getpwsid to create valid POSIX paths from
	DOS paths given in AD.  Add comments.
	* uinfo.cc (cygheap_pwdgrp::get_home): Allow DOS paths in
	NSS_SCHEME_FREEATTR attributes.
	(cygheap_pwdgrp::get_shell): Ditto.
2014-11-27 16:49:41 +00:00
Corinna Vinschen db880b5642 * cygheap.cc (init_cygheap::find_tls): Allow to keep loop going after
access to threadlist[ix] faulted.  In case of an exception, remove
	threadlist[ix] from threadlist only.  Add comment.
2014-11-27 16:20:14 +00:00
Corinna Vinschen 93d15b36ef * Makefile.in (install): Add install-ldif target.
(install-ldif): New target to install cygwin.ldif.
	* cygheap.h (class cygheap_pwdgrp): Rename pfx_t to nss_pfx_t.  Add
	PFX to enum value.  Add nss_scheme_method enum and nss_scheme_t
	structure.  Add home_scheme, shell_scheme and gecos_scheme members.
	(NSS_SCHEME_MAX): Define.
	(cygheap_pwdgrp::get_home): Declare.
	(cygheap_pwdgrp::get_shell): Declare.
	(cygheap_pwdgrp::get_gecos): Declare.
	* cygwin.ldif: New file.
	* ldap.cc (std_user_attr): New array, just defining the standard
	attributes.
	(group_attr): Add cygwinUnixGid.
	(user_attr): Convert to macro pointing to cygheap->pg.ldap_user_attr.
	(cygheap_pwdgrp::init_ldap_user_attr): New method.
	(cyg_ldap::fetch_ad_account): Call cygheap_pwdgrp::init_ldap_user_attr
	if user_attr initialization is required.  Fix comment.
	(cyg_ldap::get_string_attribute): Implement taking attribute name
	as argument.
	* ldap.h: Drop unused macros.
	(cyg_ldap::get_gecos): Remove.
	(cyg_ldap::get_home): Remove.
	(cyg_ldap::get_shell): Remove.
	(cyg_ldap::get_string_attribute): Declare name argument variant public.
	* uinfo.cc (cygheap_user::ontherange): Fix indentation.
	(cygheap_pwdgrp::init): Initialize new home_scheme, shell_scheme and
	gecos_scheme members.  Align comment.
	(NSS_NCMP): Define comparison macro.
	(NSS_CMP): Ditto.
	(cygheap_pwdgrp::nss_init_line): Use aforementioned macros throughout.
	Fix comment handling.  Add db_home, db_shell and db_gecos handling.
	(fetch_from_description): New function to fetch XML-style attributes
	from (description) string.
	(fetch_from_path): New function to evaluate path string with wildcards.
	(cygheap_pwdgrp::get_home): New methods to fetch pw_dir value.
	(cygheap_pwdgrp::get_shell): Ditto for pw_shell.
	(cygheap_pwdgrp::get_gecos): Ditto for pw_gecos.
	(colon_to_semicolon): Move up.
	(pwdgrp::fetch_account_from_windows): Convert home, shell, gecos
	variables to char*.  Drop statement breaking extended group info.
	Fetch home, shell and gecos values using new methods.  Use
	fetch_from_description calls to fetch UNIX id and primary groups from
	SAM comment field.  Accommodate uxid being a char* now.  Accommodate
	the fact that extended info is malloc'ed, rather then alloca'ed.
	Create linebuf content as multibyte string.  Create line buffer by
	just calling cstrdup.
2014-11-26 19:46:59 +00:00
Corinna Vinschen cda7e6ca20 * include/fcntl.h: Move all open flags (except O_NDELAY) to newlib's
sys/_default_fcntl.h.
2014-11-25 11:42:20 +00:00
Corinna Vinschen d8ba3ea1db * binmode.c (cygwin_premain0): Don't use underscore'd variants of the
open flags.
	* textmode.c (cygwin_premain0): Ditto.
2014-11-25 11:27:12 +00:00
Corinna Vinschen 72f4ea45e6 * utils.xml (passwd): Align to latest changes. 2014-11-24 11:21:22 +00:00
Corinna Vinschen cfd6979c39 * passwd.c (GetPW): If server is NULL, and the user is not a local
user, try to fetch the DC to use as server.
	(ChangePW): Get Windows username via extra parameter.
	(usage): Reduce -d help text to reflect above change.
	(main): Fix typo in comment.  Call GetPW and ChangePW as per the
	changes above.
2014-11-24 11:07:32 +00:00
Corinna Vinschen 764d261276 * init.cc (dll_entry): Revert previous patch. This requires another
solution.
	* miscfuncs.cc (thread_wrapper): Ditto.
	* sigproc.cc (exit_thread): Disable sending a signal for synchronization
	with process exit.  Explain why.  Keep code in for later inspection,
	should the problem show up again.
	(sig_send): Use "tls", rather than "tid" as name for _cygtls arg.
2014-11-21 21:41:37 +00:00
Corinna Vinschen f2a0724fca * init.cc (dll_entry): Call _my_tls.remove with INFINITE wait period
to avoid SEGVs and subsequent hangs in _cygtls::find_tls.
	* miscfuncs.cc (thread_wrapper): Ditto.
2014-11-20 16:23:14 +00:00
Corinna Vinschen f70b9c32d5 * net.cc (fdsock): Change default values for socket buffers on 32 bit
to fix performance on 10Gb networks.
2014-11-20 08:29:31 +00:00
Corinna Vinschen 5c6a0f3117 * uinfo.cc (pwdgrp::fetch_account_from_windows): Allow fetching of
NT SERVICE accounts by name.  Always prepend domain to NT SERVICE
	accounts.  Add U-domain\username string to pw_gecos for predefined
	builtin accounts as well.
2014-11-17 10:09:01 +00:00
Corinna Vinschen 1243cefd78 * fhandler_termios.cc (fhandler_termios::line_edit): Fix fatal typo in
bytes_read pointer checks.
2014-11-14 10:57:45 +00:00
Corinna Vinschen 73742508fc * fhandler.h (fhandler_termios::line_edit): Add parameter to return
written bytes.
	* fhandler_termios.cc (fhandler_termios::tcinit): Fix formatting.
	(fhandler_termios::line_edit): Return bytes actually written.  Write
	in 32 byte chunks in non-canonical mode to reduce number of WriteFile
	calls.  Don't just eat unwritten bytes in case of an error condition.
	Especially, don't report them back to the caller as written.
	* fhandler_tty.cc (fhandler_pty_slave::read): Disable code reducing
	the number of bytes read from the pipe to vmin.  Add comment.
	(fhandler_pty_master::write): Convert ret to ssize_t type.  Just call
	line_edit once, not in a loop once for each byte.  Return bytes written
	as returned by line_edit.
2014-11-13 18:37:15 +00:00
Corinna Vinschen d544f256d1 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 34.
* new-features.xml (ov-new1.7.34): Add new section.
	(ov-new1.7.33): Reflect intermediate 1.7.33 release.
2014-11-13 13:10:26 +00:00
Corinna Vinschen 8e0b17fb49 * configure.ac: Convert to new AC_INIT style.
* configure: Regenerate.
2014-11-13 12:12:56 +00:00
Corinna Vinschen 58d35b961e * utils.xml (mkgroup): Align to changed usage.
(mkpasswd): Ditto.
2014-11-12 14:50:56 +00:00
Corinna Vinschen 35983199f3 * mkgroup.c (usage): Fix language.
* mkpasswd.c (usage): Ditto.
2014-11-12 14:22:05 +00:00
Corinna Vinschen 4acb3408e9 * mkgroup.c (enum_unix_groups): Always print groupname with machine
prefix.
	(usage): Extend help output for -l option.
	(main): Drop superfluous goto and label.  Make machine prefixing for
	local machine when using -l option dependend on options in
	/etc/nsswitch.conf.
	* mkpasswd.c: Ditto.
2014-11-12 14:13:56 +00:00
Corinna Vinschen 54f79f8650 * cygheap.h (cygheap_pwdgrp): Remove constants NSS_FILES and NSS_DB.
Use NSS_SRC_FILES and NSS_SRC_DB throughout instead.
	(cygheap_pwdgrp::nss_pwd_src): New inline method.
	(cygheap_pwdgrp::nss_grp_src): Ditto.
	* external.cc (cygwin_internal): Add CW_GETNSS_PWD_SRC and
	CW_GETNSS_GRP_SRC cases.
	* uinfo.cc: Use NSS_SRC_FILES and NSS_SRC_DB throughout.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GETNSS_PWD_SRC
	and CW_GETNSS_GRP_SRC.
	(NSS_SRC_FILES): Define.
	(NSS_SRC_DB): Define.
2014-11-12 11:19:08 +00:00
Corinna Vinschen 9de862718c Fix typo 2014-11-10 20:27:22 +00:00
Corinna Vinschen df59ab7e7a * cygcheck.cc (dump_sysinfo): Handle Windows 10/Server 2014(?). 2014-11-10 16:21:52 +00:00
Corinna Vinschen 9b41831e4c * utils.xml (mkpasswd): Change /etc/group to /etc/passwd. 2014-11-07 13:53:25 +00:00
Corinna Vinschen 3daf2dc4f1 * dcrt0.cc (cygwin__cxa_atexit): Fetch correct DSO handle value
by searching dll list.  Explain why.
2014-11-07 08:33:22 +00:00
Corinna Vinschen 0f3cacfaa5 * cygserver-config: Add -N option to allow different service name. 2014-11-06 16:36:42 +00:00
Corinna Vinschen dfc361dad4 * dcrt0.cc (cygwin_atexit): Change preceeding comment to reflect
API version numbers.
	* external.cc (cygwin_internal): disable setting cxx_malloc on 64 bit.
	Add CW_FIXED_ATEXIT case.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_FIXED_ATEXIT.
	* lib/atexit.c (atexit): Test running Cygwin version by checking
	return value of cygwin_internal (CW_FIXED_ATEXIT).
2014-11-06 15:32:21 +00:00
Corinna Vinschen e5e6b6c49f * lib/atexit.c (atexit): Check for being linked into the executable.
If so, call __cxa_atexit with NULL DSO handle.  Explain why.
	* lib/dso_handle.c: New file providing fallback __dso_handle.
2014-11-05 16:26:18 +00:00
Corinna Vinschen b8fd41f5df * new-features.xml (ov-new1.7.33): Document xdr and atexit. 2014-11-05 09:56:09 +00:00
Corinna Vinschen 3f2601fa3e *** empty log message *** 2014-11-05 09:53:50 +00:00
Corinna Vinschen 4d67bb4936 * Makefile.in (NEW_FUNCTIONS): Add atexit to be not exported.
* lib/atexit.c (atexit): New, statically linkable version of atexit.
	* dcrt0.cc (cygwin_atexit): Add comment to mark this function as old
	entry point.  Indiscriminately check for DSO of function pointer for
	all functions, if checking for DSO of return address fails on x86_64.
	Change comment accordingly.
2014-11-05 09:48:00 +00:00
Corinna Vinschen a2ba36a67d * Makefile.in (NEW_FUNCTIONS): Define target-independent. Add target
dependent stuff afterwards.  Globally define timezone and all xdr
	symbols as non-exported from libcygwin.a.
2014-11-05 09:28:01 +00:00
Corinna Vinschen 1c53098be3 Add accidentally missing patch 2014-11-03 16:29:03 +00:00
Corinna Vinschen c5d751a658 * cygheap.cc: Fix formatting. 2014-11-03 15:30:59 +00:00
Corinna Vinschen fcb1765e87 * mkgroup.c (enum_local_groups): Don't generate leading separator char
for builtin accounts.
2014-11-03 14:54:43 +00:00
Corinna Vinschen 3a464532d9 * ntsec.xml: Fix typo. 2014-10-30 17:22:09 +00:00
Corinna Vinschen 91233e688a * uinfo.cc (cygheap_user::ontherange): Don't mention /etc/passwd. 2014-10-30 16:07:04 +00:00
Corinna Vinschen 149c9c1d5e Fix copyright date 2014-10-29 11:31:05 +00:00
Corinna Vinschen 5da7a22be0 * cygheap.cc (init_cygheap::init_installation_root): Create content of
installation_dir as non-prefixed path, if possible.
2014-10-29 10:40:47 +00:00
Corinna Vinschen d5b68452aa * setfacl.c (setfacl): Fix bracketing in expression. 2014-10-29 10:24:49 +00:00
Corinna Vinschen 1a6fa5618a * ntsec.xml (ntsec-mapping-caching): Describe service dependencies
in terms of cygserver.
2014-10-29 10:09:41 +00:00
Corinna Vinschen 6bb19351d9 * common.din (__cxa_atexit): Define as cygwin__cxa_atexit.
* dcrt0.cc (cygwin__cxa_atexit): New function.  Explain what we do.
2014-10-29 09:56:18 +00:00
Corinna Vinschen 9b41c90ead * xidepend: Make PDF file dependent on the same input files as the
HTML file of the same name to trigger automatic rebuild of PDFs on
	source file changes as well.
2014-10-28 11:01:32 +00:00
Corinna Vinschen 24485a663c * cygwinenv.xml: Change default setting of dosfilewarning.
* new-features.xml (ov-new1.7.33): Document aforementioned change.
2014-10-28 10:47:38 +00:00
Corinna Vinschen e6a4318d78 * globals.cc (dos_file_warning): Set to false by default.
* path.cc (warn_msdos): Make static.  Drop test for dos_file_warning.
	(path_conv::check): Check for dos_file_warning here to avoid a function
	call in the default case.
2014-10-28 10:44:49 +00:00
Corinna Vinschen 09687ee963 * ntsec.xml: Fix Solaris doc URLs. 2014-10-28 09:45:45 +00:00
Corinna Vinschen 3c8e918c38 * ntsec.xml: Try to make an expression less ambiguous. 2014-10-28 09:03:50 +00:00
Corinna Vinschen b7749822ed * dcrt0.cc (cygwin_atexit): Add workaround for broken atexit calls
in __gcc_register_frame of DLLs built with gcc-4.8.3-3.
2014-10-27 21:19:40 +00:00
Corinna Vinschen 4be37ddfc8 * dlfcn.cc (dlopen): Drop patch accommodating SetDllDiretory from
2014-10-14.
2014-10-27 13:13:54 +00:00
Corinna Vinschen 3d411b0591 * ntsec.xml: More language fixes. 2014-10-27 12:35:41 +00:00