openbsd-ports/misc/fileutils/patches/patch-src_remove_h
brad fa86cd9348 A race condition in the recursive use of 'rm' and 'mv' in fileutils 4.1 and
earlier could allow local users to delete files and directories (as the user
running fileutils) if the user has write access to part of the tree being
moved or deleted.

http://online.securityfocus.com/archive/1/260936
2003-02-25 14:35:43 +00:00

23 lines
753 B
Plaintext

$OpenBSD: patch-src_remove_h,v 1.1 2003/02/25 14:35:43 brad Exp $
--- src/remove.h.orig Mon Oct 16 10:32:03 2000
+++ src/remove.h Mon Feb 24 23:21:17 2003
@@ -44,8 +44,16 @@ struct File_spec
dev_t st_dev;
};
-enum RM_status rm PARAMS ((struct File_spec *fs, int user_specified_name,
- const struct rm_options *x));
+struct dev_ino
+{
+ ino_t st_ino;
+ dev_t st_dev;
+};
+
+enum RM_status rm PARAMS ((struct File_spec *fs,
+ int user_specified_name,
+ struct rm_options const *x,
+ struct dev_ino const *cwd_dev_ino));
void fspec_init_file PARAMS ((struct File_spec *fs, const char *filename));
void remove_init PARAMS ((void));
void remove_fini PARAMS ((void));