Test program for the uid fiddly business.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3654 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2005-07-21 19:10:28 +00:00
parent 06b8f41e66
commit 06faee3ef6
@@ -0,0 +1,30 @@
//
// $Id$
package com.threerings.util;
import com.threerings.util.unsafe.Unsafe;
/**
* Does something extraordinary.
*/
public class UIDTest
{
public static void main (String[] args)
{
if (Unsafe.setuid(1000)) {
System.err.println("Yay! My uid is changed.");
} else {
System.err.println("Boo hoo! I couldn't change my uid.");
}
if (Unsafe.setgid(60)) {
System.err.println("Yay! My gid is changed.");
} else {
System.err.println("Boo hoo! I couldn't change my gid.");
}
try {
Thread.sleep(60*1000L);
} catch (Exception e) {
}
}
}