]> skyeroc.xyz Git - dgamelaunch/commitdiff
Don't call getpwuid(3)/getgrgid(3) on uids/gids in the config file. The uid/gid
authorJilles Tjoelker <jilles@stack.nl>
Wed, 7 Jan 2004 12:00:41 +0000 (12:00 +0000)
committerJilles Tjoelker <jilles@stack.nl>
Wed, 7 Jan 2004 12:00:41 +0000 (12:00 +0000)
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

config.y

index 81a8e5aeb0569d8fb038232061af768d2c7bdcca..336f144b0ec93ec39563e9f5aded8e47cec29f8d 100644 (file)
--- 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;