diff options
author | scottc <scottc> | 2002-06-21 12:18:50 +0000 |
---|---|---|
committer | scottc <scottc> | 2002-06-21 12:18:50 +0000 |
commit | 57dd1333b90dbabf70574aa9cfd7f515c02eddf4 (patch) | |
tree | 3eac2395fc05f49b64b650d48579d3425c4a5782 | |
parent | 427431cba7809ff927192f0496caa6229cca72e7 (diff) | |
download | gdb-57dd1333b90dbabf70574aa9cfd7f515c02eddf4.tar.gz |
Merged changes from HEAD
-rw-r--r-- | winsup/cygwin/ChangeLog | 15 | ||||
-rw-r--r-- | winsup/cygwin/cygheap.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/environ.cc | 7 | ||||
-rw-r--r-- | winsup/cygwin/errno.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/external.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/security.cc | 8 | ||||
-rw-r--r-- | winsup/cygwin/thread.cc | 6 | ||||
-rw-r--r-- | winsup/cygwin/uinfo.cc | 6 |
8 files changed, 31 insertions, 19 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 072fdddda82..1baab6479d8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -399,6 +399,17 @@ * Makefile.in: Remove special __OUTSIDE_CYGWIN__ case for cygserver_shm.cc. +2002-06-21 Christopher Faylor <cgf@redhat.com> + + * errno.cc: Change text description for EBADF throughout. + +2002-06-20 Pierre Humblet <pierre.humblet@ieee.org> + + * uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo. + (cygheap_user::env_logsrv): Verify env_domain is valid. + * environ.cc: Include child_info.h and keep spenvs[] sorted. + (environ_init): Check child_proc_info instead of myself->ppid_handle. + 2002-06-19 Christopher Faylor <cgf@redhat.com> * fhandler.cc (fhandler_base::set_flags): Change priority of "linked @@ -407,7 +418,7 @@ 2002-06-19 Christopher Faylor <cgf@redhat.com> - Use hMainProc where appropriate, throughout. + Use hMainProc where appropriate, throughout. * environ.cc (spenv::retrieve): Add debugging statements. * pinfo.cc (set_myself): Don't call strace.hello if already stracing. @@ -667,7 +678,7 @@ 2002-06-10 Robert Collins <rbtcollins@hotmail.com> * thread.cc: Variation of a patch from Thomas Pffaf. - (__pthread_detach): Cleanup thread object if the thread has terminated. + (__pthread_detach): Cleanup thread object if the thread has terminated. (__pthread_join): Change order of error checks, and lock against join/detach/exit races. (__pthread_exit): Lock object against join/detach/exit races. diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 9b0a2a24a35..0522255f654 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -460,7 +460,7 @@ cygheap_user::set_sid (PSID new_sid) if (new_sid) { if (!psid) - psid = cmalloc (HEAP_STR, MAX_SID_LEN); + psid = cmalloc (HEAP_STR, MAX_SID_LEN); if (psid) return CopySid (MAX_SID_LEN, psid, new_sid); } diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 1b3ff4f286b..9fc4d0ab81a 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -25,6 +25,7 @@ details. */ #include "cygheap.h" #include "registry.h" #include "environ.h" +#include "child_info.h" extern BOOL allow_daemon; extern BOOL allow_glob; @@ -712,7 +713,7 @@ environ_init (char **envp, int envc) char *eq; if ((eq = strchr (newp, '=')) == NULL) eq = strchr (newp, '\0'); - if (!myself->ppid_handle) + if (!child_proc_info) ucenv (newp, eq); if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0) sawTERM = 1; @@ -765,8 +766,8 @@ char env_dontadd[] = ""; /* Keep this list in upper case and sorted */ static NO_COPY spenv spenvs[] = { - {NL ("HOMEPATH="), &cygheap_user::env_homepath}, {NL ("HOMEDRIVE="), &cygheap_user::env_homedrive}, + {NL ("HOMEPATH="), &cygheap_user::env_homepath}, {NL ("LOGONSERVER="), &cygheap_user::env_logsrv}, {NL ("SYSTEMDRIVE="), NULL}, {NL ("SYSTEMROOT="), NULL}, @@ -809,7 +810,7 @@ spenv::retrieve (bool no_envblock, const char *const envname) /* Calculate (potentially) value for given environment variable. */ p = (cygheap->user.*from_cygheap) (); if (!p || (no_envblock && !envname)) - return env_dontadd; + return env_dontadd; char *s = (char *) cmalloc (HEAP_1_STR, namelen + strlen (p) + 1); strcpy (s, name); (void) strcpy (s + namelen, p); diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc index 3ad7b3d4a5a..17ac6a61b15 100644 --- a/winsup/cygwin/errno.cc +++ b/winsup/cygwin/errno.cc @@ -161,7 +161,7 @@ const NO_COPY char __declspec(dllexport) * const _sys_errlist[]= /* ENXIO 6 */ "No such device or address", /* E2BIG 7 */ "Arg list too long", /* ENOEXEC 8 */ "Exec format error", -/* EBADF 9 */ "Bad file number", +/* EBADF 9 */ "Bad file descriptor", /* ECHILD 10 */ "No children", /* EAGAIN 11 */ "Resource temporarily unavailable", /* ENOMEM 12 */ "Not enough core", @@ -338,7 +338,7 @@ strerror (int errnum) error = "Exec format error"; break; case EBADF: - error = "Bad file number"; + error = "Bad file descriptor"; break; case ECHILD: error = "No children"; diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index bc61027a091..1dad1e70ffd 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -234,7 +234,7 @@ cygwin_internal (cygwin_getinfo_types t, ...) return p ? p->dwProcessId : 0; } case CW_EXTRACT_DOMAIN_AND_USER: - { + { struct passwd *pw = va_arg (arg, struct passwd *); char *domain = va_arg (arg, char *); char *user = va_arg (arg, char *); diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 6f27b46f421..473e62ff9a2 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -268,7 +268,7 @@ get_logon_server (const char *domain, char *server, WCHAR *wserver) { server[0] = server[1] = '\\'; if (wserver) - sys_mbstowcs (wserver, server, INTERNET_MAX_HOST_NAME_LENGTH + 1); + sys_mbstowcs (wserver, server, INTERNET_MAX_HOST_NAME_LENGTH + 1); return TRUE; } @@ -512,7 +512,7 @@ get_group_sidlist (cygsidlist &grp_list, else { if (!get_logon_server (domain, server, wserver)) - return FALSE; + return FALSE; if (my_grps) { if (sid_in_token_groups (my_grps, well_known_local_sid)) @@ -544,8 +544,8 @@ get_group_sidlist (cygsidlist &grp_list, auth_pos = grp_list.count - 1; } if (!get_user_groups (wserver, grp_list, user, domain) || - !get_user_local_groups (grp_list, usersid)) - return FALSE; + !get_user_local_groups (grp_list, usersid)) + return FALSE; } /* special_pgrp true if pgrpsid is not null and not in normal groups */ if (!pgrpsid) diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index cc24fdca6c9..1ea5e18b237 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -1588,7 +1588,7 @@ __pthread_join (pthread_t *thread, void **return_val) if ( joiner == *thread) { if (return_val) - *return_val = NULL; + *return_val = NULL; return EDEADLK; } @@ -1597,7 +1597,7 @@ __pthread_join (pthread_t *thread, void **return_val) if((*thread)->attr.joinable == PTHREAD_CREATE_DETACHED) { if (return_val) - *return_val = NULL; + *return_val = NULL; (*thread)->mutex.UnLock (); return EINVAL; } @@ -1608,7 +1608,7 @@ __pthread_join (pthread_t *thread, void **return_val) (*thread)->mutex.UnLock (); WaitForSingleObject ((*thread)->win32_obj_id, INFINITE); if (return_val) - *return_val = (*thread)->return_ptr; + *return_val = (*thread)->return_ptr; // cleanup delete (*thread); } /*End if */ diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 0eb7892b17e..fe9e30db7b6 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -49,7 +49,7 @@ internal_getlogin (cygheap_user &user) else if (!GetTokenInformation (ptok, TokenUser, &tu, sizeof tu, &siz)) system_printf ("GetTokenInformation(): %E"); else if (!(ret = user.set_sid (tu))) - system_printf ("Couldn't retrieve SID from access token!"); + system_printf ("Couldn't retrieve SID from access token!"); /* We must set the user name, uid and gid. If we have a SID, try to get the corresponding Cygwin password entry. Set user name which can be different @@ -251,7 +251,7 @@ cygheap_user::ontherange (homebodies what, struct passwd *pw) WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3]; sys_mbstowcs (wlogsrv, env_logsrv (), sizeof (wlogsrv) / sizeof(*wlogsrv)); - sys_mbstowcs (wuser, name (), sizeof (wuser) / sizeof (*wuser)); + sys_mbstowcs (wuser, env_name (), sizeof (wuser) / sizeof (*wuser)); if (!(ret = NetUserGetInfo (wlogsrv, wuser, 3,(LPBYTE *)&ui))) { char *p; @@ -304,7 +304,7 @@ cygheap_user::env_logsrv () if (plogsrv) return plogsrv; - if (strcasematch (env_name (), "SYSTEM")) + if (!env_domain () || strcasematch (env_name (), "SYSTEM")) return NULL; char logsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3]; |