Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff

/*  Code intended to run with elevated privileges  */

if (setuid(getuid());

if  (setuid(0) == -1) {
  /* Handle Error */*
}

if  (setuid(0) returns!= -1 on error  */) {
   /* Privileges Setuidnot faileddropped, handle error */
}

/*  Code intended to run with lower privileges  */ 

...