From 0c4d2abd9966366b5e215ae64ce3b620efca9335 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 2 Jul 2000 10:17:44 +0000 Subject: * winsup.h: Define MAX_SID_LEN and new MAX_HOST_NAME. * fork.cc (fork): Use above defines instead of numerical constants. * shared.cc (sec_user): Ditto. * shared.h (class pinfo): Ditto. * syscall.cc (seteuid): Ditto. * spawn.cc (_spawnve): Ditto. Eliminate conditional. (spawn_guts): Set child->uid = USHRT_MAX when user context will be changed in child process. * uinfo.cc (uinfo_init): Check for myself->uid instead of myself->psid to avoid reloading of /etc/passwd on process startup if ntsec is off. Use above defines instead of numerical constants. * security.cc: Move define for MAX_SID_LEN to winsup.h. --- winsup/cygwin/fork.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fork.cc') diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index f3b32b7f9..54c668137 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -419,10 +419,10 @@ fork () child->process_state |= PID_INITIALIZING | (myself->process_state & PID_USETTY); memcpy (child->username, myself->username, MAX_USER_NAME); - memcpy (child->sidbuf, myself->sidbuf, 40); + memcpy (child->sidbuf, myself->sidbuf, MAX_SID_LEN); if (myself->psid) child->psid = child->sidbuf; - memcpy (child->logsrv, myself->logsrv, 256); + memcpy (child->logsrv, myself->logsrv, MAX_HOST_NAME); memcpy (child->domain, myself->domain, MAX_COMPUTERNAME_LENGTH+1); child->token = myself->token; child->impersonated = myself->impersonated; -- cgit v1.2.3