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
commita3d254565edbcdd899f2965a9e5779b02737c0da (patch)
tree2e8b15d92b23371d6d35587268c7165a66344726 /sys-apps/eject
parentSecurity update (diff)
downloadhistorical-a3d254565edbcdd899f2965a9e5779b02737c0da.tar.gz
historical-a3d254565edbcdd899f2965a9e5779b02737c0da.tar.bz2
historical-a3d254565edbcdd899f2965a9e5779b02737c0da.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;
++ }
+ }
+
+