struct AUTH *libnfs_authunix_create_default(void) { #ifdef WIN32 return libnfs_authunix_create("libnfs", 65534, 65534, 0, NULL); #else return libnfs_authunix_create("libnfs", getuid(), getgid(), 0, NULL); #endif }
static void rpc_set_uid_gid(struct rpc_context *rpc, int uid, int gid) { if (uid != rpc->uid || gid != rpc->gid) { struct AUTH *auth = libnfs_authunix_create("libnfs", uid, gid, 0, NULL); if (auth != NULL) { rpc_set_auth(rpc, auth); rpc->uid = uid; rpc->gid = gid; } } }