* sysconf.cc (sysconf): Return arbitrary values for _SC_GETGR_R_SIZE_MAX,
_SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX. * passwd.cc (getpwuid_r32): Add uid/gid fields to size check calculation.
This commit is contained in:
parent
353549d744
commit
8619b42be7
@ -1,3 +1,11 @@
|
||||
2003-01-01 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* sysconf.cc (sysconf): Return arbitrary values for
|
||||
_SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
|
||||
|
||||
* passwd.cc (getpwuid_r32): Add uid/gid fields to size check
|
||||
calculation.
|
||||
|
||||
2002-12-30 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* exceptions.cc (events_init): Display name of mutex on failure.
|
||||
|
@ -266,7 +266,8 @@ getpwuid_r32 (__uid32_t uid, struct passwd *pwd, char *buffer, size_t bufsize, s
|
||||
/* check needed buffer size. */
|
||||
size_t needsize = strlen (temppw->pw_name) + strlen (temppw->pw_dir) +
|
||||
strlen (temppw->pw_shell) + strlen (temppw->pw_gecos) +
|
||||
strlen (temppw->pw_passwd) + 5;
|
||||
strlen (temppw->pw_passwd) + 5 +
|
||||
sizeof (temppw->pw_uid) + sizeof (temppw->pw_gid);
|
||||
if (needsize > bufsize)
|
||||
return ERANGE;
|
||||
|
||||
|
@ -47,6 +47,10 @@ sysconf (int in)
|
||||
return NGROUPS_MAX;
|
||||
case _SC_SAVED_IDS:
|
||||
return _POSIX_SAVED_IDS;
|
||||
case _SC_LOGIN_NAME_MAX:
|
||||
case _SC_GETPW_R_SIZE_MAX:
|
||||
case _SC_GETGR_R_SIZE_MAX:
|
||||
return 16*1024;
|
||||
case _SC_VERSION:
|
||||
return _POSIX_VERSION;
|
||||
#if 0 /* FIXME -- unimplemented */
|
||||
|
Loading…
Reference in New Issue
Block a user