Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-09-22 07:38:57 +0400
committerChristopher Faylor <me@cgf.cx>2002-09-22 07:38:57 +0400
commitc90e1cf179187d5d188a3003db503ffd86d80cfe (patch)
treead0890e2267f00de92aefc5a99d60017e4f15fe9 /winsup/cygwin/syscalls.cc
parent228f6b6e07f1b08620dc08f389263f228da0079f (diff)
* fhandler.cc (fhandler_base::dup): Don't set handle on failure. Caller has
already taken care of that. * fhandler_console.cc (fhandler_console::open): Initialize handles to NULL. (fhandler_console::close): Ditto. GNUify non-GNU formatted functions calls throughout.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 650cad80a..167e9c0f9 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -783,7 +783,7 @@ chown_worker (const char *name, unsigned fmode, __uid32_t uid, __gid32_t gid)
uid = old_uid;
if (gid == ILLEGAL_GID)
gid = old_gid;
- if (win32_path.isdir())
+ if (win32_path.isdir ())
attrib |= S_IFDIR;
res = set_file_attribute (win32_path.has_acls (), win32_path, uid,
gid, attrib);
@@ -1969,7 +1969,7 @@ seteuid32 (__uid32_t uid)
sav_token = cygheap->user.token;
sav_impersonated = cygheap->user.impersonated;
- RevertToSelf();
+ RevertToSelf ();
if (!OpenProcessToken (hMainProc, TOKEN_QUERY | TOKEN_ADJUST_DEFAULT, &ptok))
{
__seterrno ();
@@ -1979,7 +1979,7 @@ seteuid32 (__uid32_t uid)
Currently we do not try to differentiate between
internal tokens and others */
process_ok = verify_token (ptok, usersid, groups);
- debug_printf("Process token %sverified", process_ok ? "" : "not ");
+ debug_printf ("Process token %sverified", process_ok ? "" : "not ");
if (process_ok)
{
if (cygheap->user.issetuid ())
@@ -1996,7 +1996,7 @@ seteuid32 (__uid32_t uid)
/* Verify if the current tokem is suitable */
BOOL token_ok = verify_token (cygheap->user.token, usersid, groups,
&sav_token_is_internal_token);
- debug_printf("Thread token %d %sverified",
+ debug_printf ("Thread token %d %sverified",
cygheap->user.token, token_ok?"":"not ");
if (!token_ok)
cygheap->user.token = INVALID_HANDLE_VALUE;
@@ -2014,8 +2014,8 @@ seteuid32 (__uid32_t uid)
}
/* Set process def dacl to allow access to impersonated token */
- char dacl_buf[MAX_DACL_LEN(5)];
- if (usersid != (origpsid = cygheap->user.orig_sid())) psid2 = usersid;
+ char dacl_buf[MAX_DACL_LEN (5)];
+ if (usersid != (origpsid = cygheap->user.orig_sid ())) psid2 = usersid;
if (sec_acl ((PACL) dacl_buf, FALSE, origpsid, psid2))
{
TOKEN_DEFAULT_DACL tdacl;
@@ -2030,7 +2030,7 @@ seteuid32 (__uid32_t uid)
if (!process_ok && cygheap->user.token == INVALID_HANDLE_VALUE)
{
/* If no impersonation token is available, try to
- authenticate using NtCreateToken() or subauthentication. */
+ authenticate using NtCreateToken () or subauthentication. */
cygheap->user.token = create_token (usersid, groups, pw_new);
if (cygheap->user.token != INVALID_HANDLE_VALUE)
explicitly_created_token = TRUE;
@@ -2059,7 +2059,7 @@ seteuid32 (__uid32_t uid)
/* Try setting primary group in token to current group */
if (!SetTokenInformation (cygheap->user.token,
TokenPrimaryGroup,
- &groups.pgsid, sizeof(cygsid)))
+ &groups.pgsid, sizeof (cygsid)))
debug_printf ("SetTokenInformation(user.token, "
"TokenPrimaryGroup): %E");
}