patch-1.3.73 linux/include/linux/sched.h
Next file: linux/include/linux/skbuff.h
Previous file: linux/include/linux/pipe_fs_i.h
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Tue Mar 12 16:10:39 1996
- Orig file:
v1.3.72/linux/include/linux/sched.h
- Orig date:
Sat Mar 2 10:43:45 1996
diff -u --recursive --new-file v1.3.72/linux/include/linux/sched.h linux/include/linux/sched.h
@@ -259,6 +259,10 @@
/* Not implemented yet, only for 486*/
#define PF_PTRACED 0x00000010 /* set if ptrace (0) has been called. */
#define PF_TRACESYS 0x00000020 /* tracing system calls */
+#define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */
+#define PF_SUPERPREV 0x00000100 /* used super-user privileges */
+#define PF_DUMPCORE 0x00000200 /* dumped core */
+#define PF_SIGNALED 0x00000400 /* killed by a signal */
#define PF_STARTING 0x00000100 /* being created */
#define PF_EXITING 0x00000200 /* getting shut down */
@@ -348,6 +352,19 @@
const char *device,
void *dev_id);
extern void free_irq(unsigned int irq, void *dev_id);
+
+/*
+ * 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 suser() last.
+ */
+extern inline int suser(void)
+{
+ if (current->euid == 0)
+ current->flags |= PF_SUPERPREV;
+ return (current->euid == 0);
+}
extern void copy_thread(int, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
extern void flush_thread(void);
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]
with Sam's (original) version of this