mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
This patch converts the call to fdopendir() to fclose(), opendir(), as
the former isn't supported on glibc before glibc 2.4 (SL10.0 and prior, Annvix, etc.). I dislike the change because fdopendir() does exactly what I want, and converting to straight opendir() introduces a small race window, though paths in question should be under administrator control anyway.
This commit is contained in:
parent
ce0b104088
commit
6271e1a510
2 changed files with 9 additions and 1 deletions
|
@ -150,6 +150,9 @@ fi
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 20 2006 - sbeattie@suse.de
|
||||
- use fclose();opendir() instead of fdopendir()
|
||||
- more translation updates
|
||||
* Fri Nov 10 2006 - sbeattie@suse.de
|
||||
- fix rc.aaeventd to depend on apparmor, not boot.apparmor (#214293)
|
||||
* Wed Nov 8 2006 - sbeattie@suse.de
|
||||
|
|
|
@ -393,8 +393,13 @@ static int process_include(char *inc, char *name, int line, FILE *out, int nest)
|
|||
}
|
||||
|
||||
if (S_ISDIR(my_stat.st_mode)) {
|
||||
DIR *dir = fdopendir(fileno(newf));
|
||||
DIR *dir = NULL;
|
||||
struct dirent *dirent;
|
||||
|
||||
/* XXX - fdopendir not available in glibc < 2.4 */
|
||||
/* dir = fdopendir(fileno(newf)); */
|
||||
fclose(newf);
|
||||
dir = opendir(buf);
|
||||
if (!dir) {
|
||||
retval = 1;
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Reference in a new issue