From: Jilles Tjoelker Date: Wed, 7 Jan 2004 12:00:41 +0000 (+0000) Subject: Don't call getpwuid(3)/getgrgid(3) on uids/gids in the config file. The uid/gid X-Git-Tag: v1.6.1-roc-dev~585 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=9686e206c0d33e0f10acbcbf17b28d46a66c60b0;p=dgamelaunch Don't call getpwuid(3)/getgrgid(3) on uids/gids in the config file. The uid/gid doesn't need to be in /etc/passwd or /etc/group anyway, and this reduces storage of sensitive information in dgamelaunch's memory space. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@113 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- diff --git a/config.y b/config.y index 81a8e5a..336f144 100644 --- a/config.y +++ b/config.y @@ -113,10 +113,7 @@ KeyPair: KeyType '=' TYPE_VALUE { case TYPE_SUID: if (!myconfig->shed_user) { - if (getpwuid($3) != NULL) - myconfig->shed_uid = $3; - else - fprintf(stderr, "%s: no such uid %lu\n", config, $3); + myconfig->shed_uid = $3; } break; @@ -124,10 +121,7 @@ KeyPair: KeyType '=' TYPE_VALUE { case TYPE_SGID: if (!myconfig->shed_group) { - if (getgrgid($3) != NULL) - myconfig->shed_gid = $3; - else - fprintf(stderr, "%s: no such gid %lu\n", config, $3); + myconfig->shed_gid = $3; } break;