* grp.cc: Eliminate MAX_DOMAIN_NAME define.
(read_etc_group): Substitute MAX_DOMAIN_NAME by INTERNET_MAX_HOST_NAME_LENGTH. * passwd.cc (parse_pwd): Don't force pw_name to be lower case. * sec_helper.cc: Substitute MAX_USER_NAME by UNLEN, MAX_COMPUTERNAME_LENGTH by INTERNET_MAX_HOST_NAME_LENGTH throughout. (lookup_name): Slight cleanup. * security.cc (alloc_sd): Substitute MAX_USER_NAME by UNLEN. * security.h: Define DEFAULT_UID as DOMAIN_USER_RID_ADMIN and DEFAULT_GID as DOMAIN_ALIAS_RID_ADMINS. * shared.cc (memory_init): Substitute MAX_USER_NAME by UNLEN. * thread.h: Ditto. * uinfo.cc (internal_getlogin): Substitute MAX_USER_NAME by UNLEN. Substitute MAX_COMPUTERNAME_LENGTH and MAX_HOST_NAME by INTERNET_MAX_HOST_NAME_LENGTH. * winsup.h: Include lmcons.h. Eliminate MAX_USER_NAME and MAX_HOST_NAME. Move DEFAULT_UID and DEFAULT_GID to security.h.
This commit is contained in:
@@ -20,6 +20,7 @@ details. */
|
||||
#include "sigproc.h"
|
||||
#include "pinfo.h"
|
||||
#include "cygheap.h"
|
||||
#include "security.h"
|
||||
#include <sys/termios.h>
|
||||
|
||||
/* Read /etc/passwd only once for better performance. This is done
|
||||
@@ -93,7 +94,7 @@ parse_pwd (struct passwd &res, char *buf)
|
||||
if (mybuf[--len] == '\n')
|
||||
mybuf[len] = '\0';
|
||||
|
||||
res.pw_name = strlwr (grab_string (&mybuf));
|
||||
res.pw_name = grab_string (&mybuf);
|
||||
res.pw_passwd = grab_string (&mybuf);
|
||||
res.pw_uid = grab_int (&mybuf);
|
||||
res.pw_gid = grab_int (&mybuf);
|
||||
|
Reference in New Issue
Block a user