[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BUG: deny_access



Hello, out there!

I want to report a minor bug in the way MiNT denies (or rather allows)
access to files.

MiNT allows root to do _everything_, even to execute files which are
not executable. This behaviour is not shared by other unices (SunOS,
linux, etc.) which allow root read and write access, but deny
executional rights.

In this way I consider this a bug.

It is easy to fix, but the fix has some drawbacks: since root must
obey the x-bit, this is also true for directories. I have two daily
cron-jobs running: one creates a backup, the other updates the
locate-database. Both jobs cannot access directories, which are e.g. 
set 0700 and don't belong to root. So root gets some more mails per
day and the locate database lacks some files...

cu, Steffen

--- filesys.c.org	Mon Feb 13 20:07:08 1995
+++ filesys.c	Mon Feb 13 20:10:52 1995
@@ -1272,8 +1272,8 @@
 {
 	unsigned mode;
 
-/* the super-user can do anything! */
-	if (curproc->euid == 0)
+/* the super-user can do anything but execute! */
+	if (curproc->euid == 0 && (perm & S_IXOTH) == 0)
 		return 0;
 
 	mode = xattr->mode;