summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Ahlberg <aliz@gentoo.org>2003-03-03 10:07:22 +0000
committerDaniel Ahlberg <aliz@gentoo.org>2003-03-03 10:07:22 +0000
commit35db7902952266dc45c570fb3dec7009374643f8 (patch)
tree99ce0aae369293adc590cf4d0cdd7d3e734353f5 /sys-apps/eject
parentSecurity update (diff)
downloadgentoo-2-35db7902952266dc45c570fb3dec7009374643f8.tar.gz
gentoo-2-35db7902952266dc45c570fb3dec7009374643f8.tar.bz2
gentoo-2-35db7902952266dc45c570fb3dec7009374643f8.zip
missing patch
Diffstat (limited to 'sys-apps/eject')
-rw-r--r--sys-apps/eject/files/eject-2.0.12-gentoo.security.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys-apps/eject/files/eject-2.0.12-gentoo.security.patch b/sys-apps/eject/files/eject-2.0.12-gentoo.security.patch
new file mode 100644
index 000000000000..05903408e0ee
--- /dev/null
+++ b/sys-apps/eject/files/eject-2.0.12-gentoo.security.patch
@@ -0,0 +1,22 @@
+--- eject.c 2003-02-26 17:07:15.000000000 +0000
++++ eject.c 2003-02-26 17:11:55.000000000 +0000
+@@ -273,15 +273,12 @@
+ /* Return 1 if file/device exists, 0 otherwise. */
+ static int FileExists(const char *name)
+ {
+- int fd;
+-
+- fd = open(name, O_RDONLY|O_NONBLOCK);
+- if (fd == -1) {
+- return 0;
+- } else {
+- close(fd);
++ if (access (name, F_OK) == 0) {
+ return 1;
+ }
++ else {
++ return 0;
++ }
+ }
+
+