]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/binfmts.h
CRED: Make execve() take advantage of copy-on-write credentials
[linux-2.6-omap-h63xx.git] / include / linux / binfmts.h
index 7394b5b349ffc82c2ea42e51188dc3839229fed1..6cbfbe297180595911709bccd3976aa97cbf1014 100644 (file)
@@ -35,16 +35,20 @@ struct linux_binprm{
        struct mm_struct *mm;
        unsigned long p; /* current top of mem */
        unsigned int sh_bang:1,
-                    misc_bang:1;
+               misc_bang:1,
+               cred_prepared:1,/* true if creds already prepared (multiple
+                                * preps happen for interpreters) */
+               cap_effective:1;/* true if has elevated effective capabilities,
+                                * false if not; except for init which inherits
+                                * its parent's caps anyway */
 #ifdef __alpha__
        unsigned int taso:1;
 #endif
        unsigned int recursion_depth;
        struct file * file;
-       int e_uid, e_gid;
-       kernel_cap_t cap_post_exec_permitted;
-       bool cap_effective;
-       void *security;
+       struct cred *cred;      /* new credentials */
+       int unsafe;             /* how unsafe this exec is (mask of LSM_UNSAFE_*) */
+       unsigned int per_clear; /* bits to clear in current->personality */
        int argc, envc;
        char * filename;        /* Name of binary as seen by procps */
        char * interp;          /* Name of the binary really executed. Most
@@ -101,7 +105,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,
                           int executable_stack);
 extern int bprm_mm_init(struct linux_binprm *bprm);
 extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
-extern void compute_creds(struct linux_binprm *binprm);
+extern void install_exec_creds(struct linux_binprm *bprm);
 extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
 extern int set_binfmt(struct linux_binfmt *new);
 extern void free_bprm(struct linux_binprm *);