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/shared.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/shared.cc') diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index 1b6978a62..f777a450e 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -212,11 +212,11 @@ sec_user (PVOID sa_buf, PSID sid2, BOOL inherit) ((char *) sa_buf + sizeof (*psa)); PACL acl = (PACL) ((char *) sa_buf + sizeof (*psa) + sizeof (*psd)); - char sid_buf[40]; + char sid_buf[MAX_SID_LEN]; PSID sid = (PSID) sid_buf; if (myself->psid) - CopySid (40, sid, myself->psid); + CopySid (MAX_SID_LEN, sid, myself->psid); else if (! lookup_name (getlogin (), myself->logsrv, sid)) return inherit ? &sec_none_nih : &sec_none; -- cgit v1.2.3