how to change the executive uid in current process?

This is a discussion on how to change the executive uid in current process? within the C Programming forums, part of the General Programming Boards category; at linux and gcc 2.96-98 environment thx...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    8

    Question how to change the executive uid in current process?

    at linux and gcc 2.96-98 environment
    thx

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    200
    try using the setuid() function. It accepts the new uid as type uid_t, and returns 0 if successful, -1 if not. If you want to change the real uid, you can use setreuid(), which accepts the real uid and the effective uid as uid_t. I'm pretty sure you need both <unistd.h> and <sys/types.h>

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Killing A Process
    By tommyb05 in forum C Programming
    Replies: 8
    Last Post: 06-01-2009, 06:41 AM
  2. adding a function to a program
    By trippedwire in forum C++ Programming
    Replies: 9
    Last Post: 09-30-2004, 12:35 PM
  3. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM
  4. help with calculating change from a dollar
    By z.tron in forum C++ Programming
    Replies: 3
    Last Post: 09-13-2002, 03:58 PM
  5. Replies: 2
    Last Post: 09-04-2001, 02:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21