Corinna Vinschen [Wed, 26 Nov 2008 10:19:09 +0000 (10:19 +0000)]
* 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.
Corinna Vinschen [Wed, 26 Nov 2008 10:18:53 +0000 (10:18 +0000)]
* 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.
Corinna Vinschen [Wed, 26 Nov 2008 10:18:10 +0000 (10:18 +0000)]
* 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.
Alan Modra [Wed, 26 Nov 2008 01:04:12 +0000 (01:04 +0000)]
include/
PR 7047
* bfdlink.h (struct bfd_elf_version_expr): Delete "symbol".
Add "literal".
bfd/
PR 7047
* configure.in: Bump version.
* configure: Regenerate.
* elflink.c (_bfd_elf_link_assign_sym_version): Continue matching
against version nodes when a global match is a wildcard. Similarly
continue matching on local wildcard matches, rather than only
continuing for "*". Have any global wildcard match override a
local wildcard match. Correct logic hiding unversioned symbol.
(bfd_elf_size_dynamic_sections): Update for changes to struct
bfd_elf_version_expr.
ld/
PR 7047
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): Update
for changes to struct bfd_elf_version_expr.
* ldlang.c (lang_vers_match, version_expr_head_hash): Likewise.
(version_expr_head_eq, lang_finalize_version_expr_head): Likewise.
(lang_register_vers_node): Likewise.
(lang_new_vers_pattern): Likewise. Ensure "literal" is set when
no glob chars found in "pattern".
(realsymbol): Correct backslash quote logic.
* ld.texinfo (VERSION): Warn about global wildcards.
* libc/stdlib/wcstoull_r.c: Add EINVAL return for bad base value,
include wchar.h for prototype, remove extraneous includes, use
C99/POSIX ULLONG_MAX (but allow for poor limits.h).
* libc/stdlib/wcstoull.c: Fix usage comments (mistakes and to add
base value check noted above), remove extraneous includes.
* libc/stdio/asnprintf.c: Add #include "local.h" to get function
prototype for _svfprintf_r().
* libc/stdio/vasnprintf.c: Ditto.
* libc/stdio/local.h: Add function prototype for __submore().
* libc/include/stdio.h: Add function prototypes for _fseeko_r and
_ftello_r.
* libc/posix/namespace.h: Commented out define for write to
eliminate write() prototype being missing for collate.c (which is
the only file that presently includes namespace.h).
* libc/include/reent.h: Added _rename_r.
* libc/reent/renamer.c: Corrected function prototypes in synopses.
* libc/locale/ldpart.c: Use struct stat64 when calling fstat64.
* libc/stdlib/wcstoull_r.c: Add EINVAL return for bad base value,
include wchar.h for prototype, remove extraneous includes, use
C99/POSIX ULLONG_MAX (but allow for poor limits.h).
* libc/stdlib/wcstoull.c: Fix usage comments (mistakes and to add
base value check noted above), remove extraneous includes.
* libc/stdio/asnprintf.c: Add #include "local.h" to get function
prototype for _svfprintf_r().
* libc/stdio/vasnprintf.c: Ditto.
* libc/stdio/local.h: Add function prototype for __submore().
* libc/include/stdio.h: Add function prototypes for _fseeko_r and
_ftello_r.
* libc/posix/namespace.h: Commented out define for write to
eliminate write() prototype being missing for collate.c (which is
the only file that presently includes namespace.h).
* libc/include/reent.h: Added _rename_r.
* libc/reent/renamer.c: Corrected function prototypes in synopses.
* libc/locale/ldpart.c: Use struct stat64 when calling fstat64.
* config/tc-xtensa.c (check_t1_t2_reads_and_writes): Call
xtensa_state_is_shared_or to allow multiple opcodes within a
single FLIX bundle to write to these special states.
Corinna Vinschen [Fri, 21 Nov 2008 13:46:17 +0000 (13:46 +0000)]
* fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Drop
initialization of bytes_to_read. Set bytes_to_read to len in
non-buffered case. Call read_bytes correctly with bytes_to_read
instead of len.
Jeff Johnston [Wed, 19 Nov 2008 21:05:31 +0000 (21:05 +0000)]
2008-11-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/config.h[__mips__]: Don't bother
setting __ATTRIBUTE_IMPURE_PTR__ here.
[__rtems__][__mips__]: No need to undef the __ATTRIBUTE_IMPURE_PTR__
macro anymore.
* libc/include/pthread.h: Remove prototypes for
pthread_attr_getcputime and pthread_attr_setcputime which
were proposed but never approved by the POSIX standard.
Nick Clifton [Fri, 14 Nov 2008 14:44:09 +0000 (14:44 +0000)]
bfd/
* elf.c (assign_file_positions_for_load_sections): Use header_size
to avoid moving the load address of file headers.
(assign_file_positions_for_load_sections): Set header_size for
segments containing the file header.
* fopen-vms.h (FOPEN_RB): Use a single string to match the
standard prototype.
(FOPEN_WB): Ditto.
(FOPEN_AB): Ditto.
(FOPEN_RUB): Ditto.
(FOPEN_WUB): Ditto.
(FOPEN_AUB): Ditto.
Corinna Vinschen [Wed, 12 Nov 2008 11:04:27 +0000 (11:04 +0000)]
* autoload.cc (GetSystemDEPPolicy): Define.
(GetProcessDEPPolicy): Ditto.
(SetProcessDEPPolicy): Ditto.
* dcrt0.cc (disable_dep): New static function.
(dll_crt0_0): Call disable_dep on platforms requiring it. Add longish
comment to explain the circumstances.
* wincap.h (wincaps::ts_has_dep_problem): New element.
* wincap.cc: Implement above element throughout.
(wincapc::init): Set ts_has_dep_problem to true on 2008 Terminal
Servers.
* winsup.h (WINVER): Set to 0x0601.
Corinna Vinschen [Tue, 11 Nov 2008 11:45:05 +0000 (11:45 +0000)]
* mount.cc (mount_info::cygdrive_win32_path): Always upper case
DOS drive letter to accommodate case sensitivity.
(cygdrive_getmntent): Ditto.
* path.cc (path_conv::check): Invalidate wide_path after making path
relative.
Corinna Vinschen [Tue, 11 Nov 2008 10:51:03 +0000 (10:51 +0000)]
* environ.cc (create_upcaseenv): New static variable.
(renv_arr): New static array to keep track of environment variables
which have to be always uppercased.
(idx_arr): Ditto.
(start_at): Ditto.
(ucreqenv): New function to uppercase only the environment variables
from renv_arr.
(parse_thing): Add "upcaseenv" setting.
(environ_init): Parse $CYGWIN before doing anything else. Call
ucreqenv instead of ucenv if CYGWIN=noupcaseenv is set.
* pthread.cc (pthread_mutex::_unlock): Avoid unlocking a mutex if the
recursion_counter is already 0.
(pthread_mutex::_destroy): Don't consider a mutex busy if its recursion_counter
== 0.
(pthread_mutex::_fixup_after_fork): Set recursion_counter to 0 to flag that
we've just forked. Don't reset the owner of this mutex since the forkee may
think it still owns the mutex. Reinstate initialization of win32_obj_id.
* fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Initialize a variable to
bypass a C++ warning.
Corinna Vinschen [Wed, 22 Oct 2008 13:30:42 +0000 (13:30 +0000)]
* autoload.cc (GetSystemWindowsDirectoryW): Define.
* kernel32.cc (GetWindowsDirectoryW): Implement to abstract from
running under Terminal Services or not.
(GetWindowsDirectoryA): Ditto.
Corinna Vinschen [Fri, 17 Oct 2008 16:24:20 +0000 (16:24 +0000)]
* dtable.cc (dtable::get_debugger_info): Call SetStdHandle
for the newly opened handle. Explain why.
(dtable::stdio_init): Don't duplicate standard error handle
when stderr has already been created under debugger control.
* libc/include/ctype.h (isblank): isblank is C99.
* libc/ctype/isblank.c (isblank comments): ditto. isblank does not
have a macro version (as was claimed in the description).
Corinna Vinschen [Mon, 13 Oct 2008 16:01:50 +0000 (16:01 +0000)]
* sec_acl.cc (setacl): Align standard owner and group permissions
with alloc_sd. Strip FILE_READ_ATTRIBUTES fromn setting
FILE_GENERIC_EXECUTE permissions same as in alloc_sd.
* security.cc (alloc_sd): Reformat expression. Strip EA permission
bits from owner_deny and group_deny computation.
* Makefile.in: Use a different method to invoke gcc in a cygwin-hosted
environment.
* mingwex/Makefile.in: Ditto.
* profile/Makefile.in: Ditto.
* configure.in: Record mingw front-end for building under Cygwin.
* mingwex/configure.in: Ditto.
* profile/configure.in: Ditto.
* configure: Regenerate.
* mingwex/configure: Ditto.
* profile/configure: Ditto.
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Check
for executable suffixes here in case we're on a file system
not supporting permission.
* path.cc (path_conv::check): Drop check for executable suffixes.
* path.cc (path_conv::is_binary): Always check for GetBinaryType.
* syscalls.cc (rename): Fix test for just changing case of name on
case insensitive filesystems.