#include #include #include #include #include #include // Get the user id. int GETUID(struct svc_req *x) { int ret = 0; int a, i; memcpy(&a, (x->rq_cred.oa_base)+12, sizeof (int)); for (i=0; i<4; i++){ ret = ret << 8; ret |= a & 0xff; a = a >> 8; } return ret; } // Get the get the group id. int GETGID(struct svc_req *x) { int ret = 0; int a, i; memcpy(&a, (x->rq_cred.oa_base)+16, sizeof (int)); for (i=0; i<4; i++){ ret = ret << 8; ret |= a & 0xff; a = a >> 8; } return ret; }