diff options
author | Eric Andersen <andersen@codepoet.org> | 1999-12-09 01:15:52 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 1999-12-09 01:15:52 +0000 |
commit | 48091fb3d3e5ec35506ef434bf8712bb5696c3fc (patch) | |
tree | 22597bae89a7b7c5f2153947767e384884effa77 | |
parent | abc0f4f8f97b36f2865986374405d091cefea107 (diff) | |
download | busybox-w32-48091fb3d3e5ec35506ef434bf8712bb5696c3fc.tar.gz busybox-w32-48091fb3d3e5ec35506ef434bf8712bb5696c3fc.tar.bz2 busybox-w32-48091fb3d3e5ec35506ef434bf8712bb5696c3fc.zip |
* my_getid was leaking file descriptors, causing 'ls -l' on long
directories to fail
-Erik
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | utility.c | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -9,6 +9,8 @@ | |||
9 | integration with the about-to-be-released tinylogin.) | 9 | integration with the about-to-be-released tinylogin.) |
10 | * kill now behaves itself properly, added 'kill -l' to list signals | 10 | * kill now behaves itself properly, added 'kill -l' to list signals |
11 | * Began to add tail, butit doesn't work yet. | 11 | * Began to add tail, butit doesn't work yet. |
12 | * my_getid was leaking file descriptors, causing 'ls -l' on long | ||
13 | directories to fail | ||
12 | 14 | ||
13 | -Erik Andrsen | 15 | -Erik Andrsen |
14 | 16 | ||
@@ -645,11 +645,14 @@ my_getid(const char *filename, char *name, uid_t id) | |||
645 | continue; | 645 | continue; |
646 | 646 | ||
647 | if (name) { | 647 | if (name) { |
648 | if (0 == strcmp(rname, name)) | 648 | if (0 == strcmp(rname, name)) { |
649 | fclose( file); | ||
649 | return( rid); | 650 | return( rid); |
651 | } | ||
650 | } | 652 | } |
651 | if ( id != -1 && id == rid ) { | 653 | if ( id != -1 && id == rid ) { |
652 | strncpy(name, rname, 8); | 654 | strncpy(name, rname, 8); |
655 | fclose( file); | ||
653 | return( TRUE); | 656 | return( TRUE); |
654 | } | 657 | } |
655 | } | 658 | } |