#include #include #include #include using namespace std; int main() { char tempName[] = "/tmp/ID_XXXXXX"; cout << "The real uiserid is " << getuid() << endl; cout << "The effective uiserid is " << geteuid() << endl; cout << "The real group id is " << getgid() << endl; cout << "The effective group id is " << getegid() << endl; int fd; fd = mkstemp(tempName); cout << "Just created the file " << tempName << endl; return 0; }