Re: Proposed LUID implementation patch (for 2.3.99pre5) and test files

From: Albert D. Cahalan (acahalan@cs.uml.edu)
Date: Tue Apr 18 2000 - 03:13:31 EDT

  • Next message: bug1: "Re: POSSIBLE SMP KERNEL BUG ?"

    Linda Walsh writes:

    > Please consider the attached patch for inclusion into 2.3.99pre5.

    I'd really like to know why you think you need _two_ system calls
    and a capability bit. These are scarce resources.

    #define setluid(x) sys_luid(x)
    #define getluid() sys_luid((uid_t)-1)
    uid_t sys_luid(uid_t arg){
      uid_t old = current->luid;
      if(old == (uid_t)-1) current->luid = arg;
      return old;
    }

    As far as I can tell, this simple code does it all. On a system that
    sets the LUID, users will never be able to change it. This meets the
    requirement with a minimum of code and nothing wasted.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Tue Apr 18 2000 - 03:15:19 EDT