mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-01 03:50:28 +08:00
* mkpasswd.c (current_user): Don't use HOMEDRIVE/HOMEPATH to generate
user's homedir. * mkgroup.c: Accommodate ctype changes. * mkpasswd.c: Ditto. * setfacl.c: Ditto. * ssp.c: Ditto.
This commit is contained in:
parent
764d88e4a7
commit
05e6f7b2b9
@ -1,3 +1,13 @@
|
||||
2009-05-06 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* mkpasswd.c (current_user): Don't use HOMEDRIVE/HOMEPATH to generate
|
||||
user's homedir.
|
||||
|
||||
* mkgroup.c: Accommodate ctype changes.
|
||||
* mkpasswd.c: Ditto.
|
||||
* setfacl.c: Ditto.
|
||||
* ssp.c: Ditto.
|
||||
|
||||
2009-05-04 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* cygcheck.cc (usage): Fix option order and print.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* mkgroup.c:
|
||||
|
||||
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2007, 2008 Red Hat, Inc.
|
||||
2007, 2008, 2009 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -244,7 +244,7 @@ enum_unix_groups (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
|
||||
|
||||
for (gstr = strtok (grp_list, ","); gstr; gstr = strtok (NULL, ","))
|
||||
{
|
||||
if (!isdigit (gstr[0]) && gstr[0] != '-')
|
||||
if (!isdigit ((unsigned char) gstr[0]) && gstr[0] != '-')
|
||||
{
|
||||
PWCHAR p = wcpcpy (grp, L"Unix Group\\");
|
||||
ret = mbstowcs (p, gstr, GNLEN + 1);
|
||||
@ -276,7 +276,7 @@ enum_unix_groups (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
|
||||
start = strtol (p, &p, 10);
|
||||
if (!*p)
|
||||
stop = start;
|
||||
else if (*p++ != '-' || !isdigit (*p)
|
||||
else if (*p++ != '-' || !isdigit ((unsigned char) *p)
|
||||
|| (stop = strtol (p, &p, 10)) < start || *p)
|
||||
{
|
||||
fprintf (stderr, "%s: Malformed unix group list entry '%s'. "
|
||||
@ -807,7 +807,7 @@ main (int argc, char **argv)
|
||||
if (opt && (p = strchr (opt, ',')))
|
||||
{
|
||||
if (p == opt
|
||||
|| !isdigit (p[1])
|
||||
|| !isdigit ((unsigned char) p[1])
|
||||
|| (domlist[print_domlist].id_offset = strtol (p + 1, &ep, 10)
|
||||
, *ep))
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* mkpasswd.c:
|
||||
|
||||
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
|
||||
2008 Red Hat, Inc.
|
||||
2008, 2009 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -146,7 +146,7 @@ put_sid (PSID sid)
|
||||
static void
|
||||
psx_dir (char *in, char *out)
|
||||
{
|
||||
if (isalpha (in[0]) && in[1] == ':')
|
||||
if (isalpha ((unsigned char) in[0]) && in[1] == ':')
|
||||
{
|
||||
sprintf (out, "/cygdrive/%c", in[0]);
|
||||
in += 2;
|
||||
@ -212,7 +212,7 @@ current_user (int print_cygpath, const char *sep, const char *passed_home_path,
|
||||
DWORD dlen = MAX_DOMAIN_NAME_LEN + 1;
|
||||
SID_NAME_USE acc_type;
|
||||
int uid, gid;
|
||||
char homedir_psx[PATH_MAX] = {0}, homedir_w32[MAX_PATH] = {0};
|
||||
char homedir_psx[PATH_MAX] = {0};
|
||||
|
||||
if (!curr_user.psid || !curr_pgrp.psid
|
||||
|| !LookupAccountSidW (NULL, curr_user.psid, user, &ulen, dom, &dlen,
|
||||
@ -229,8 +229,6 @@ current_user (int print_cygpath, const char *sep, const char *passed_home_path,
|
||||
if (passed_home_path[0] == '\0')
|
||||
{
|
||||
char *envhome = getenv ("HOME");
|
||||
char *envhomedrive = getenv ("HOMEDRIVE");
|
||||
char *envhomepath = getenv ("HOMEPATH");
|
||||
|
||||
if (envhome && envhome[0])
|
||||
{
|
||||
@ -240,19 +238,6 @@ current_user (int print_cygpath, const char *sep, const char *passed_home_path,
|
||||
else
|
||||
psx_dir (envhome, homedir_psx);
|
||||
}
|
||||
else if (envhomepath && envhomepath[0])
|
||||
{
|
||||
if (envhomedrive)
|
||||
strlcpy (homedir_w32, envhomedrive, sizeof (homedir_w32));
|
||||
if (envhomepath[0] != '\\')
|
||||
strlcat (homedir_w32, "\\", sizeof (homedir_w32));
|
||||
strlcat (homedir_w32, envhomepath, sizeof (homedir_w32));
|
||||
if (print_cygpath)
|
||||
cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, homedir_w32,
|
||||
homedir_psx, PATH_MAX);
|
||||
else
|
||||
psx_dir (homedir_w32, homedir_psx);
|
||||
}
|
||||
else
|
||||
{
|
||||
wcstombs (stpncpy (homedir_psx, "/home/", sizeof (homedir_psx)),
|
||||
@ -319,7 +304,7 @@ enum_unix_users (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
|
||||
|
||||
for (ustr = strtok (user_list, ","); ustr; ustr = strtok (NULL, ","))
|
||||
{
|
||||
if (!isdigit (ustr[0]) && ustr[0] != '-')
|
||||
if (!isdigit ((unsigned char) ustr[0]) && ustr[0] != '-')
|
||||
{
|
||||
PWCHAR p = wcpcpy (user, L"Unix User\\");
|
||||
ret = mbstowcs (p, ustr, UNLEN + 1);
|
||||
@ -351,7 +336,7 @@ enum_unix_users (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
|
||||
start = strtol (p, &p, 10);
|
||||
if (!*p)
|
||||
stop = start;
|
||||
else if (*p++ != '-' || !isdigit (*p)
|
||||
else if (*p++ != '-' || !isdigit ((unsigned char) *p)
|
||||
|| (stop = strtol (p, &p, 10)) < start || *p)
|
||||
{
|
||||
fprintf (stderr, "%s: Malformed unix user list entry '%s'. "
|
||||
@ -776,7 +761,7 @@ main (int argc, char **argv)
|
||||
if (opt && (p = strchr (opt, ',')))
|
||||
{
|
||||
if (p == opt
|
||||
|| !isdigit (p[1])
|
||||
|| !isdigit ((unsigned char) p[1])
|
||||
|| (domlist[print_domlist].id_offset = strtol (p + 1, &ep, 10)
|
||||
, *ep))
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* setfacl.c
|
||||
|
||||
Copyright 2000, 2001, 2002, 2003 Red Hat Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2006, 2008, 2009 Red Hat Inc.
|
||||
|
||||
Written by Corinna Vinschen <vinschen@redhat.com>
|
||||
|
||||
@ -51,7 +51,7 @@ typedef enum {
|
||||
|
||||
mode_t getperm (char *in)
|
||||
{
|
||||
if (isdigit (*in) && !in[1])
|
||||
if (isdigit ((unsigned char) *in) && !in[1])
|
||||
{
|
||||
int i = atoi (in);
|
||||
if (i < 0 || i > 7)
|
||||
@ -127,7 +127,7 @@ getaclentry (action_t action, char *c, aclent_t *ace)
|
||||
if (action == Delete)
|
||||
return FALSE;
|
||||
}
|
||||
else if (isdigit (*c))
|
||||
else if (isdigit ((unsigned char) *c))
|
||||
{
|
||||
char *c3;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2001, 2002 Red Hat, Inc.
|
||||
* Copyright (c) 2000, 2001, 2002, 2009 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -596,7 +596,7 @@ run_program (char *cmdline)
|
||||
{
|
||||
dll_ptr = cp+1;
|
||||
}
|
||||
*cp = tolower (*cp);
|
||||
*cp = tolower ((unsigned char) *cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user