Skip to contentSkip to conversation

remove fsuser()

PATCH New Robert Love 1 participant 1 message Jun 4, 2002 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove fsuser()

Linus,

Apparently nothing uses fsuser() - else I would of just stuck this on the end the last patch...

This patch removes fsuser(). Now both suser() and fsuser() are gone and all permission checks use an appropriate capable() call.

Patch is against 2.5.20 + previous suser() removal patch. Please apply.

Robert Love

include/linux/sched.h +0 -18
diff -urN linux-2.5.20-rml/include/linux/sched.h linux/include/linux/sched.h
@@ -585,24 +585,6 @@
 extern void free_irq(unsigned int, void *);
 
 /*
- * This has now become a routine instead of a macro, it sets a flag if
- * it returns true (to do BSD-style accounting where the process is flagged
- * if it uses root privs). The implication of this is that you should do
- * normal permissions checks first, and check fsuser() last.
- *
- * suser() is gone, fsuser() should go soon too...
- */
-
-static inline int fsuser(void)
-{
-	if (!issecure(SECURE_NOROOT) && current->fsuid == 0) {
-		current->flags |= PF_SUPERPRIV;
-		return 1;
-	}
-	return 0;
-}
-
-/*
  * capable() checks for a particular capability.
  * See include/linux/capability.h for defined capabilities.
  */